![]() |
![]() |
![]() |
librygel-core Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
RygelDescriptionFileRygelDescriptionFile — Represents a device description document and offers methods for easy manipulation of those. |
#define RYGEL_TYPE_DESCRIPTION_FILE void rygel_description_file_set_device_type (RygelDescriptionFile *self
,const gchar *device_type
); void rygel_description_file_set_model_name (RygelDescriptionFile *self
,const gchar *model_name
); void rygel_description_file_set_model_number (RygelDescriptionFile *self
,const gchar *model_number
); void rygel_description_file_set_friendly_name (RygelDescriptionFile *self
,const gchar *friendly_name
); gchar * rygel_description_file_get_friendly_name (RygelDescriptionFile *self
); void rygel_description_file_set_dlna_caps (RygelDescriptionFile *self
,RygelPluginCapabilities capabilities
); void rygel_description_file_modify_service_type (RygelDescriptionFile *self
,const gchar *old_type
,const gchar *new_type
); void rygel_description_file_save (RygelDescriptionFile *self
,const gchar *path
,GError **error
); RygelDescriptionFile * rygel_description_file_new (const gchar *template_file
,GError **error
); RygelDescriptionFile * rygel_description_file_new_from_xml_document (GUPnPXMLDoc *doc
); struct RygelDescriptionFile; struct RygelDescriptionFileClass;
#define RYGEL_TYPE_DESCRIPTION_FILE (rygel_description_file_get_type ())
The type for RygelDescriptionFile.
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".
|
the RygelDescriptionFile instance |
|
is the current content of serviceType. [in] |
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.
|
the RygelDescriptionFile instance |
|
is the new model name. [in] |
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.
|
the RygelDescriptionFile instance |
|
is the new model number. [in] |
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
|
the RygelDescriptionFile instance |
|
is the new friendly name of the device. [in] |
gchar * rygel_description_file_get_friendly_name
(RygelDescriptionFile *self
);
Get the current friendly name of the device.
|
the RygelDescriptionFile instance |
Returns : |
The currenly set friendly name. |
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.
|
the RygelDescriptionFile instance |
|
RygelPluginCapabilities flags. [in] |
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".
|
the RygelDescriptionFile instance |
|
is the current content of serviceType. [in] |
|
is the content serviceType will be set to. [in] |
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.
|
the RygelDescriptionFile instance |
|
is a path to a file. [in] |
|
location to store the error occuring, or NULL to ignore |
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.
|
the path to the description file. [in] |
|
location to store the error occuring, or NULL to ignore |
RygelDescriptionFile * rygel_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] |
struct RygelDescriptionFile;
Represents a device description document and offers methods for easy manipulation of those.
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.