## RygelPlugin

RygelPlugin — This represents a Rygel plugin.

## Functions

#define | RYGEL_TYPE_PLUGIN
void | rygel_plugin_add_resource ()
void | rygel_plugin_add_icon ()
void | rygel_plugin_apply_hacks ()
RygelPlugin * | rygel_plugin_new ()
RygelPluginCapabilities | rygel_plugin_get_capabilities ()
void | rygel_plugin_set_capabilities ()
const gchar * | rygel_plugin_get_name ()
const gchar * | rygel_plugin_get_title ()
void | rygel_plugin_set_title ()
const gchar * | rygel_plugin_get_description ()
const gchar * | rygel_plugin_get_desc_path ()
gboolean | rygel_plugin_get_active ()
void | rygel_plugin_set_active ()
GeeArrayList * | rygel_plugin_get_resource_infos ()
GeeArrayList * | rygel_plugin_get_icon_infos ()
GeeArrayList * | rygel_plugin_get_default_icons ()

## Properties

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

## Types and Values

struct | RygelPlugin
struct | RygelPluginClass
enum | RygelPluginCapabilities

## Object Hierarchy

        GFlags
        ╰── RygelPluginCapabilities
        GObject
        ╰── GUPnPResourceFactory
            ╰── RygelPlugin

## 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()`.

## Functions

### 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);

#### Parameters

self | the RygelPlugin instance |
resource_info |  |

### rygel_plugin_add_icon ()

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

#### Parameters

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);

#### Parameters

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.

#### Parameters

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.

#### Parameters

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` .

#### Parameters

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.

#### Parameters

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.

#### Parameters

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` .

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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` .

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

self | the RygelPlugin instance to query |

#### Returns

the value of the "default-icons" property

## Types and Values

### 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.

#### Members

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

### enum RygelPluginCapabilities

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

#### Members

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 |  |
RYGEL_PLUGIN_CAPABILITIES_DIAGNOSTICS |  |

## Property Details

### The `“active”` property

      “active”                   gboolean

active.

Flags: Read / Write

Default value: FALSE

### The `“capabilities”` property

      “capabilities”             RygelPluginCapabilities

capabilities.

Flags: Read / Write / Construct

### The `“default-icons”` property

      “default-icons”            GeeArrayList *

default-icons.

Flags: Read

### The `“desc-path”` property

      “desc-path”                gchar *

desc-path.

Flags: Read / Write / Construct Only

Default value: NULL

### The `“description”` property

      “description”              gchar *

description.

Flags: Read / Write / Construct Only

Default value: NULL

### The `“icon-infos”` property

      “icon-infos”               GeeArrayList *

icon-infos.

Flags: Read

### The `“name”` property

      “name”                     gchar *

name.

Flags: Read / Write / Construct Only

Default value: NULL

### The `“resource-infos”` property

      “resource-infos”           GeeArrayList *

resource-infos.

Flags: Read

### The `“title”` property

      “title”                    gchar *

title.

Flags: Read / Write / Construct

Default value: NULL