open-vm-tools 12.0.5
|
#include <plugin.h>
Data Fields | |
const gchar * | name |
ToolsAppType | regType |
size_t | regSize |
void(* | activate )(ToolsAppCtx *ctx, struct ToolsAppProvider *prov, GError **err) |
gboolean(* | registerApp )(ToolsAppCtx *ctx, struct ToolsAppProvider *prov, struct ToolsPluginData *plugin, gpointer reg) |
void(* | shutdown )(ToolsAppCtx *ctx, struct ToolsAppProvider *prov) |
void(* | dumpState )(ToolsAppCtx *ctx, struct ToolsAppProvider *prov, gpointer reg) |
Defines the registration data for an "application provider". Application providers allow plugins to hook into new application frameworks that will be then managed by vmtoolsd - for example, an HTTP server or a dbus endpoint.
Application providers will be loaded during startup but not activated until at least one plugin provides registration data for that provider.
void(* ToolsAppProvider::activate) (ToolsAppCtx *ctx, struct ToolsAppProvider *prov, GError **err) |
Activation callback (optional). This is called when vmtoolsd detects that there is at least one application that needs to be registered with this provider.
[in] | ctx | The application context. |
[in] | prov | The provider instance. |
[out] | err | Where to store any error information. |
void(* ToolsAppProvider::dumpState) (ToolsAppCtx *ctx, struct ToolsAppProvider *prov, gpointer reg) |
Debugging callback (optional). This callback is called when dumping the service state to the logs for debugging purposes.
This callback is called once with a "NULL" reg, so that the provider can log its internal state, and then once for each registration struct provided by loaded plugins.
[in] | ctx | The application context. |
[in] | prov | The provider instance. |
[in] | reg | The application registration data. |
const gchar* ToolsAppProvider::name |
A name describing the provider.
gboolean(* ToolsAppProvider::registerApp) (ToolsAppCtx *ctx, struct ToolsAppProvider *prov, struct ToolsPluginData *plugin, gpointer reg) |
Registration callback. This is called after "activate", to register an application provided by a plugin.
[in] | ctx | The application context. |
[in] | prov | The provider instance. |
[in] | plugin | The plugin that owns the registration. |
[in] | reg | The application registration data. |
size_t ToolsAppProvider::regSize |
Size of the registration structure for this provider.
ToolsAppType ToolsAppProvider::regType |
Application type. Optimally, new providers would request a new type to be added to the "official" ToolsAppType enum declared above, although that is not strictly necessary. Providers should at least try to choose an unused value.
void(* ToolsAppProvider::shutdown) (ToolsAppCtx *ctx, struct ToolsAppProvider *prov) |
Shutdown callback (optional). Called when the service is being shut down. The provider is responsible for keeping track of registrations and cleaning them up during shutdown.
This method is only called if the provider was successfully activated.
[in] | ctx | The application context. |
[in] | prov | The provider instance. |