UfoPluginManager

UfoPluginManager — Load a task from a shared object

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── UfoPluginManager

Description

The plugin manager opens and loads UfoTaskNode objects using ufo_plugin_manager_get_task() from shared objects. The libraries are searched for in the path configured at build time and in paths provided by the UFO_PLUGIN_PATH environment variable. The name of the plugin xyz maps to the library name libufofilterxyz.so.

Functions

ufo_plugin_manager_error_quark ()

GQuark
ufo_plugin_manager_error_quark (void);

ufo_plugin_manager_new ()

UfoPluginManager *
ufo_plugin_manager_new (void);

Create a plugin manager object to instantiate filter objects.

Returns

A new UfoPluginManager object.


ufo_plugin_manager_get_plugin ()

GObject *
ufo_plugin_manager_get_plugin (UfoPluginManager *manager,
                               const gchar *func_name,
                               const gchar *module_name,
                               GError **error);

Load a module and return an instance.

Parameters

manager

A UfoPluginManager

 

func_name

Name of the constructor function.

 

module_name

Filename of the shared object.

 

error

return location for a GError or NULL

 

Returns

(allow-none): A loaded plugin or NULL if module cannot be found.

[transfer full]


ufo_plugin_get_all_plugin_names ()

GList *
ufo_plugin_get_all_plugin_names (UfoPluginManager *manager,
                                 const GRegex *filename_regex,
                                 const gchar *filename_pattern);

Return a list with potential plugin names that match shared objects in all search paths.

Parameters

manager

A UfoPluginManager

 

filename_regex

Regex for filenames

 

filename_pattern

Pattern according with the files will be searched

 

Returns

List of strings with filter names.

[element-type utf8][transfer full]


ufo_plugin_manager_get_task ()

UfoTaskNode *
ufo_plugin_manager_get_task (UfoPluginManager *manager,
                             const gchar *name,
                             GError **error);

Load a UfoFilter module and return an instance. The shared object name must be * constructed as "libfiltername.so ".

Parameters

manager

A UfoPluginManager

 

name

Name of the plugin.

 

error

return location for a GError or NULL

 

Returns

(allow-none): UfoFilter or NULL if module cannot be found.

[transfer full]

Since: 0.2, the error parameter is available


ufo_plugin_manager_get_task_from_package ()

UfoTaskNode *
ufo_plugin_manager_get_task_from_package
                               (UfoPluginManager *manager,
                                const gchar *package_name,
                                const gchar *name,
                                GError **error);

Load a UfoTaskNode module and return an instance. The shared object name must be in package_name subfolder and constructed as "libname.so ".

Parameters

manager

A UfoPluginManager

 

package_name

Name of library package

 

name

Name of the plugin.

 

error

return location for a GError or NULL

 

Returns

(allow-none): UfoTaskNode or NULL if module cannot be found.

[transfer full]

Since: 0.2, the error parameter is available


ufo_plugin_manager_get_all_task_names ()

GList *
ufo_plugin_manager_get_all_task_names (UfoPluginManager *manager);

Return a list with potential filter names that match shared objects in all search paths.

Parameters

manager

A UfoPluginManager

 

Returns

List of strings with filter names.

[element-type utf8][transfer full]

Types and Values

UFO_PLUGIN_MANAGER_ERROR

#define UFO_PLUGIN_MANAGER_ERROR ufo_plugin_manager_error_quark()

enum UfoPluginManagerError

Possible errors that ufo_plugin_manager_get_task() can return.

Members

UFO_PLUGIN_MANAGER_ERROR_MODULE_NOT_FOUND

The module could not be found

 

UFO_PLUGIN_MANAGER_ERROR_MODULE_OPEN

Module could not be opened

 

UFO_PLUGIN_MANAGER_ERROR_SYMBOL_NOT_FOUND

Necessary entry symbol was not found

 

struct UfoPluginManager

struct UfoPluginManager;

Creates UfoFilter instances by loading corresponding shared objects. The contents of the UfoPluginManager structure are private and should only be accessed via the provided API.


struct UfoPluginManagerClass

struct UfoPluginManagerClass {
};

UfoPluginManager class