UPnP AV DIDLLite Object handling

UPnP AV DIDLLite Object handling — Utility functions to deal with DIDL-Lite objects

Synopsis

GList*              gupnp_didl_lite_object_get_property (xmlNode *object_node,
                                                         const char *property_name);
char*               gupnp_didl_lite_property_get_value  (xmlNode *property_node);
char*               gupnp_didl_lite_property_get_attribute
                                                        (xmlNode *property_node,
                                                         const char *attribute);
char*               gupnp_didl_lite_object_get_id       (xmlNode *object_node);
char*               gupnp_didl_lite_object_get_parent_id
                                                        (xmlNode *object_node);
gboolean            gupnp_didl_lite_object_get_restricted
                                                        (xmlNode *object_node);
char*               gupnp_didl_lite_object_get_title    (xmlNode *object_node);
char*               gupnp_didl_lite_object_get_creator  (xmlNode *object_node);
char*               gupnp_didl_lite_object_get_write_status
                                                        (xmlNode *object_node);
char*               gupnp_didl_lite_object_get_upnp_class
                                                        (xmlNode *object_node);
char*               gupnp_didl_lite_object_get_upnp_class_name
                                                        (xmlNode *object_node);
gboolean            gupnp_didl_lite_object_is_container (xmlNode *object_node);
gboolean            gupnp_didl_lite_object_is_item      (xmlNode *object_node);
gboolean            gupnp_didl_lite_container_get_searchable
                                                        (xmlNode *container_node);
guint               gupnp_didl_lite_container_get_child_count
                                                        (xmlNode *container_node);
char*               gupnp_didl_lite_item_get_ref_id     (xmlNode *item_node);

Description

A set of utility functions to ease the handling of DIDL-Lite object nodes. Typically these functions will be used by an application in it's callback function that it passes to gupnp_didl_lite_parser_parse_didl().

Details

gupnp_didl_lite_object_get_property ()

GList*              gupnp_didl_lite_object_get_property (xmlNode *object_node,
                                                         const char *property_name);

Use this function to retreive property nodes by name.

object_node :

The object node

property_name :

name of the property

Returns :

The list of property nodes by the name property_name belonging to object_node, or NULL. g_list_free() the returned list after usage but do not modify the contents.

gupnp_didl_lite_property_get_value ()

char*               gupnp_didl_lite_property_get_value  (xmlNode *property_node);

property_node :

The object property node

Returns :

The value of the property node property_node as a string or NULL. g_free() after usage.

gupnp_didl_lite_property_get_attribute ()

char*               gupnp_didl_lite_property_get_attribute
                                                        (xmlNode *property_node,
                                                         const char *attribute);

Use this function to retreive attributes of object properties.

property_node :

The object property node

attribute :

name of the attribute

Returns :

The value of the attribute attribute of the property node property_node as a string or NULL. g_free() after usage.

gupnp_didl_lite_object_get_id ()

char*               gupnp_didl_lite_object_get_id       (xmlNode *object_node);

object_node :

The object node

Returns :

The ID of the object_node, or NULL. g_free() after usage.

gupnp_didl_lite_object_get_parent_id ()

char*               gupnp_didl_lite_object_get_parent_id
                                                        (xmlNode *object_node);

object_node :

The object node

Returns :

The ID of parent of the object_node, or NULL. g_free() after usage.

gupnp_didl_lite_object_get_restricted ()

gboolean            gupnp_didl_lite_object_get_restricted
                                                        (xmlNode *object_node);

object_node :

The object node

Returns :

TRUE if object_node is restricted.

gupnp_didl_lite_object_get_title ()

char*               gupnp_didl_lite_object_get_title    (xmlNode *object_node);

object_node :

The object node

Returns :

The title of the object_node, or NULL. g_free() after usage.

gupnp_didl_lite_object_get_creator ()

char*               gupnp_didl_lite_object_get_creator  (xmlNode *object_node);

object_node :

The object node

Returns :

The creator of the object_node, or NULL. g_free() after usage.

gupnp_didl_lite_object_get_write_status ()

char*               gupnp_didl_lite_object_get_write_status
                                                        (xmlNode *object_node);

object_node :

The object node

Returns :

The write status of the object_node, or NULL. g_free() after usage.

gupnp_didl_lite_object_get_upnp_class ()

char*               gupnp_didl_lite_object_get_upnp_class
                                                        (xmlNode *object_node);

object_node :

The object node

Returns :

The class of object_node, or NULL. g_free() after usage.

gupnp_didl_lite_object_get_upnp_class_name ()

char*               gupnp_didl_lite_object_get_upnp_class_name
                                                        (xmlNode *object_node);

object_node :

The object node

Returns :

The friendly name of the class of object_node, or NULL. g_free() after usage.

gupnp_didl_lite_object_is_container ()

gboolean            gupnp_didl_lite_object_is_container (xmlNode *object_node);

object_node :

The object node

Returns :

TRUE if object_node is a container

gupnp_didl_lite_object_is_item ()

gboolean            gupnp_didl_lite_object_is_item      (xmlNode *object_node);

object_node :

The object node

Returns :

TRUE if object_node is an item

gupnp_didl_lite_container_get_searchable ()

gboolean            gupnp_didl_lite_container_get_searchable
                                                        (xmlNode *container_node);

container_node :

The container node

Returns :

TRUE if object_node is searchable

gupnp_didl_lite_container_get_child_count ()

guint               gupnp_didl_lite_container_get_child_count
                                                        (xmlNode *container_node);

container_node :

The container node

Returns :

The child count of the container_node.

gupnp_didl_lite_item_get_ref_id ()

char*               gupnp_didl_lite_item_get_ref_id     (xmlNode *item_node);

item_node :

The item node

Returns :

The ref ID of the item, or NULL. g_free() after usage.