![]() |
![]() |
![]() |
GOffice Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
void (*GOPluginMethod) (GOPlugin *plugin
,GOCmdContext *cc
); GOPluginServiceResource; void go_plugin_activate (GOPlugin *plugin
,GOErrorInfo **ret_error
); gboolean go_plugin_can_deactivate (GOPlugin *plugin
); void go_plugin_db_activate_plugin_list (GSList *plugins
,GOErrorInfo **ret_error
); void go_plugin_db_deactivate_plugin_list (GSList *plugins
,GOErrorInfo **ret_error
); gboolean go_plugin_db_is_plugin_marked_for_deactivation (GOPlugin *plugin
); void go_plugin_db_mark_plugin_for_deactivation (GOPlugin *plugin
,gboolean mark
); void go_plugin_deactivate (GOPlugin *plugin
,GOErrorInfo **ret_error
); GSList * go_plugin_get_dependencies_ids (GOPlugin *plugin
); char const * go_plugin_get_description (GOPlugin *plugin
); char const * go_plugin_get_dir_name (GOPlugin *plugin
); char const * go_plugin_get_id (GOPlugin *plugin
); GOPluginLoader * go_plugin_get_loader (GOPlugin *plugin
); char const * go_plugin_get_name (GOPlugin *plugin
); GSList * go_plugin_get_services (GOPlugin *plugin
); char const * go_plugin_get_textdomain (GOPlugin *plugin
); GTypeModule * go_plugin_get_type_module (GOPlugin *plugin
); gboolean go_plugin_is_active (GOPlugin *plugin
); gboolean go_plugin_is_loaded (GOPlugin *plugin
); void go_plugin_load_service (GOPlugin *plugin
,GOPluginService *service
,GOErrorInfo **ret_error
); void go_plugin_unload_service (GOPlugin *plugin
,GOPluginService *service
,GOErrorInfo **ret_error
); void go_plugin_use_ref (GOPlugin *plugin
); void go_plugin_use_unref (GOPlugin *plugin
); GSList * go_plugins_get_active_plugins (void
); GSList * go_plugins_get_available_plugins (void
); GOPlugin * go_plugins_get_plugin_by_id (const gchar *plugin_id
); char * go_plugins_get_plugin_dir (void
); void go_plugins_init (GOCmdContext *context
,GSList const *known_states
,GSList const *active_plugins
,GSList *plugin_dirs
,gboolean activate_new_plugins
,GType default_loader_type
); void go_plugins_register_loader (const gchar *id_str
,GOPluginService *service
); void go_plugins_rescan (GOErrorInfo **ret_error
,GSList **ret_new_plugins
); GSList * go_plugins_shutdown (void
); void go_plugins_unregister_loader (const gchar *id_str
);
void go_plugin_activate (GOPlugin *plugin
,GOErrorInfo **ret_error
);
Activates plugin
together with all its dependencies.
In case of error the plugin won't be activated and detailed error
information will be returned using ret_error
.
|
GOPlugin |
|
Pointer used to report errors |
gboolean go_plugin_can_deactivate (GOPlugin *plugin
);
Tells if the plugin can be deactivated using go_plugin_deactivate.
|
GOPlugin |
Returns : |
TRUE if plugin can be deactivated and FALSE otherwise.
|
void go_plugin_db_activate_plugin_list (GSList *plugins
,GOErrorInfo **ret_error
);
Activates all plugins in the list. If some of the plugins cannot be
activated, the function reports this via ret_error
(errors don't
affect plugins activated successfully).
|
The list of plugins. [element-type GOPlugin] |
|
Pointer used to report errors |
void go_plugin_db_deactivate_plugin_list (GSList *plugins
,GOErrorInfo **ret_error
);
Deactivates all plugins in the list. If some of the plugins cannot be
deactivated, the function reports this via ret_error
(errors don't
affect plugins deactivated successfully).
|
The list of plugins. [element-type GOPlugin] |
|
Pointer used to report errors |
gboolean go_plugin_db_is_plugin_marked_for_deactivation
(GOPlugin *plugin
);
|
GOPlugin |
Returns : |
void go_plugin_db_mark_plugin_for_deactivation (GOPlugin *plugin
,gboolean mark
);
|
GOPlugin |
void go_plugin_deactivate (GOPlugin *plugin
,GOErrorInfo **ret_error
);
Dectivates plugin
. Its dependencies will NOT be automatically
deactivated.
In case of error the plugin won't be deactivated and detailed error
information will be returned using ret_error
.
|
GOPlugin |
|
Pointer used to report errors |
GSList * go_plugin_get_dependencies_ids (GOPlugin *plugin
);
|
GOPlugin |
Returns : |
the list of identifiers of
plugins that plugin depends on.
All these plugins will be automatically activated before activating the
plugin itself. The caller must free the returned list together with
the strings it points to (use g_slist_free_full (list, g_free) to do
this). [element-type char][transfer full char]
|
char const * go_plugin_get_description (GOPlugin *plugin
);
|
GOPlugin |
Returns : |
textual description of plugin or NULL if description is not
available. Returned string stays valid during plugin 's lifetime.
|
char const * go_plugin_get_dir_name (GOPlugin *plugin
);
|
GOPlugin |
Returns : |
the name of the directory in which plugin is located.
Returned string is != NULL and stays valid during plugin 's lifetime.
|
char const * go_plugin_get_id (GOPlugin *plugin
);
|
GOPlugin |
Returns : |
the ID of plugin (unique string used for idenfification of
plugin). Returned string is != NULL and stays valid during plugin 's
lifetime.
|
GOPluginLoader * go_plugin_get_loader (GOPlugin *plugin
);
|
GOPlugin |
Returns : |
The loader. [transfer none] |
char const * go_plugin_get_name (GOPlugin *plugin
);
|
GOPlugin |
Returns : |
textual name of plugin . If the real name is not available
for some reason, automatically generated string will be returned.
Returned string is != NULL and stays valid during plugin 's lifetime.
|
GSList * go_plugin_get_services (GOPlugin *plugin
);
|
GOPlugin |
Returns : |
A list of services. The list must not be freed or changed. [element-type GOPluginService][transfer none GOPluginService] |
char const * go_plugin_get_textdomain (GOPlugin *plugin
);
|
GOPlugin |
Returns : |
plugin's textdomain for use with textdomain(3) and d*gettext(3) functions. |
GTypeModule * go_plugin_get_type_module (GOPlugin *plugin
);
|
GOPlugin |
Returns : |
the GTypeModule associated with the plugin creating it if necessary. [transfer none] |
gboolean go_plugin_is_active (GOPlugin *plugin
);
|
GOPlugin |
Returns : |
TRUE if plugin is active and FALSE otherwise.
|
gboolean go_plugin_is_loaded (GOPlugin *plugin
);
|
GOPlugin |
Returns : |
TRUE if plugin is loaded and FALSE otherwise.
|
void go_plugin_load_service (GOPlugin *plugin
,GOPluginService *service
,GOErrorInfo **ret_error
);
Loads base part of the plugin if it is not loaded and then loads given plugin service (prepares necessary part of the plugin for direct use). This function is intended for use by GOPluginService objects.
|
GOPlugin |
|
Plugin service |
|
Pointer used to report errors |
void go_plugin_unload_service (GOPlugin *plugin
,GOPluginService *service
,GOErrorInfo **ret_error
);
... This function is intended for use by GOPluginService objects.
|
GOPlugin |
|
Plugin service |
|
Pointer used to report errors |
GSList * go_plugins_get_active_plugins (void
);
Returns : |
the list of active plugins names. The caller needs to free the list, but not the content. [element-type char][transfer container char] |
GSList * go_plugins_get_available_plugins (void
);
Returns : |
the list of available plugins. The returned value must not be freed and stays valid until calling plugins_rescan or plugins_shutdown. [element-type GOPlugin][transfer container GOPlugin] |
GOPlugin * go_plugins_get_plugin_by_id (const gchar *plugin_id
);
|
String containing plugin ID |
Returns : |
GOPlugin object for plugin with ID equal to plugin_id or NULL
if there's no plugin available with given id. Function returns
"borrowed" reference, use g_object_ref if you want to be sure that
plugin won't disappear. [transfer none]
|
void go_plugins_init (GOCmdContext *context
,GSList const *known_states
,GSList const *active_plugins
,GSList *plugin_dirs
,gboolean activate_new_plugins
,GType default_loader_type
);
Initializes the plugin subsystem. Might be called several times to add new plugins.
|
GOCmdContext used to report errors |
|
A list of known states (defined how ?). [element-type char] |
|
A list of active plugins. [element-type char] |
|
a list of directories to search for plugins. [element-type char] |
|
activate plugins we have no seen before. |
|
importer to use by default. |
void go_plugins_register_loader (const gchar *id_str
,GOPluginService *service
);
Registers new type of plugin loader identified by loader_id
(identifier
consists of loader's plugin ID and service ID concatenated using colon).
All requests to create new loader object of this type will be passed to
service
.
This function is intended for use by GOPluginService objects.
|
Loader's id |
|
Plugin service of type "plugin_loader" |
void go_plugins_rescan (GOErrorInfo **ret_error
,GSList **ret_new_plugins
);
|
Pointer used to report errors |
|
Optional pointer to return list of new plugins. [element-type GOPlugin] |
GSList * go_plugins_shutdown (void
);
Shuts down the plugin subsystem. Call this function only once before exiting the application. Some plugins may be left active or in broken state, so calling plugins_init again will NOT work properly.
Returns : |
the list of plugins still in use. [element-type char][transfer full char] |
void go_plugins_unregister_loader (const gchar *id_str
);
Unregisters a type of plugin loader identified by loader_id
. After
callingthis function Gnumeric will be unable to load plugins supported
by the specified loader.
This function is intended for use by GOPluginService objects.
|
Loader's id |