From: <dg...@su...> - 2009-01-08 10:57:32
|
Author: bricks Date: Thu Jan 8 11:57:01 2009 New Revision: 5055 URL: http://www.opensync.org/changeset/5055 Log: added doxygen group OSyncPlugin added documentation for the plugin callback functions Modified: trunk/opensync/plugin/opensync_plugin.h Modified: trunk/opensync/plugin/opensync_plugin.h ============================================================================== --- trunk/opensync/plugin/opensync_plugin.h Thu Jan 8 11:49:06 2009 (r5054) +++ trunk/opensync/plugin/opensync_plugin.h Thu Jan 8 11:57:01 2009 (r5055) @@ -21,14 +21,50 @@ #ifndef _OPENSYNC_PLUGIN_H_ #define _OPENSYNC_PLUGIN_H_ +/** + * @defgroup OSyncPlugin OpenSync Plugin Module + * @ingroup OSyncPublic + * @defgroup OSyncPluginAPI OpenSync Plugin + * @ingroup OSyncPlugin + * @brief The public part of the OSyncPlugin + * + * Functions to register and manage plugins + */ + +/*@{*/ + +/** + * @brief Prototype of the plugin initialize function + * In this function a plugin should initialize and allocate + * all plugin specific data which is required in the other plugin + * functions. This data could be e.g. connections, directories, ... + * @param plugin + * @param info the OSyncPluginInfo + * @param error An OSyncError struct that should be used to set an error + * @return The plugin specific data that is passed to the other plugin functions + */ typedef void * (* initialize_fn) (OSyncPlugin *plugin, OSyncPluginInfo *info, OSyncError **error); + +/** + * @brief Prototype of the plugin finalize function + * This plugin function is called to give a plugin the possibility + * to free all allocated data. + * @param plugin_data Plugin specific data that was returned by the initialize function + */ typedef void (* finalize_fn) (void * plugin_data); + +/** + * @brief Prototype of the plugin discovery function + * TODO Add detailed description + * @param info the OSyncPluginInfo + * @param plugin_data Plugin specific data that was returned in the plugin initialize function + * @param error An OSyncError struct that should be used to set an error + * @return TRUE if discovery was successful + */ typedef osync_bool (* discover_fn) (OSyncPluginInfo *info, void * plugin_data, OSyncError **error); /** @brief Gives information about wether the plugin * has to be configured or not - * - * @ingroup OSyncPluginAPI **/ typedef enum { /** Plugin has no configuration options */ @@ -39,15 +75,6 @@ OSYNC_PLUGIN_NEEDS_CONFIGURATION = 2 } OSyncConfigurationType; -/** - * @defgroup OSyncPluginAPI OpenSync Plugin - * @ingroup OSyncPublic - * @brief Functions to register and manage plugins - * - */ -/*@{*/ - - /** @brief Registers a new plugin * * This function creates a new OSyncPlugin object, that |