CDPPlugin.h
Content
Data Structures
Parameter struct utilized when registering data providers. |
|
Aggregates the services that the plugin framework provides to the plugin. |
Macro definitions
Type definitions
Type definition of function pointer for deleting instances of CDPDataProviderFactory . |
|
Type definition of the function pointer for registering data providers with the plugin manager. |
|
Type definition of log function provided by the framework Log levels are 1=error, 2=warning, 3=info, 4=debug. |
|
Type definition of function provided by the framework for setting plugin information in the form of key, value pairs. |
|
Type definition definition of the plugin initialization function pointer (used by plugin manager to initialize plugins) Note that the return type is the CDP_PluginExitFunc (used by plugin manager to tell plugins to cleanup). |
Functions
Named exported entry point into the plugin This definition is required even though the function is loaded from a dynamic library by name and cast to CDP_PluginInitFunc If this declaration is commented out DynamicLibrary::getSymbol() fails The plugin’s initialization function MUST be called “initializeDataProviderPlugin” and conform to the CDP_PluginInitFunc signature. |
Macro definitions
-
CDP_RET_SUCCESS
-
CDP_RET_FAIL
-
CDP_PLUGIN_EXPORT
Type definitions
-
typedef void (*CDP_DestroyProviderFactoryFunc)(CDPDataProviderFactory *objPtr)
Type definition of function pointer for deleting instances of CDPDataProviderFactory.
-
typedef int (*CDP_RegisterProviderFunc)(const char *providerIdString, const CDP_RegisterProviderParams *params)
Type definition of the function pointer for registering data providers with the plugin manager.
-
typedef void (*CDP_LogFunc)(int level, const char *message)
Type definition of log function provided by the framework Log levels are 1=error, 2=warning, 3=info, 4=debug.
-
typedef void (*CDP_SetPluginInfoFunc)(const char *key, const char *value)
Type definition of function provided by the framework for setting plugin information in the form of key, value pairs.
-
typedef void (*CDP_PluginExitFunc)()
-
typedef CDP_PluginExitFunc (*CDP_PluginInitFunc)(const CDP_FrameworkServices *frameworkServices)
Type definition definition of the plugin initialization function pointer (used by plugin manager to initialize plugins) Note that the return type is the CDP_PluginExitFunc (used by plugin manager to tell plugins to cleanup).
If initialization failed for any reason, it must return NULL to let the plugin manger know that the plugin wasn’t initialized properly. The plugin should use the framework services to register the data providers it exports as well as communicating log messages.
Functions
-
CDP_PluginExitFunc initializeDataProviderPlugin(const CDP_FrameworkServices *params)
Named exported entry point into the plugin This definition is required even though the function is loaded from a dynamic library by name and cast to CDP_PluginInitFunc If this declaration is commented out DynamicLibrary::getSymbol() fails The plugin’s initialization function MUST be called “initializeDataProviderPlugin” and conform to the CDP_PluginInitFunc signature.