Top |
xmlNode *
gupnp_didl_lite_object_get_xml_node (GUPnPDIDLLiteObject *object
);
Get the pointer to object node in XML document.
xmlNsPtr
gupnp_didl_lite_object_get_upnp_namespace
(GUPnPDIDLLiteObject *object
);
Get the pointer to the UPnP namespace registered with the XML document.
xmlNsPtr
gupnp_didl_lite_object_get_dc_namespace
(GUPnPDIDLLiteObject *object
);
Get the pointer to the DublinCore namespace registered with the XML document containing this object.
xmlNsPtr
gupnp_didl_lite_object_get_dlna_namespace
(GUPnPDIDLLiteObject *object
);
Get the pointer to the DLNA metadata namespace registered with the XML document containing this object.
xmlNsPtr
gupnp_didl_lite_object_get_pv_namespace
(GUPnPDIDLLiteObject *object
);
Get the pointer to the PV metadata namespace registered with the XML document containing this object.
GList * gupnp_didl_lite_object_get_properties (GUPnPDIDLLiteObject *object
,const char *name
);
Use this function to retreive property nodes by name.
const char *
gupnp_didl_lite_object_get_id (GUPnPDIDLLiteObject *object
);
Get the ID of the object
.
const char *
gupnp_didl_lite_object_get_parent_id (GUPnPDIDLLiteObject *object
);
Get the ID of the parent of the object
.
gboolean
gupnp_didl_lite_object_get_restricted (GUPnPDIDLLiteObject *object
);
Whether the object
is restricted or not.
const char *
gupnp_didl_lite_object_get_title (GUPnPDIDLLiteObject *object
);
Get the title of the object
.
const char *
gupnp_didl_lite_object_get_creator (GUPnPDIDLLiteObject *object
);
Get the creator of the object
.
const char *
gupnp_didl_lite_object_get_artist (GUPnPDIDLLiteObject *object
);
gupnp_didl_lite_object_get_artist
has been deprecated since version 0.5.3 and should not be used in newly-written code.
Use gupnp_didl_lite_object_get_artists instead.
Get the artist of the object
. If role is not NULL
, it is set to the role
of the artist if available.
const char *
gupnp_didl_lite_object_get_author (GUPnPDIDLLiteObject *object
);
gupnp_didl_lite_object_get_author
has been deprecated since version 0.5.3 and should not be used in newly-written code.
Use gupnp_didl_lite_object_get_authors instead.
Get the author of the object
.
GList *
gupnp_didl_lite_object_get_creators (GUPnPDIDLLiteObject *object
);
Get the creators of the object
.
GList *
gupnp_didl_lite_object_get_artists (GUPnPDIDLLiteObject *object
);
Get the artists of the object
.
GList *
gupnp_didl_lite_object_get_authors (GUPnPDIDLLiteObject *object
);
Get the authors of the object
.
GList *
gupnp_didl_lite_object_get_descriptors
(GUPnPDIDLLiteObject *object
);
Get the descriptors of the object
.
const char *
gupnp_didl_lite_object_get_write_status
(GUPnPDIDLLiteObject *object
);
Get the write status of the object
.
const char *
gupnp_didl_lite_object_get_genre (GUPnPDIDLLiteObject *object
);
Get the genre of the object
.
const char *
gupnp_didl_lite_object_get_upnp_class (GUPnPDIDLLiteObject *object
);
Get the UPnP class of the object
.
const char *
gupnp_didl_lite_object_get_album (GUPnPDIDLLiteObject *object
);
Get the album of the object
.
const char *
gupnp_didl_lite_object_get_album_art (GUPnPDIDLLiteObject *object
);
Get the URI to album art of the object
.
const char *
gupnp_didl_lite_object_get_description
(GUPnPDIDLLiteObject *object
);
Get the description of the object
.
const char *
gupnp_didl_lite_object_get_date (GUPnPDIDLLiteObject *object
);
Get the date of the object
.
int
gupnp_didl_lite_object_get_track_number
(GUPnPDIDLLiteObject *object
);
Get the original track number of the object
.
GUPnPOCMFlags
gupnp_didl_lite_object_get_dlna_managed
(GUPnPDIDLLiteObject *object
);
Get the 'dlna:dlnaManaged' attribute of the object
.
GList *
gupnp_didl_lite_object_get_resources (GUPnPDIDLLiteObject *object
);
Use this function to retreive resources from the object
.
GUPnPDIDLLiteResource * gupnp_didl_lite_object_get_compat_resource (GUPnPDIDLLiteObject *object
,const char *sink_protocol_info
,gboolean lenient
);
Use this function to get a resource from the object
that is compatible with
any of the protocols specified in the sink_protocol_info
. The value of
sink_protocol_info
will typically be acquired from 'Sink' argument of
'GetProtocolInfo' action or 'SinkProtocolInfo' state-variable of a
ConnectionManager service.
If lenient
is TRUE, the first resource in the list is returned instead of
NULL
if none of resources and protocols are found to be compatible.
GUPnPDIDLLiteResource *
gupnp_didl_lite_object_add_resource (GUPnPDIDLLiteObject *object
);
Creates a new resource, attaches it to object
and returns it.
GUPnPDIDLLiteDescriptor *
gupnp_didl_lite_object_add_descriptor (GUPnPDIDLLiteObject *object
);
Creates a new descriptor, attaches it to object
and returns it.
void gupnp_didl_lite_object_set_upnp_class (GUPnPDIDLLiteObject *object
,const char *upnp_class
);
Set the UPnP class of the object
to upnp_class
.
void gupnp_didl_lite_object_set_id (GUPnPDIDLLiteObject *object
,const char *id
);
Set the ID of the object
to id
.
void gupnp_didl_lite_object_set_parent_id (GUPnPDIDLLiteObject *object
,const char *parent_id
);
Set the ID of the parent of the object
to parent_id
.
void gupnp_didl_lite_object_set_restricted (GUPnPDIDLLiteObject *object
,gboolean restricted
);
Set the restricted status of object
to restricted
.
void gupnp_didl_lite_object_set_title (GUPnPDIDLLiteObject *object
,const char *title
);
Set the title of the object
to title
.
void gupnp_didl_lite_object_set_creator (GUPnPDIDLLiteObject *object
,const char *creator
);
Set the creator of the object
to creator
.
void gupnp_didl_lite_object_set_artist (GUPnPDIDLLiteObject *object
,const char *artist
);
gupnp_didl_lite_object_set_artist
has been deprecated since version 0.5.3 and should not be used in newly-written code.
Use gupnp_didl_lite_object_add_artist instead.
Set the Artist of the object
to artist
.
void gupnp_didl_lite_object_set_author (GUPnPDIDLLiteObject *object
,const char *author
);
gupnp_didl_lite_object_set_author
has been deprecated since version 0.5.3 and should not be used in newly-written code.
Use gupnp_didl_lite_object_add_author instead.
Set the Author of the object
to author
.
GUPnPDIDLLiteContributor *
gupnp_didl_lite_object_add_creator (GUPnPDIDLLiteObject *object
);
Add a new creator node to the object
and return the associated
GUPnPDIDLLiteContributor object.
GUPnPDIDLLiteContributor *
gupnp_didl_lite_object_add_artist (GUPnPDIDLLiteObject *object
);
Add a new Artist node to the object
and return the associated
GUPnPDIDLLiteContributor object.
GUPnPDIDLLiteContributor *
gupnp_didl_lite_object_add_author (GUPnPDIDLLiteObject *object
);
Add a new author node to the object
and return the associated
GUPnPDIDLLiteContributor object.
void gupnp_didl_lite_object_set_genre (GUPnPDIDLLiteObject *object
,const char *genre
);
Set the genre of the object
to genre
.
void gupnp_didl_lite_object_set_write_status (GUPnPDIDLLiteObject *object
,const char *write_status
);
Set the write status of the object
to write_status
.
void gupnp_didl_lite_object_set_album (GUPnPDIDLLiteObject *object
,const char *album
);
Set the album of the object
to album
.
void gupnp_didl_lite_object_set_album_art (GUPnPDIDLLiteObject *object
,const char *album_art
);
Set the URI to album art of the object
to album_art
.
void gupnp_didl_lite_object_set_description (GUPnPDIDLLiteObject *object
,const char *description
);
Set the description of the object
to description
.
void gupnp_didl_lite_object_set_date (GUPnPDIDLLiteObject *object
,const char *date
);
Set the date of the object
to date
.
void gupnp_didl_lite_object_set_track_number (GUPnPDIDLLiteObject *object
,int track_number
);
Set the original track number of the object
to track_number
.
void gupnp_didl_lite_object_set_dlna_managed (GUPnPDIDLLiteObject *object
,GUPnPOCMFlags dlna_managed
);
Set the 'dlna:dlnaManaged' attribute of the object
to dlna_managed
.
GUPnPDIDLLiteFragmentResult gupnp_didl_lite_object_apply_fragments (GUPnPDIDLLiteObject *object
,gchar **current_fragments
,gint current_size
,gchar **new_fragments
,gint new_size
);
Updates object by applying new_fragments
in places of
current_fragments
. For current_size
and new_size
-1 can be
passed when respectively current_fragments
and new_fragments
are
NULL terminated.
char *
gupnp_didl_lite_object_get_album_xml_string
(GUPnPDIDLLiteObject *object
);
Creates a string representation of the DIDL-Lite XML fragment related to the object album.
char *
gupnp_didl_lite_object_get_artists_xml_string
(GUPnPDIDLLiteObject *object
);
Creates a string representation of the DIDL-Lite XML fragments related to the object artists.
char *
gupnp_didl_lite_object_get_date_xml_string
(GUPnPDIDLLiteObject *object
);
Creates a string representation of the DIDL-Lite XML fragment related to the object date.
char *
gupnp_didl_lite_object_get_title_xml_string
(GUPnPDIDLLiteObject *object
);
Creates a string representation of the DIDL-Lite XML fragment related to the object title.
char *
gupnp_didl_lite_object_get_track_number_xml_string
(GUPnPDIDLLiteObject *object
);
Creates a string representation of the DIDL-Lite XML fragment related to the object track number.
guint
gupnp_didl_lite_object_get_update_id (GUPnPDIDLLiteObject *object
);
Get the update ID of the object
.
char *
gupnp_didl_lite_object_get_upnp_class_xml_string
(GUPnPDIDLLiteObject *object
);
Creates a string representation of the DIDL-Lite XML fragment related to the object UPnP class.
char *
gupnp_didl_lite_object_get_xml_string (GUPnPDIDLLiteObject *object
);
Get the representation of this object as an XML string.
void gupnp_didl_lite_object_set_update_id (GUPnPDIDLLiteObject *object
,guint update_id
);
Set the update ID of the object
.
void
gupnp_didl_lite_object_unset_artists (GUPnPDIDLLiteObject *object
);
Unset the artists properties of the object
.
void
gupnp_didl_lite_object_unset_update_id
(GUPnPDIDLLiteObject *object
);
Unset the update ID property of the object
.
gboolean
gupnp_didl_lite_object_update_id_is_set
(GUPnPDIDLLiteObject *object
);
Get whether the update ID of the object
is set.
gboolean
gupnp_didl_lite_object_is_restricted_set
(GUPnPDIDLLiteObject *object
);
Whehter the restricted attribute exists on object
The DLNA OCM flags supported by a DIDL-Lite Object. For details on these flags please refer to section 7.3.118.4 of DLNA Networked Device Interoperability Guidelines Volume 1, October 2006.
Possible return values of the gupnp_didl_lite_object_apply_fragments()
call.
Operation succeeded. |
||
Current set of fragments is bad XML |
||
New set of fragments is bad XML |
||
Current set of fragments is invalid |
||
New set of fragments is invalid |
||
Trying to remove a required tag |
||
Trying to modify or remove a read-only tag |
||
Length of the two fragment sets does not match |
||
General error sink if none of the others applies. |