Plugin Loader Interface

Plugin Loader Interface — interface for loading plugins

Functions

Object Hierarchy

    GObject
    ╰── GPluginLoader
        ╰── GPluginNativeLoader

Description

A PluginLoader has to implement the interface described here for GPlugin to be able to use it to load plugins.

Functions

gplugin_loader_class_get_supported_extensions ()

GSList *
gplugin_loader_class_get_supported_extensions
                               (const GPluginLoaderClass *klass);

Returns a GSList of string for which extensions the loader supports.

Parameters

klass

GPluginLoader instance

 

Returns

A GSList of extensions that the loader supports.

[element-type utf8][transfer container]


gplugin_loader_query_plugin ()

GPluginPlugin *
gplugin_loader_query_plugin (GPluginLoader *loader,
                             const gchar *filename,
                             GError **error);

This function is called by the plugin manager to ask a loader to query the given file and determine if it's a usable plugin.

Parameters

loader

GPluginLoader instance performing the query

 

filename

filename to query

 

error

return location for a GError, or NULL

 

Returns

A GPluginPlugin instance or NULL on failure.

[transfer full]


gplugin_loader_load_plugin ()

gboolean
gplugin_loader_load_plugin (GPluginLoader *loader,
                            GPluginPlugin *plugin,
                            GError **error);

This function is called by the plugin manager to ask a loader to load the given plugin.

Parameters

loader

GPluginLoader instance performing the load

 

plugin

GPluginPlugin instance to load

 

error

return location for a GError, or NULL

 

Returns

TRUE if plugin was loaded successfully, FALSE otherwise


gplugin_loader_unload_plugin ()

gboolean
gplugin_loader_unload_plugin (GPluginLoader *loader,
                              GPluginPlugin *plugin,
                              GError **error);

This function is called by the plugin manager to ask a loader to unload the given plugin.

Parameters

loader

GPluginLoader instance performing the unload

 

plugin

GPluginPlugin instance to unload

 

error

return location for a GError, or NULL

 

Returns

TRUE if plugin was unloaded successfully, FALSE otherwise

Types and Values