gmerlin
Data Fields
bg_plugin_common_s Struct Reference

Base structure common to all plugins. More...

#include <plugin.h>

Data Fields

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

Detailed Description

Base structure common to all plugins.

Field Documentation

char* bg_plugin_common_s::gettext_domain

First argument for bindtextdomain().

char* bg_plugin_common_s::gettext_directory

Second argument for bindtextdomain().

char* bg_plugin_common_s::name

Unique short name.

char* bg_plugin_common_s::long_name

Humanized name for GUI widgets.

bg_plugin_type_t bg_plugin_common_s::type

Type.

int bg_plugin_common_s::flags

Flags (see defines)

char* bg_plugin_common_s::description

Textual description.

int bg_plugin_common_s::priority

Priority (between 1 and 10).

void*(* bg_plugin_common_s::create)()

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
privThe 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.

const bg_parameter_info_t*(* bg_plugin_common_s::get_parameters)(void *priv)

Get available parameters.

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

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

bg_set_parameter_func_t bg_plugin_common_s::set_parameter

Set configuration parameter (optional)

bg_get_parameter_func_t bg_plugin_common_s::get_parameter

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
deviceThe device as passed to the open() method
nameReturns 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.

bg_device_info_t*(* bg_plugin_common_s::find_devices)()

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: