## RygelPlugin

RygelPlugin — This represents a Rygel plugin.

## Synopsis

    #define             RYGEL_TYPE_PLUGIN
    void                rygel_plugin_add_resource           (RygelPlugin *self,
                                                             RygelResourceInfo *resource_info);
    void                rygel_plugin_add_icon               (RygelPlugin *self,
                                                             RygelIconInfo *icon_info);
    void                rygel_plugin_apply_hacks            (RygelPlugin *self,
                                                             RygelRootDevice *device,
                                                             const gchar *description_path,
                                                             GError **error);
    RygelPlugin *       rygel_plugin_new                    (const gchar *desc_path,
                                                             const gchar *name,
                                                             const gchar *title,
                                                             const gchar *description,
                                                             RygelPluginCapabilities capabilities);
    RygelPluginCapabilities rygel_plugin_get_capabilities   (RygelPlugin *self);
    void                rygel_plugin_set_capabilities       (RygelPlugin *self,
                                                             RygelPluginCapabilities value);
    const gchar *       rygel_plugin_get_name               (RygelPlugin *self);
    const gchar *       rygel_plugin_get_title              (RygelPlugin *self);
    void                rygel_plugin_set_title              (RygelPlugin *self,
                                                             const gchar *value);
    const gchar *       rygel_plugin_get_description        (RygelPlugin *self);
    const gchar *       rygel_plugin_get_desc_path          (RygelPlugin *self);
    gboolean            rygel_plugin_get_active             (RygelPlugin *self);
    void                rygel_plugin_set_active             (RygelPlugin *self,
                                                             gboolean value);
    GeeArrayList *      rygel_plugin_get_resource_infos     (RygelPlugin *self);
    GeeArrayList *      rygel_plugin_get_icon_infos         (RygelPlugin *self);
    GeeArrayList *      rygel_plugin_get_default_icons      (RygelPlugin *self);
    struct              RygelPlugin;
    struct              RygelPluginClass;
    enum                RygelPluginCapabilities;

## Object Hierarchy

      GObject
       +----GUPnPResourceFactory
             +----RygelPlugin

      GFlags
       +----RygelPluginCapabilities

## Properties

      "active"                   gboolean              : Read / Write
      "capabilities"             RygelPluginCapabilities  : Read / Write / Construct
      "default-icons"            GeeArrayList*         : Read
      "desc-path"                gchar*                : Read / Write / Construct Only
      "description"              gchar*                : Read / Write / Construct Only
      "icon-infos"               GeeArrayList*         : Read
      "name"                     gchar*                : Read / Write / Construct Only
      "resource-infos"           GeeArrayList*         : Read
      "title"                    gchar*                : Read / Write / Construct

## Description

Plugin libraries should provide an object of this class or a subclass in their `module_init()` function.

It is generally convenient to derive from RygelMediaRendererPlugin from librygel-renderer, or from RygelMediaServerPlugin from librygel-server.

Plugins may change their behaviour based on their configuration. See `rygel_meta_config_get_default()`.

## Details

### RYGEL_TYPE_PLUGIN

    #define RYGEL_TYPE_PLUGIN (rygel_plugin_get_type ())

The type for RygelPlugin.

### rygel_plugin_add_resource ()

    void                rygel_plugin_add_resource           (RygelPlugin *self,
                                                             RygelResourceInfo *resource_info);

`self` : | the RygelPlugin instance
`resource_info` : |

### rygel_plugin_add_icon ()

    void                rygel_plugin_add_icon               (RygelPlugin *self,
                                                             RygelIconInfo *icon_info);

`self` : | the RygelPlugin instance
`icon_info` : |

### rygel_plugin_apply_hacks ()

    void                rygel_plugin_apply_hacks            (RygelPlugin *self,
                                                             RygelRootDevice *device,
                                                             const gchar *description_path,
                                                             GError **error);

`self` : | the RygelPlugin instance
`device` : |
`description_path` : |
`error` : | location to store the error occuring, or `NULL` to ignore

### rygel_plugin_new ()

    RygelPlugin *       rygel_plugin_new                    (const gchar *desc_path,
                                                             const gchar *name,
                                                             const gchar *title,
                                                             const gchar *description,
                                                             RygelPluginCapabilities capabilities);

Create an instance of the plugin.

`desc_path` : | . The path of a template file for an XML description of the UPnP service. [in]
`name` : | . The non-human-readable name for the plugin and its service, used in UPnP messages and in the Rygel configuration file. [in]
`title` : | . An optional human-readable name (friendlyName) of the UPnP service provided by the plugin. If the title is empty then the name will be used. [in][allow-none]
`description` : | . An optional human-readable description (modelDescription) of the UPnP service provided by the plugin. [in][allow-none]
`capabilities` : |

### rygel_plugin_get_capabilities ()

    RygelPluginCapabilities rygel_plugin_get_capabilities   (RygelPlugin *self);

Get and return the current value of the "capabilities" property.

`self` : | the RygelPlugin instance to query
Returns : | the value of the "capabilities" property

### rygel_plugin_set_capabilities ()

    void                rygel_plugin_set_capabilities       (RygelPlugin *self,
                                                             RygelPluginCapabilities value);

Set the value of the "capabilities" property to `value`.

`self` : | the RygelPlugin instance to modify
`value` : | the new value of the "capabilities" property

### rygel_plugin_get_name ()

    const gchar *       rygel_plugin_get_name               (RygelPlugin *self);

Get and return the current value of the "name" property.

`self` : | the RygelPlugin instance to query
Returns : | the value of the "name" property

### rygel_plugin_get_title ()

    const gchar *       rygel_plugin_get_title              (RygelPlugin *self);

Get and return the current value of the "title" property.

`self` : | the RygelPlugin instance to query
Returns : | the value of the "title" property

### rygel_plugin_set_title ()

    void                rygel_plugin_set_title              (RygelPlugin *self,
                                                             const gchar *value);

Set the value of the "title" property to `value`.

`self` : | the RygelPlugin instance to modify
`value` : | the new value of the "title" property

### rygel_plugin_get_description ()

    const gchar *       rygel_plugin_get_description        (RygelPlugin *self);

Get and return the current value of the "description" property.

`self` : | the RygelPlugin instance to query
Returns : | the value of the "description" property

### rygel_plugin_get_desc_path ()

    const gchar *       rygel_plugin_get_desc_path          (RygelPlugin *self);

Get and return the current value of the "desc-path" property.

`self` : | the RygelPlugin instance to query
Returns : | the value of the "desc-path" property

### rygel_plugin_get_active ()

    gboolean            rygel_plugin_get_active             (RygelPlugin *self);

Get and return the current value of the "active" property.

`self` : | the RygelPlugin instance to query
Returns : | the value of the "active" property

### rygel_plugin_set_active ()

    void                rygel_plugin_set_active             (RygelPlugin *self,
                                                             gboolean value);

Set the value of the "active" property to `value`.

`self` : | the RygelPlugin instance to modify
`value` : | the new value of the "active" property

### rygel_plugin_get_resource_infos ()

    GeeArrayList *      rygel_plugin_get_resource_infos     (RygelPlugin *self);

Get and return the current value of the "resource-infos" property.

`self` : | the RygelPlugin instance to query
Returns : | the value of the "resource-infos" property

### rygel_plugin_get_icon_infos ()

    GeeArrayList *      rygel_plugin_get_icon_infos         (RygelPlugin *self);

Get and return the current value of the "icon-infos" property.

`self` : | the RygelPlugin instance to query
Returns : | the value of the "icon-infos" property

### rygel_plugin_get_default_icons ()

    GeeArrayList *      rygel_plugin_get_default_icons      (RygelPlugin *self);

Get and return the current value of the "default-icons" property.

`self` : | the RygelPlugin instance to query
Returns : | the value of the "default-icons" property

### struct RygelPlugin

    struct RygelPlugin;

This represents a Rygel plugin.

Plugin libraries should provide an object of this class or a subclass in their `module_init()` function.

It is generally convenient to derive from RygelMediaRendererPlugin from librygel-renderer, or from RygelMediaServerPlugin from librygel-server.

Plugins may change their behaviour based on their configuration. See `rygel_meta_config_get_default()`.

### struct RygelPluginClass

    struct RygelPluginClass {
    	GUPnPResourceFactoryClass parent_class;
    	void (*apply_hacks) (RygelPlugin* self, RygelRootDevice* device, const gchar* description_path, GError** error);
    };

The class structure for `RYGEL_TYPE_PLUGIN`. All the fields in this structure are private and should never be accessed directly.

GUPnPResourceFactoryClass `parent_class`; | the parent class structure
`apply_hacks` () | virtual method called by `rygel_plugin_apply_hacks()`

### enum RygelPluginCapabilities

    typedef enum {
    	RYGEL_PLUGIN_CAPABILITIES_NONE = 0,
    	RYGEL_PLUGIN_CAPABILITIES_IMAGE_UPLOAD = 1 << 0,
    	RYGEL_PLUGIN_CAPABILITIES_VIDEO_UPLOAD = 1 << 1,
    	RYGEL_PLUGIN_CAPABILITIES_AUDIO_UPLOAD = 1 << 2,
    	RYGEL_PLUGIN_CAPABILITIES_UPLOAD = (RYGEL_PLUGIN_CAPABILITIES_IMAGE_UPLOAD | RYGEL_PLUGIN_CAPABILITIES_VIDEO_UPLOAD) | RYGEL_PLUGIN_CAPABILITIES_AUDIO_UPLOAD,
    	RYGEL_PLUGIN_CAPABILITIES_TRACK_CHANGES = 1 << 3,
    	RYGEL_PLUGIN_CAPABILITIES_CREATE_CONTAINERS = 1 << 4
    } RygelPluginCapabilities;

RygelPluginCapabilities is a set of flags that represent various capabilities of plugins.

`RYGEL_PLUGIN_CAPABILITIES_NONE` |
`RYGEL_PLUGIN_CAPABILITIES_IMAGE_UPLOAD` |
`RYGEL_PLUGIN_CAPABILITIES_VIDEO_UPLOAD` |
`RYGEL_PLUGIN_CAPABILITIES_AUDIO_UPLOAD` |
`RYGEL_PLUGIN_CAPABILITIES_UPLOAD` |
`RYGEL_PLUGIN_CAPABILITIES_TRACK_CHANGES` |
`RYGEL_PLUGIN_CAPABILITIES_CREATE_CONTAINERS` |

## Property Details

### The `"active"` property

      "active"                   gboolean              : Read / Write

active.

Default value: FALSE

### The `"capabilities"` property

      "capabilities"             RygelPluginCapabilities  : Read / Write / Construct

capabilities.

### The `"default-icons"` property

      "default-icons"            GeeArrayList*         : Read

default-icons.

### The `"desc-path"` property

      "desc-path"                gchar*                : Read / Write / Construct Only

desc-path.

Default value: NULL

### The `"description"` property

      "description"              gchar*                : Read / Write / Construct Only

description.

Default value: NULL

### The `"icon-infos"` property

      "icon-infos"               GeeArrayList*         : Read

icon-infos.

### The `"name"` property

      "name"                     gchar*                : Read / Write / Construct Only

name.

Default value: NULL

### The `"resource-infos"` property

      "resource-infos"           GeeArrayList*         : Read

resource-infos.

### The `"title"` property

      "title"                    gchar*                : Read / Write / Construct

title.

Default value: NULL