EthosPlugin

EthosPlugin — plugin base class

Synopsis

#define             ETHOS_PLUGIN_CONST                  (obj)
struct              EthosPlugin;
struct              EthosPluginClass;
void                ethos_plugin_activate               (EthosPlugin *plugin);
void                ethos_plugin_deactivate             (EthosPlugin *plugin);

Object Hierarchy

  GObject
   +----EthosPlugin

Signals

  "activated"                                      : Run First
  "deactivated"                                    : Run First

Description

The EthosPlugin class is a base class that can be inherited to create plugins. It can also be instantiated directly and have signals attached to build a plugin during runtime.

Plugins should inherit this class within their module.

Details

ETHOS_PLUGIN_CONST()

#define ETHOS_PLUGIN_CONST(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), ETHOS_TYPE_PLUGIN, EthosPlugin const))


struct EthosPlugin

struct EthosPlugin;


struct EthosPluginClass

struct EthosPluginClass {
	GObjectClass parent_class;

	void (*activated)   (EthosPlugin *plugin);
	void (*deactivated) (EthosPlugin *plugin);

	void (*reserved1)   (void);
	void (*reserved2)   (void);
	void (*reserved3)   (void);
	void (*reserved4)   (void);
};


ethos_plugin_activate ()

void                ethos_plugin_activate               (EthosPlugin *plugin);

Activates the plugin so that it may prepare itself for execution.

plugin :

An EthosPlugin

ethos_plugin_deactivate ()

void                ethos_plugin_deactivate             (EthosPlugin *plugin);

Requests the plugin to deactivate itself so that it may be destroyed.

plugin :

An EthosPlugin

Signal Details

The "activated" signal

void                user_function                      (EthosPlugin *plugin,
                                                        gpointer     user_data)      : Run First

Signal emitted when the plugin has been activated by the EthosManager for the process.

plugin :

the EthosPlugin instance

user_data :

user data set when the signal handler was connected.

The "deactivated" signal

void                user_function                      (EthosPlugin *plugin,
                                                        gpointer     user_data)      : Run First

Signal emitted when the plugin has been deactivated by the EthosManager for the process.

plugin :

the EthosPlugin instance

user_data :

user data set when the signal handler was connected.