WirePlumber Daemon Plugins

WpPlugin

GObject
    ╰──WpObject
        ╰──WpPlugin
            ╰──WpComponentLoader

WpPlugin is a base class for objects that provide functionality to the WirePlumber daemon.

Typically, a plugin is created within a module and then registered to make it available for use by the daemon. The daemon is responsible for calling wp_object_activate on it after all modules have been loaded, the core is connected and the initial discovery of global objects is done.

Being a WpObject subclass, the plugin inherits WpObject's activation system. For most implementations, there is only need for activating one feature, WP_PLUGIN_FEATURE_ENABLED, and this can be done by implementing only enable() and disable(). For more advanced plugins that need to have more features, you may implement directly the functions of WpObjectClass and ignore the ones of WpPluginClass.

Members

parent_instance (WpObject) –
No description available

Class structure

WpPluginClass

Fields
parent_class (WpObjectClass) –
No description available

Methods

wp_plugin_get_name

const gchar*
wp_plugin_get_name (WpPlugin * self)

Parameters:

self

the plugin

Returns

the name of this plugin


wp_plugin_register

wp_plugin_register (WpPlugin * plugin)

Registers the plugin to its associated core, making it available for use

Parameters:

plugin ( [transfer: full])

the plugin


Functions

wp_plugin_find

WpPlugin *
wp_plugin_find (WpCore * core,
                const gchar* plugin_name)

Parameters:

core

the core

plugin_name

the lookup name

Returns ( [transfer: full][nullable])

the plugin matching the lookup name


Properties

name

“name” gchar*

The name of this plugin. Implementations should initialize this in the constructor.

Flags : Read / Write / Construct Only


Virtual Methods

disable

disable (WpPlugin * self)

Disables the plugin. The plugin is required to stop all operations and release all resources associated with it.

Parameters:

self

the plugin


enable

enable (WpPlugin * self,
        WpTransition * transition)

Enables the plugin. The plugin is required to start any operations only when this method is called and not before.

When enabling the plugin is done, you must call wp_object_update_features with WP_PLUGIN_FEATURE_ENABLED marked as activated, or return an error on transition.

Parameters:

self

the plugin

transition

the activation transition


Enumerations

WpPluginFeatures

Flags to be used as WpObjectFeatures for WpPlugin subclasses.

Members
WP_PLUGIN_FEATURE_ENABLED (1) –

enables the plugin


Constants

WP_TYPE_PLUGIN

#define WP_TYPE_PLUGIN (wp_plugin_get_type ())

The WpPlugin GType


The results of the search are