bg_plugin_common_s Struct Reference
[Plugins]

Base structure common to all plugins. More...

#include <plugin.h>

Data Fields

char * gettext_domain
 First argument for bindtextdomain().
char * gettext_directory
 Second argument for bindtextdomain().
char * name
 Unique short name.
char * long_name
 Humanized name for GUI widgets.
bg_plugin_type_t type
 Type.
int flags
 Flags (see defines).
char * description
 Textual description.
int priority
 Priority (between 1 and 10).
void *(* create )()
 Create the instance, return handle.
void(* destroy )(void *priv)
 Destroy plugin instance.
const bg_parameter_info_t *(* get_parameters )(void *priv)
 Get available parameters.
bg_set_parameter_func_t set_parameter
 Set configuration parameter (optional).
bg_get_parameter_func_t get_parameter
 Get configuration parameter (optional).
int(* check_device )(const char *device, char **name)
 Check, if a device can be opened by the plugin (optional).
bg_device_info_t *(* find_devices )()
 Get an array of all supported devices found on the system.

Detailed Description

Base structure common to all plugins.


Field Documentation

First argument for bindtextdomain().

Second argument for bindtextdomain().

Unique short name.

Humanized name for GUI widgets.

Type.

Flags (see defines).

Textual description.

Priority (between 1 and 10).

Create the instance, return handle.

Returns:
A private handle, which is the first argument to all subsequent functions.
void(* bg_plugin_common_s::destroy)(void *priv)

Destroy plugin instance.

Parameters:
priv The handle returned by the create() method

Destroy everything, making it ready for dlclose() This function might also be called on opened plugins, so the plugins should call their close()-function from within the destroy method.

Get available parameters.

Parameters:
priv The handle returned by the create() method
Returns:
a NULL terminated parameter array.

The returned array is owned (an should be freed) by the plugin.

Set configuration parameter (optional).

Get configuration parameter (optional).

This must only return parameters, which are changed internally by the plugins.

int(* bg_plugin_common_s::check_device)(const char *device, char **name)

Check, if a device can be opened by the plugin (optional).

Parameters:
device The device as passed to the open() method
name Returns the name if available
Returns:
1 if the device is supported, 0 else

The name should be set to NULL before this call, and must be freed if it's non-NULL after the call.

Get an array of all supported devices found on the system.

Returns:
A NULL terminated device array

The returned array must be freed with bg_device_info_destroy by the caller.


The documentation for this struct was generated from the following file:
Generated on Sat Apr 24 15:29:53 2010 for gmerlin by  doxygen 1.6.3