![]() |
![]() |
![]() |
GUPnP A/V Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
GUPnPDIDLLiteWriter; GUPnPDIDLLiteResource; 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_resource_reset (GUPnPDIDLLiteResource *res); GUPnPDIDLLiteResource* gupnp_didl_lite_resource_copy (const GUPnPDIDLLiteResource *source_res, GUPnPDIDLLiteResource *dest_res); void gupnp_didl_lite_resource_destroy (GUPnPDIDLLiteResource *res); 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;
typedef struct { char *uri; /* Required */ char *import_uri; char *protocol; /* Required */ char *network; char *mime_type; /* Required */ char *dlna_profile; /* Required */ GUPnPDLNAPlaySpeed dlna_play_speed; GUPnPDLNAConversion dlna_conversion; GUPnPDLNAOperation dlna_operation; GUPnPDLNAFlags dlna_flags; /* Stream data */ long size; long duration; int bitrate; int sample_freq; int bits_per_sample; char *protection; /* Audio */ int n_audio_channels; /* Video */ int width; int height; int color_depth; } GUPnPDIDLLiteResource;
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_resource_reset (GUPnPDIDLLiteResource *res);
Resets all fields of res
: strings to NULL and numbers to -1.
|
A GUPnPDIDLLiteResource |
GUPnPDIDLLiteResource* gupnp_didl_lite_resource_copy (const GUPnPDIDLLiteResource *source_res, GUPnPDIDLLiteResource *dest_res);
Makes dest_res
a copy of source_res
. Call
gupnp_didl_lite_resource_destroy on the dest_res
before freeing the
struct itself.
Mainly intended for bindings, avoid using it in applications.
|
The source GUPnPDIDLLiteResource struct pointer |
|
The destincation GUPnPDIDLLiteResource struct pointer |
Returns : |
dest_res .
|
void gupnp_didl_lite_resource_destroy (GUPnPDIDLLiteResource *res);
Frees the string fields of res
.
Mainly intended for bindings, avoid using it in applications.
|
A GUPnPDIDLLiteResource |
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 |