FarsightSession

FarsightSession —

Synopsis




            FarsightPluginInfo;
struct      FarsightPlugin;
#define     FARSIGHT_INIT_PLUGIN            (initfunc, plugininfo)
FarsightPlugin* farsight_plugin_load        (const gchar *name);
gboolean    farsight_plugin_unload          (FarsightPlugin *plugin);
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);

Description

Details

FarsightPluginInfo

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 first instance of the plugin is
   * created. It can be useful to allocate resources common for all
   * instances of the plugin. If all instances of the plugin are unloaded
   * and then the plugin is loaded again, this function will be called. */
  void (*load) (FarsightPlugin * plugin);
  /* 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);
} FarsightPluginInfo;


struct FarsightPlugin

struct FarsightPlugin {
  FarsightPluginInfo *info;
  GType type;
  GModule *handle;
  gchar *name;
  guint ref_count;
};


FARSIGHT_INIT_PLUGIN()

#define     FARSIGHT_INIT_PLUGIN(initfunc, plugininfo)

initfunc :
plugininfo :

farsight_plugin_load ()

FarsightPlugin* farsight_plugin_load        (const gchar *name);

name :
Returns :

farsight_plugin_unload ()

gboolean    farsight_plugin_unload          (FarsightPlugin *plugin);

plugin :
Returns :

farsight_plugin_get_name ()

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.

farsight_plugin_get_description ()

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.

farsight_plugin_get_version ()

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.

farsight_plugin_get_author ()

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.

farsight_plugin_get_homepage ()

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.