PeasExtensionSet

PeasExtensionSet — Proxy for a set of extensions of the same type.

Synopsis

                    PeasExtensionSet;
                    PeasExtensionSetClass;
gboolean            peas_extension_set_call             (PeasExtensionSet *set,
                                                         const gchar *method_name,
                                                         ...);
gboolean            peas_extension_set_call_valist      (PeasExtensionSet *set,
                                                         const gchar *method_name,
                                                         va_list args);
PeasExtensionSet *  peas_extension_set_new              (PeasEngine *engine,
                                                         GType exten_type);

Object Hierarchy

  GObject
   +----PeasExtensionSet

Properties

  "engine"                   PeasEngine*           : Read / Write / Construct Only
  "extension-type"           GType*                : Read / Write / Construct Only

Signals

  "extension-added"                                : Run Last
  "extension-removed"                              : Run Last

Description

A PeasExtensionSet is an object which proxies method calls to a set of actual extensions. The application writer will use these objects in order to call methods on several instances of an actual extension exported by all the currently loaded plugins.

PeasExtensionSet will automatically track loading and unloading of the plugins, and signal appearance and disappearance of new extension instances. You should connect to those signals if you wish to call specific methods on loading or unloading time, as it is typically the case for PeasActivatable extensions.

Details

PeasExtensionSet

typedef struct _PeasExtensionSet PeasExtensionSet;

PeasExtensionSetClass

typedef struct {
  GObjectClass parent_class;

  /* Virtual public methods */
  gboolean   (*call)                      (PeasExtensionSet *set,
                                           const gchar      *method,
                                           va_list           args);

  /* Signals */
  void       (*extension_added)           (PeasExtensionSet *set,
                                           PeasPluginInfo   *info,
                                           PeasExtension    *exten);
  void       (*extension_removed)         (PeasExtensionSet *set,
                                           PeasPluginInfo   *info,
                                           PeasExtension    *exten);
} PeasExtensionSetClass;

peas_extension_set_call ()

gboolean            peas_extension_set_call             (PeasExtensionSet *set,
                                                         const gchar *method_name,
                                                         ...);

Call a method on all the PeasExtension instances contained in set.

set :

A PeasExtensionSet.

method_name :

the name of the method that should be called.

... :

arguments for the method.

Returns :

TRUE on successful call.

peas_extension_set_call_valist ()

gboolean            peas_extension_set_call_valist      (PeasExtensionSet *set,
                                                         const gchar *method_name,
                                                         va_list args);

Call a method on all the PeasExtension instances contained in set.

exten :

A PeasExtensionSet.

method_name :

the name of the method that should be called.

args :

the arguments for the method.

Returns :

TRUE on successful call.

peas_extension_set_new ()

PeasExtensionSet *  peas_extension_set_new              (PeasEngine *engine,
                                                         GType exten_type);

Create an ExtensionSet for all the exten_type extensions defined in the plugins loaded in engine.

engine :

A PeasEngine.

exten_type :

the extension GType.

Property Details

The "engine" property

  "engine"                   PeasEngine*           : Read / Write / Construct Only

The PeasEngine this set is attached to.


The "extension-type" property

  "extension-type"           GType*                : Read / Write / Construct Only

The extension GType managed by this set.

Allowed values: void

Signal Details

The "extension-added" signal

void                user_function                      (PeasExtensionSet *peasextensionset,
                                                        PeasPluginInfo   *arg1,
                                                        PeasExtension    *arg2,
                                                        gpointer          user_data)             : Run Last

The "extension-removed" signal

void                user_function                      (PeasExtensionSet *peasextensionset,
                                                        PeasPluginInfo   *arg1,
                                                        PeasExtension    *arg2,
                                                        gpointer          user_data)             : Run Last

See Also

PeasExtension