RygelDescriptionFile

RygelDescriptionFile — Represents a device description document and offers methods for easy manipulation of those.

Object Hierarchy

    GObject
    ╰── RygelDescriptionFile

Description

Functions

rygel_description_file_set_device_type ()

void
rygel_description_file_set_device_type
                               (RygelDescriptionFile *self,
                                const gchar *device_type);

Change the type of a service.

Usually used to modify the device version, e.g. default device type is "MediaServer:2" and device_type = "MediaServer:1".

Parameters

self

the RygelDescriptionFile instance

 

device_type

 .

is the current content of serviceType.

.

[in]

rygel_description_file_set_model_description ()

void
rygel_description_file_set_model_description
                               (RygelDescriptionFile *self,
                                const gchar *model_description);

Modify the model description.

A longer user friendly description of the device.

Parameters

self

the RygelDescriptionFile instance

 

model_description

 .

is the new model description.

.

[in]

rygel_description_file_set_model_name ()

void
rygel_description_file_set_model_name (RygelDescriptionFile *self,
                                       const gchar *model_name);

Modify the model name.

Usually the name of the software implementing this device.

Parameters

self

the RygelDescriptionFile instance

 

model_name

 .

is the new model name.

.

[in]

rygel_description_file_set_model_number ()

void
rygel_description_file_set_model_number
                               (RygelDescriptionFile *self,
                                const gchar *model_number);

Modify the model number.

Usually the version of the software implementing this device.

Parameters

self

the RygelDescriptionFile instance

 

model_number

 .

is the new model number.

.

[in]

rygel_description_file_set_friendly_name ()

void
rygel_description_file_set_friendly_name
                               (RygelDescriptionFile *self,
                                const gchar *friendly_name);

Set the friendly name of the device.

The friendly name is the one usually presented to the user in control points or DMPs

Parameters

self

the RygelDescriptionFile instance

 

friendly_name

 .

is the new friendly name of the device.

.

[in]

rygel_description_file_get_friendly_name ()

gchar *
rygel_description_file_get_friendly_name
                               (RygelDescriptionFile *self);

Get the current friendly name of the device.

Parameters

self

the RygelDescriptionFile instance

 

Returns

The currenly set friendly name.


rygel_description_file_set_udn ()

void
rygel_description_file_set_udn (RygelDescriptionFile *self,
                                const gchar *udn);

Set the Unique Device Name of the device.

Unique Device Name is the UUID of this particular device instance.

Parameters

self

the RygelDescriptionFile instance

 

udn

 .

is the Unique Device Name of the device.

.

[in]

rygel_description_file_get_udn ()

gchar *
rygel_description_file_get_udn (RygelDescriptionFile *self);

Get the current UDN of the device.

Parameters

self

the RygelDescriptionFile instance

 

Returns

The currenly set UDN.


rygel_description_file_set_serial_number ()

void
rygel_description_file_set_serial_number
                               (RygelDescriptionFile *self,
                                const gchar *serial);

Set the Serial number of the device.

Parameters

self

the RygelDescriptionFile instance

 

serial

 .

is the Unique Device Name of the device.

.

[in]

rygel_description_file_set_dlna_caps ()

void
rygel_description_file_set_dlna_caps (RygelDescriptionFile *self,
                                      RygelPluginCapabilities capabilities);

Set the DLNA caps of this root device and while taking the capabilities of the plugin into account.

Parameters

self

the RygelDescriptionFile instance

 

capabilities

 .

RygelPluginCapabilities flags

.

[in]

rygel_description_file_clear_service_list ()

void
rygel_description_file_clear_service_list
                               (RygelDescriptionFile *self);

Parameters

self

the RygelDescriptionFile instance

 

rygel_description_file_add_dlna_doc_element ()

void
rygel_description_file_add_dlna_doc_element
                               (RygelDescriptionFile *self,
                                const gchar *dlnadoc_xpath,
                                const gchar *dlnadoc_non_xpath,
                                const gchar *dev_cap);

Parameters

self

the RygelDescriptionFile instance

 

dlnadoc_xpath

 

 

dlnadoc_non_xpath

 

 

dev_cap

 

 

rygel_description_file_remove_dlna_doc_element ()

void
rygel_description_file_remove_dlna_doc_element
                               (RygelDescriptionFile *self,
                                const gchar *dlnadoc_xpath);

Parameters

self

the RygelDescriptionFile instance

 

dlnadoc_xpath

 

 

rygel_description_file_add_service ()

void
rygel_description_file_add_service (RygelDescriptionFile *self,
                                    const gchar *device_name,
                                    RygelResourceInfo *resource_info);

Parameters

self

the RygelDescriptionFile instance

 

device_name

 

 

resource_info

 

 

rygel_description_file_clear_icon_list ()

void
rygel_description_file_clear_icon_list
                               (RygelDescriptionFile *self);

Parameters

self

the RygelDescriptionFile instance

 

rygel_description_file_add_icon ()

void
rygel_description_file_add_icon (RygelDescriptionFile *self,
                                 const gchar *device_name,
                                 RygelIconInfo *icon_info,
                                 const gchar *url);

Parameters

self

the RygelDescriptionFile instance

 

device_name

 

 

icon_info

 

 

url

 

 

rygel_description_file_modify_service_type ()

void
rygel_description_file_modify_service_type
                               (RygelDescriptionFile *self,
                                const gchar *old_type,
                                const gchar *new_type);

Change the type of a service.

Usually used to modify the service version, e.g. old_type = "ContentDirectory:2" and new_type = "ContentDirectory:1".

Parameters

self

the RygelDescriptionFile instance

 

old_type

 .

is the current content of serviceType.

.

[in]

new_type

 .

is the content serviceType will be set to.

.

[in]

rygel_description_file_save ()

void
rygel_description_file_save (RygelDescriptionFile *self,
                             const gchar *path,
                             GError **error);

Writes the current document to a file.

It makes sure that the resulting file has the correct UTF-8 encoding and does not have any kind of newlines. This is necessary as some devices with broken XML parsers can't cope with UNIX newlines. If a file with the same name exists it will be overwritten.

GError will be returned in error

if anything fails while creating the XML dump.

Parameters

self

the RygelDescriptionFile instance

 

path

 .

is a path to a file.

.

[in]

error

location to store the error occuring, or NULL to ignore

 

rygel_description_file_new ()

RygelDescriptionFile *
rygel_description_file_new (const gchar *template_file,
                            GError **error);

Constructor to load a description file from disk

GUPNP_XML_ERROR_PARSE will be returned in error

if there was an error reading or parsing the file.

Parameters

template_file

 .

the path to the description file.

.

[in]

error

location to store the error occuring, or NULL to ignore

 

rygel_description_file_new_from_xml_document ()

RygelDescriptionFile *
rygel_description_file_new_from_xml_document
                               (GUPnPXMLDoc *doc);

Constructor which wraps an existing GUPnP.XMLDoc as a description file.

Parameters

doc

 .

is the GUPnP.XMLDoc to wrap.

.

[in]

Types and Values

RYGEL_TYPE_DESCRIPTION_FILE

#define RYGEL_TYPE_DESCRIPTION_FILE (rygel_description_file_get_type ())

The type for RygelDescriptionFile.


struct RygelDescriptionFile

struct RygelDescriptionFile;

Represents a device description document and offers methods for easy manipulation of those.


struct RygelDescriptionFileClass

struct RygelDescriptionFileClass {
	GObjectClass parent_class;
};

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

Members