![]() |
![]() |
![]() |
librygel-core Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
DescriptionFileDescriptionFile — Represents a device description document and offers methods for easy manipulation of those. |
#define TYPE_DESCRIPTION_FILE void description_file_set_device_type (DescriptionFile *self
,const gchar *device_type
); void description_file_set_model_name (DescriptionFile *self
,const gchar *model_name
); void description_file_set_model_number (DescriptionFile *self
,const gchar *model_number
); void description_file_set_friendly_name (DescriptionFile *self
,const gchar *friendly_name
); gchar * description_file_get_friendly_name (DescriptionFile *self
); void description_file_modify_service_type (DescriptionFile *self
,const gchar *old_type
,const gchar *new_type
); void description_file_save (DescriptionFile *self
,const gchar *path
,GError **error
); DescriptionFile * description_file_new (const gchar *template
,GError **error
); DescriptionFile * description_file_new_from_xml_document (GUPnPXMLDoc *doc
); struct DescriptionFile;
#define TYPE_DESCRIPTION_FILE (description_file_get_type ())
The type for DescriptionFile.
void description_file_set_device_type (DescriptionFile *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".
|
the DescriptionFile instance |
|
is the current content of serviceType. [in] |
void description_file_set_model_name (DescriptionFile *self
,const gchar *model_name
);
Modify the model name.
Usually the name of the software implementing this device.
|
the DescriptionFile instance |
|
is the new model name. [in] |
void description_file_set_model_number (DescriptionFile *self
,const gchar *model_number
);
Modify the model number.
Usually the version of the software implementing this device.
|
the DescriptionFile instance |
|
is the new model number. [in] |
void description_file_set_friendly_name (DescriptionFile *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
|
the DescriptionFile instance |
|
is the new friendly name of the device. [in] |
gchar * description_file_get_friendly_name (DescriptionFile *self
);
Get the current friendly name of the device.
|
the DescriptionFile instance |
Returns : |
The currenly set friendly name. |
void description_file_modify_service_type (DescriptionFile *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".
|
the DescriptionFile instance |
|
is the current content of serviceType. [in] |
|
is the content serviceType will be set to. [in] |
void description_file_save (DescriptionFile *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.
|
the DescriptionFile instance |
|
is a path to a file. [in] |
|
location to store the error occuring, or NULL to ignore |
DescriptionFile * description_file_new (const gchar *template
,GError **error
);
Constructor to load a description file from disk
|
the path to the description file. [in] |
|
location to store the error occuring, or NULL to ignore |
DescriptionFile * description_file_new_from_xml_document
(GUPnPXMLDoc *doc
);
Constructor which wraps an existing GUPnP.XMLDoc as a description file.
|
is the GUPnP.XMLDoc to wrap. [in] |