Collaboration diagram for OpenSync Plugin:
|
Enumerations | |
| enum | OSyncConfigurationType { OSYNC_PLUGIN_NO_CONFIGURATION = 0, OSYNC_PLUGIN_OPTIONAL_CONFIGURATION = 1, OSYNC_PLUGIN_NEEDS_CONFIGURATION = 2 } |
| Gives information about wether the plugin has to be configured or not. More... | |
Functions | |
| OSyncPlugin * | osync_plugin_new (OSyncError **error) |
| Registers a new plugin. | |
| OSyncPlugin * | osync_plugin_ref (OSyncPlugin *plugin) |
| Increase the reference count on a plugin. | |
| void | osync_plugin_unref (OSyncPlugin *plugin) |
| Decrease the reference count on a plugin. | |
| const char * | osync_plugin_get_name (OSyncPlugin *plugin) |
| Returns the name of a plugin. | |
| void | osync_plugin_set_name (OSyncPlugin *plugin, const char *name) |
| Sets the name of a plugin. | |
| const char * | osync_plugin_get_longname (OSyncPlugin *plugin) |
| Returns the long name of a plugin. | |
| void | osync_plugin_set_longname (OSyncPlugin *plugin, const char *longname) |
| Sets the long name of a plugin. | |
| const char * | osync_plugin_get_description (OSyncPlugin *plugin) |
| Returns the description of a plugin. | |
| void | osync_plugin_set_description (OSyncPlugin *plugin, const char *description) |
| Sets the description of a plugin. | |
| void * | osync_plugin_get_data (OSyncPlugin *plugin) |
| Returns the plugin_info data, set by the plugin. | |
| void | osync_plugin_set_data (OSyncPlugin *plugin, void *data) |
| Set the plugin_info data for the plugin object. | |
| OSyncConfigurationType | osync_plugin_get_config_type (OSyncPlugin *plugin) |
| Returns whether or not the plugin requires configuration. | |
| void | osync_plugin_set_config_type (OSyncPlugin *plugin, OSyncConfigurationType config_type) |
| Sets whether or not the plugin requires configuration. | |
| OSyncStartType | osync_plugin_get_start_type (OSyncPlugin *plugin) |
| Returns start type of plugin. | |
| void | osync_plugin_set_start_type (OSyncPlugin *plugin, OSyncStartType start_type) |
| Sets the start type of the plugin. | |
| void | osync_plugin_set_initialize (OSyncPlugin *plugin, initialize_fn init) |
| Sets the initialize function for a plugin. | |
| void | osync_plugin_set_finalize (OSyncPlugin *plugin, finalize_fn fin) |
| Sets the finalize function for a plugin. | |
| void | osync_plugin_set_discover (OSyncPlugin *plugin, discover_fn discover) |
| Sets the optional discover function for a plugin. | |
| void * | osync_plugin_initialize (OSyncPlugin *plugin, OSyncPluginInfo *info, OSyncError **error) |
| Initialize Plugin. | |
| void | osync_plugin_finalize (OSyncPlugin *plugin, void *data) |
| Finalize Plugin. | |
| osync_bool | osync_plugin_discover (OSyncPlugin *plugin, void *data, OSyncPluginInfo *info, OSyncError **error) |
| Call plugin discovery. | |
| osync_bool | osync_plugin_is_usable (OSyncPlugin *plugin, OSyncError **error) |
| Checks if a plugin is available and usable. | |
| unsigned int | osync_plugin_get_discover_timeout (OSyncPlugin *plugin) |
| Get timeout interval for plugin discovery. | |
| void | osync_plugin_set_discover_timeout (OSyncPlugin *plugin, unsigned int timeout) |
| Set timeout interval for plugin discovery. | |
| unsigned int | osync_plugin_get_initialize_timeout (OSyncPlugin *plugin) |
| Get timeout interval for plugin initialization. | |
| void | osync_plugin_set_initialize_timeout (OSyncPlugin *plugin, unsigned int timeout) |
| Set timeout interval for plugin initialization. | |
| unsigned int | osync_plugin_get_finalize_timeout (OSyncPlugin *plugin) |
| Get timeout interval for plugin finalization. | |
| void | osync_plugin_set_finalize_timeout (OSyncPlugin *plugin, unsigned int timeout) |
| Set timeout interval for plugin finalization. | |
| unsigned int | osync_plugin_get_useable_timeout (OSyncPlugin *plugin) |
| Get timeout interval for plugin "usable" function. | |
| void | osync_plugin_set_useable_timeout (OSyncPlugin *plugin, unsigned int timeout) |
| Set timeout interval for plugin "usable" function. | |
Gives information about wether the plugin has to be configured or not.
Definition at line 34 of file opensync_plugin.h.
| OSyncPlugin* osync_plugin_new | ( | OSyncError ** | error | ) |
Registers a new plugin.
This function creates a new OSyncPlugin object, that can be used to register a new plugin dynamically. This can be used by a module to register multiple plugins, instead of using the get_info() function which allows registering only one plugin.
| error | Pointer to an error struct |
Definition at line 48 of file opensync_plugin.c.
| OSyncPlugin* osync_plugin_ref | ( | OSyncPlugin * | plugin | ) |
Increase the reference count on a plugin.
| plugin | Pointer to the plugin |
Definition at line 71 of file opensync_plugin.c.
Referenced by osync_plugin_env_register_plugin().
| void osync_plugin_unref | ( | OSyncPlugin * | plugin | ) |
Decrease the reference count on a plugin.
| plugin | Pointer to the plugin |
Definition at line 85 of file opensync_plugin.c.
Referenced by osync_plugin_env_free().
| const char* osync_plugin_get_name | ( | OSyncPlugin * | plugin | ) |
Returns the name of a plugin.
| plugin | Pointer to the plugin |
Definition at line 109 of file opensync_plugin.c.
Referenced by osync_plugin_env_find_plugin().
| void osync_plugin_set_name | ( | OSyncPlugin * | plugin, | |
| const char * | name | |||
| ) |
Sets the name of a plugin.
Sets the name of a plugin. This is a short name (maybe < 15 chars).
| plugin | Pointer to the plugin | |
| name | the name to set |
Definition at line 123 of file opensync_plugin.c.
| const char* osync_plugin_get_longname | ( | OSyncPlugin * | plugin | ) |
Returns the long name of a plugin.
| plugin | Pointer to the plugin |
Definition at line 137 of file opensync_plugin.c.
| void osync_plugin_set_longname | ( | OSyncPlugin * | plugin, | |
| const char * | longname | |||
| ) |
Sets the long name of a plugin.
Sets the long name of a plugin (maybe < 50 chars).
| plugin | Pointer to the plugin | |
| longname | the long name to set |
Definition at line 151 of file opensync_plugin.c.
| const char* osync_plugin_get_description | ( | OSyncPlugin * | plugin | ) |
Returns the description of a plugin.
| plugin | Pointer to the plugin |
Definition at line 165 of file opensync_plugin.c.
| void osync_plugin_set_description | ( | OSyncPlugin * | plugin, | |
| const char * | description | |||
| ) |
Sets the description of a plugin.
Sets a longer description for the plugin (maybe < 200 chars).
| plugin | Pointer to the plugin | |
| description | the description to set |
Definition at line 179 of file opensync_plugin.c.
| void* osync_plugin_get_data | ( | OSyncPlugin * | plugin | ) |
Returns the plugin_info data, set by the plugin.
| plugin | Pointer to the plugin |
Definition at line 192 of file opensync_plugin.c.
| void osync_plugin_set_data | ( | OSyncPlugin * | plugin, | |
| void * | data | |||
| ) |
Set the plugin_info data for the plugin object.
| plugin | Pointer to the plugin | |
| data | Pointer to data which should get set |
Definition at line 203 of file opensync_plugin.c.
| OSyncConfigurationType osync_plugin_get_config_type | ( | OSyncPlugin * | plugin | ) |
Returns whether or not the plugin requires configuration.
| plugin | Pointer to the plugin |
Definition at line 214 of file opensync_plugin.c.
| void osync_plugin_set_config_type | ( | OSyncPlugin * | plugin, | |
| OSyncConfigurationType | config_type | |||
| ) |
Sets whether or not the plugin requires configuration.
| plugin | Pointer to the plugin | |
| config_type | The configuration requirement type of the plugin |
Definition at line 225 of file opensync_plugin.c.
| OSyncStartType osync_plugin_get_start_type | ( | OSyncPlugin * | plugin | ) |
Returns start type of plugin.
| plugin | Pointer to the plugin |
Definition at line 236 of file opensync_plugin.c.
| void osync_plugin_set_start_type | ( | OSyncPlugin * | plugin, | |
| OSyncStartType | start_type | |||
| ) |
Sets the start type of the plugin.
| plugin | Pointer to the plugin | |
| start_type | The start type of the plugin |
Definition at line 247 of file opensync_plugin.c.
| void osync_plugin_set_initialize | ( | OSyncPlugin * | plugin, | |
| initialize_fn | init | |||
| ) |
Sets the initialize function for a plugin.
The initialize function of a plugin sets up sinks for the plugin as well as other plugin-wide structures.
| plugin | Pointer to the plugin | |
| init | The initialize function for the plugin |
Definition at line 261 of file opensync_plugin.c.
| void osync_plugin_set_finalize | ( | OSyncPlugin * | plugin, | |
| finalize_fn | fin | |||
| ) |
Sets the finalize function for a plugin.
The finalize function of a plugin frees any plugin-wide structures that were created in the initialize function.
| plugin | Pointer to the plugin | |
| fin | The finalize function for the plugin |
Definition at line 275 of file opensync_plugin.c.
| void osync_plugin_set_discover | ( | OSyncPlugin * | plugin, | |
| discover_fn | discover | |||
| ) |
Sets the optional discover function for a plugin.
The discover function of a plugin can be used to specify which of the sinks in the plugin are currently available, and to declare the compatible device versions for the plugin. It can also be used to set the plugin's capabilities.
The discover function is optional.
| plugin | Pointer to the plugin | |
| discover | The discover function for the plugin |
Definition at line 294 of file opensync_plugin.c.
| void* osync_plugin_initialize | ( | OSyncPlugin * | plugin, | |
| OSyncPluginInfo * | info, | |||
| OSyncError ** | error | |||
| ) |
Initialize Plugin.
| plugin | Pointer to the plugin | |
| info | Pointer to OSyncPluginInfo which describes the plugin | |
| error | Pointer to error-struct |
Definition at line 307 of file opensync_plugin.c.
| void osync_plugin_finalize | ( | OSyncPlugin * | plugin, | |
| void * | data | |||
| ) |
Finalize Plugin.
| plugin | Pointer to the plugin | |
| data | Pointer to userdata which got returned by plugin initialize function |
Definition at line 318 of file opensync_plugin.c.
| osync_bool osync_plugin_discover | ( | OSyncPlugin * | plugin, | |
| void * | data, | |||
| OSyncPluginInfo * | info, | |||
| OSyncError ** | error | |||
| ) |
Call plugin discovery.
| plugin | Pointer to the plugin | |
| data | Pointer to userdata which got returned by plugin initialize function | |
| info | Pointer to OSyncPluginInfo which describes the plugin | |
| error | Pointer to error-struct |
Definition at line 332 of file opensync_plugin.c.
| osync_bool osync_plugin_is_usable | ( | OSyncPlugin * | plugin, | |
| OSyncError ** | error | |||
| ) |
Checks if a plugin is available and usable.
| plugin | The plugin to check | |
| error | If the return was FALSE, will contain information on why the plugin is not available |
Definition at line 348 of file opensync_plugin.c.
| unsigned int osync_plugin_get_discover_timeout | ( | OSyncPlugin * | plugin | ) |
Get timeout interval for plugin discovery.
| plugin | The plugin to get discvoery timeout |
Definition at line 367 of file opensync_plugin.c.
| void osync_plugin_set_discover_timeout | ( | OSyncPlugin * | plugin, | |
| unsigned int | timeout | |||
| ) |
Set timeout interval for plugin discovery.
| plugin | The plugin to check | |
| timeout | Timeout value |
Definition at line 379 of file opensync_plugin.c.
| unsigned int osync_plugin_get_initialize_timeout | ( | OSyncPlugin * | plugin | ) |
Get timeout interval for plugin initialization.
| plugin | The plugin to check |
Definition at line 391 of file opensync_plugin.c.
| void osync_plugin_set_initialize_timeout | ( | OSyncPlugin * | plugin, | |
| unsigned int | timeout | |||
| ) |
Set timeout interval for plugin initialization.
| plugin | The plugin to check | |
| timeout | Timeout value |
Definition at line 403 of file opensync_plugin.c.
| unsigned int osync_plugin_get_finalize_timeout | ( | OSyncPlugin * | plugin | ) |
Get timeout interval for plugin finalization.
| plugin | The plugin to check |
Definition at line 415 of file opensync_plugin.c.
| void osync_plugin_set_finalize_timeout | ( | OSyncPlugin * | plugin, | |
| unsigned int | timeout | |||
| ) |
Set timeout interval for plugin finalization.
| plugin | The plugin to check | |
| timeout | Timeout value |
Definition at line 427 of file opensync_plugin.c.
| unsigned int osync_plugin_get_useable_timeout | ( | OSyncPlugin * | plugin | ) |
Get timeout interval for plugin "usable" function.
| plugin | The plugin to check |
Definition at line 439 of file opensync_plugin.c.
| void osync_plugin_set_useable_timeout | ( | OSyncPlugin * | plugin, | |
| unsigned int | timeout | |||
| ) |
Set timeout interval for plugin "usable" function.
| plugin | The plugin to check | |
| timeout | Timeout value |
Definition at line 451 of file opensync_plugin.c.
1.5.1