Farsight Reference Manual | ||||
---|---|---|---|---|
FarsightPluginInfo; FarsightPlugin; #define FARSIGHT_INIT_PLUGIN (initfunc, plugininfo) GObject* farsight_plugin_create (const gchar *name, const gchar *type_suffix, FarsightPlugin **pluginptr); const gchar* farsight_plugin_get_name (FarsightPlugin *plugin); const gchar* farsight_plugin_get_description (FarsightPlugin *plugin); const gchar* farsight_plugin_get_version (FarsightPlugin *plugin); const gchar* farsight_plugin_get_author (FarsightPlugin *plugin); const gchar* farsight_plugin_get_homepage (FarsightPlugin *plugin);
typedef struct { guint major_version; /* major version of core that plugin was compiled for */ guint minor_version; /* minor version of core that plugin was compiled for */ gchar *description; /* description of plugin */ gchar *version; /* version of the plugin */ gchar *author; /* author of the plugin */ gchar *homepage; /* homepage of the plugin */ /* callbacks */ /* This function is called when the last instance of the plugin is * unloaded. It can be useful to deallocate resources common for all * instances of the plugin. */ void (*unload) (FarsightPlugin * plugin); /* This function is called to generate a new object of the type used by the plugin */ GObject* (*new) (void); } FarsightPluginInfo;
typedef struct { GTypeModule parent; gchar *name; /* name of the plugin */ FarsightPluginInfo *info; FarsightPluginPrivate *priv; } FarsightPlugin;
GObject* farsight_plugin_create (const gchar *name, const gchar *type_suffix, FarsightPlugin **pluginptr);
Loads the appropriate plugin if necessary and creates a GObject of the requested type
name : |
The name of the plugin to load |
type_suffix : |
The type of plugin to load (normally "session" or "transmitter" |
pluginptr : |
A pointer to the location where a pointer to the FarsightPlugin used can be stored |
Returns : | the created GObject, or NULL if it fails |
const gchar* farsight_plugin_get_name (FarsightPlugin *plugin);
Returns the name of the given plugin plugin.
plugin : |
a FarsightPlugin to get it's name |
Returns : | a string to the name of the plugin, NULL if invalid. |
const gchar* farsight_plugin_get_description (FarsightPlugin *plugin);
Returns the description of the given plugin plugin.
plugin : |
a FarsightPlugin to get it's description |
Returns : | a string containing the description, NULL if invalid. |
const gchar* farsight_plugin_get_version (FarsightPlugin *plugin);
Returns the version of the given plugin plugin.
plugin : |
a FarsightPlugin to get it's version |
Returns : | a string containing the version, NULL if invalid. |
const gchar* farsight_plugin_get_author (FarsightPlugin *plugin);
Returns the author of the given plugin plugin.
plugin : |
a FarsightPlugin to get it's author |
Returns : | a string containing the author, NULL if invalid. |
const gchar* farsight_plugin_get_homepage (FarsightPlugin *plugin);
Returns the homepage of the given plugin plugin.
plugin : |
a FarsightPlugin to get it's homepage |
Returns : | a string containing the homepage, NULL if invalid. |