/*********************************************************
- * Copyright (C) 2008-2019,2020 VMware, Inc. All rights reserved.
+ * Copyright (C) 2008-2020 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
} ToolsCoreAPI;
+struct ToolsServiceProperty;
+
+/**
+ * Type of the function that installs a new property in
+ * the application context service object.
+ *
+ * @param[in] obj The application context service object.
+ * @param[in] prop Property to install.
+ */
+typedef void (*RegisterServiceProperty)(gpointer obj,
+ struct ToolsServiceProperty *prop);
+
/**
* Defines the context of a tools application. This data is provided by the
* core services to applications when they're loaded.
* register and emit their own signals using this object.
*/
gpointer serviceObj;
+
+ /**
+ * Function pointer for plugins to register properties to
+ * the service object serviceObj.
+ * This allows a plugin to share data and services to others.
+ */
+ RegisterServiceProperty registerServiceProperty;
} ToolsAppCtx;
#if defined(G_PLATFORM_WIN32)
g_type_init();
state->ctx.serviceObj = g_object_new(TOOLSCORE_TYPE_SERVICE, NULL);
+ state->ctx.registerServiceProperty =
+ (RegisterServiceProperty)ToolsCoreService_RegisterProperty;
/* Register the core properties. */
ToolsCoreService_RegisterProperty(state->ctx.serviceObj,