| GUPnP A/V Reference Manual | ||||
|---|---|---|---|---|
GUPnPDIDLLiteWriter;
GUPnPDIDLLiteWriter* gupnp_didl_lite_writer_new (void);
void gupnp_didl_lite_writer_start_didl_lite
(GUPnPDIDLLiteWriter *writer,
const char *lang,
SoupURI *url_base,
gboolean need_escape);
void gupnp_didl_lite_writer_end_didl_lite
(GUPnPDIDLLiteWriter *writer);
void gupnp_didl_lite_writer_start_container
(GUPnPDIDLLiteWriter *writer,
const char *id,
const char *parent_id,
int child_count,
gboolean restricted,
gboolean searchable);
void gupnp_didl_lite_writer_end_container
(GUPnPDIDLLiteWriter *writer);
void gupnp_didl_lite_writer_start_item (GUPnPDIDLLiteWriter *writer,
const char *id,
const char *parent_id,
const char *ref_id,
gboolean restricted);
void gupnp_didl_lite_writer_end_item (GUPnPDIDLLiteWriter *writer);
void gupnp_didl_lite_writer_add_res (GUPnPDIDLLiteWriter *writer,
GUPnPDIDLLiteResource *res);
void gupnp_didl_lite_writer_add_desc (GUPnPDIDLLiteWriter *writer,
const char *desc,
const char *id,
const char *type,
const char *ns_uri);
void gupnp_didl_lite_writer_add_string (GUPnPDIDLLiteWriter *writer,
const char *property,
const char *prefix,
const char *ns_uri,
const char *value);
void gupnp_didl_lite_writer_add_string_with_attrs
(GUPnPDIDLLiteWriter *writer,
const char *property,
const char *prefix,
const char *ns_uri,
const char *value,
...);
void gupnp_didl_lite_writer_add_string_with_attrs_valist
(GUPnPDIDLLiteWriter *writer,
const char *property,
const char *prefix,
const char *ns_uri,
const char *value,
va_list var_args);
void gupnp_didl_lite_writer_add_boolean (GUPnPDIDLLiteWriter *writer,
const char *property,
const char *prefix,
const char *ns_uri,
gboolean value);
void gupnp_didl_lite_writer_add_int (GUPnPDIDLLiteWriter *writer,
const char *property,
const char *prefix,
const char *ns_uri,
int value);
void gupnp_didl_lite_writer_add_uint (GUPnPDIDLLiteWriter *writer,
const char *property,
const char *prefix,
const char *ns_uri,
guint value);
void gupnp_didl_lite_writer_add_long (GUPnPDIDLLiteWriter *writer,
const char *property,
const char *prefix,
const char *ns_uri,
long value );
const char* gupnp_didl_lite_writer_get_string (GUPnPDIDLLiteWriter *writer);
void gupnp_didl_lite_writer_reset (GUPnPDIDLLiteWriter *writer);
typedef struct {
GObject parent;
GUPnPDIDLLiteWriterPrivate *priv;
} GUPnPDIDLLiteWriter;
GUPnPDIDLLiteWriter* gupnp_didl_lite_writer_new (void);
Returns : |
A new GUPnPDIDLLiteWriter object. |
void gupnp_didl_lite_writer_start_didl_lite
(GUPnPDIDLLiteWriter *writer,
const char *lang,
SoupURI *url_base,
gboolean need_escape);
Starts the DIDL-Lite element.
|
A GUPnPDIDLLiteWriter |
|
The language the DIDL-Lite fragment is in, or NULL |
|
A SoupURI specifying the URI relative to which incoming URI are resolved, or NULL |
|
TRUE to force writer to escape incoming string data
|
void gupnp_didl_lite_writer_end_didl_lite
(GUPnPDIDLLiteWriter *writer);
Closes the DIDL-Lite element.
|
A GUPnPDIDLLiteWriter |
void gupnp_didl_lite_writer_start_container
(GUPnPDIDLLiteWriter *writer,
const char *id,
const char *parent_id,
int child_count,
gboolean restricted,
gboolean searchable);
Starts a new container element.
|
A GUPnPDIDLLiteWriter |
|
The object ID |
|
The parent object ID |
|
The number of children or -1 |
|
TRUE if this container is restricted |
|
TRUE if this container is searchable |
void gupnp_didl_lite_writer_end_container
(GUPnPDIDLLiteWriter *writer);
Closes the current container element.
|
A GUPnPDIDLLiteWriter |
void gupnp_didl_lite_writer_start_item (GUPnPDIDLLiteWriter *writer, const char *id, const char *parent_id, const char *ref_id, gboolean restricted);
Starts a new item element.
|
A GUPnPDIDLLiteWriter |
|
The object ID |
|
The parent object ID |
|
The RefID, or NULL |
|
TRUE if this item is restricted |
void gupnp_didl_lite_writer_end_item (GUPnPDIDLLiteWriter *writer);
Closes the current item element.
|
A GUPnPDIDLLiteWriter |
void gupnp_didl_lite_writer_add_res (GUPnPDIDLLiteWriter *writer, GUPnPDIDLLiteResource *res);
Adds a new res (resource) element with the parameters specified in res.
Note that in order to ignore a numerical field it has to be set to -1.
|
A GUPnPDIDLLiteWriter |
|
A pointer to a GUPnPDIDLLiteResource structure |
void gupnp_didl_lite_writer_add_desc (GUPnPDIDLLiteWriter *writer, const char *desc, const char *id, const char *type, const char *ns_uri);
Adds a new desc (description) element.
|
A GUPnPDIDLLiteWriter |
|
The description text |
|
The object ID |
|
The description type, or NULL |
|
The namespace of (possible) child elements, or NULL |
void gupnp_didl_lite_writer_add_string (GUPnPDIDLLiteWriter *writer, const char *property, const char *prefix, const char *ns_uri, const char *value);
Adds a new string property.
|
A GUPnPDIDLLiteWriter |
|
The property name |
|
The property namespace prefix, or NULL |
|
The namespace URI to be used, or NULL |
|
The property value |
void gupnp_didl_lite_writer_add_string_with_attrs
(GUPnPDIDLLiteWriter *writer,
const char *property,
const char *prefix,
const char *ns_uri,
const char *value,
...);
Adds a new string property with attributes.
|
A GUPnPDIDLLiteWriter |
|
The property name |
|
The property namespace prefix, or NULL |
|
The namespace URI to be used, or NULL |
|
The property value |
|
A NULL terminated list of attribute name-attribute value string pairs. |
void gupnp_didl_lite_writer_add_string_with_attrs_valist
(GUPnPDIDLLiteWriter *writer,
const char *property,
const char *prefix,
const char *ns_uri,
const char *value,
va_list var_args);
Adds a new string property with attributes.
|
A GUPnPDIDLLiteWriter |
|
The property name |
|
The property namespace prefix, or NULL |
|
The namespace URI to be used, or NULL |
|
The property value |
|
A va_list with attribute name-attribute value string pairs |
void gupnp_didl_lite_writer_add_boolean (GUPnPDIDLLiteWriter *writer, const char *property, const char *prefix, const char *ns_uri, gboolean value);
Adds a new boolean property.
|
A GUPnPDIDLLiteWriter |
|
The property name |
|
The property namespace prefix, or NULL |
|
The namespace URI to be used, or NULL |
|
The property value |
void gupnp_didl_lite_writer_add_int (GUPnPDIDLLiteWriter *writer, const char *property, const char *prefix, const char *ns_uri, int value);
Adds a new integer property.
|
A GUPnPDIDLLiteWriter |
|
The property name |
|
The property namespace prefix, or NULL |
|
The namespace URI to be used, or NULL |
|
The property value |
void gupnp_didl_lite_writer_add_uint (GUPnPDIDLLiteWriter *writer, const char *property, const char *prefix, const char *ns_uri, guint value);
Adds a new unsigned integer property.
|
A GUPnPDIDLLiteWriter |
|
The property name |
|
The property namespace prefix, or NULL |
|
The namespace URI to be used, or NULL |
|
The property value |
void gupnp_didl_lite_writer_add_long (GUPnPDIDLLiteWriter *writer, const char *property, const char *prefix, const char *ns_uri, long value );
Adds a new long integer property.
|
A GUPnPDIDLLiteWriter |
|
The property name |
|
The property namespace prefix, or NULL |
|
The namespace URI to be used, or NULL |
|
const char* gupnp_didl_lite_writer_get_string (GUPnPDIDLLiteWriter *writer);
Returns a pointer the generated DIDL-Lite string.
|
A GUPnPDIDLLiteWriter |
Returns : |
The generated DIDL-Lite string. |
void gupnp_didl_lite_writer_reset (GUPnPDIDLLiteWriter *writer);
Resets writer.
|
A GUPnPDIDLLiteWriter |