GUPnPDIDLLiteWriter

## GUPnPDIDLLiteWriter GUPnPDIDLLiteWriter — DIDL-Lite fragment writer |

## Synopsis

                        GUPnPDIDLLiteWriter;
    GUPnPDIDLLiteWriter * gupnp_didl_lite_writer_new        (const char *language);
    GUPnPDIDLLiteItem * gupnp_didl_lite_writer_add_item     (GUPnPDIDLLiteWriter *writer);
    GUPnPDIDLLiteContainer * gupnp_didl_lite_writer_add_container
                                                            (GUPnPDIDLLiteWriter *writer);
    GUPnPDIDLLiteDescriptor * gupnp_didl_lite_writer_add_descriptor
                                                            (GUPnPDIDLLiteWriter *writer);
    xmlNode *           gupnp_didl_lite_writer_get_xml_node (GUPnPDIDLLiteWriter *writer);
    char *              gupnp_didl_lite_writer_get_string   (GUPnPDIDLLiteWriter *writer);
    const char *        gupnp_didl_lite_writer_get_language (GUPnPDIDLLiteWriter *writer);
    void                gupnp_didl_lite_writer_filter       (GUPnPDIDLLiteWriter *writer,
                                                             const char *filter);

## Object Hierarchy

      GObject
       +----GUPnPDIDLLiteWriter

## Properties

      "language"                 gchar*                : Read / Write / Construct Only
      "xml-node"                 gpointer              : Read

## Description

GUPnPDIDLLiteWriter is a helper class for writing DIDL-Lite fragments.

## Details

### GUPnPDIDLLiteWriter

    typedef struct _GUPnPDIDLLiteWriter GUPnPDIDLLiteWriter;

### gupnp_didl_lite_writer_new ()

    GUPnPDIDLLiteWriter * gupnp_didl_lite_writer_new        (const char *language);

`language` : | The language the DIDL-Lite fragment is in, or NULL
Returns : | A new GUPnPDIDLLiteWriter object.

### gupnp_didl_lite_writer_add_item ()

    GUPnPDIDLLiteItem * gupnp_didl_lite_writer_add_item     (GUPnPDIDLLiteWriter *writer);

Creates a new item, attaches it to `writer` and returns it.

`writer` : | A GUPnPDIDLLiteWriter
Returns : | A new GUPnPDIDLLiteItem object. Unref after usage. [transfer full]

### gupnp_didl_lite_writer_add_container ()

    GUPnPDIDLLiteContainer * gupnp_didl_lite_writer_add_container
                                                            (GUPnPDIDLLiteWriter *writer);

Creates a new container, attaches it to `writer` and returns it.

`writer` : | A GUPnPDIDLLiteWriter
Returns : | A new GUPnPDIDLLiteContainer object. Unref after usage. [transfer full]

### gupnp_didl_lite_writer_add_descriptor ()

    GUPnPDIDLLiteDescriptor * gupnp_didl_lite_writer_add_descriptor
                                                            (GUPnPDIDLLiteWriter *writer);

Creates a new descriptor, attaches it to `object` and returns it.

`writer` : | A GUPnPDIDLLiteWriter
Returns : | A new GUPnPDIDLLiteDescriptor object. Unref after usage. [transfer full]

### gupnp_didl_lite_writer_get_xml_node ()

    xmlNode *           gupnp_didl_lite_writer_get_xml_node (GUPnPDIDLLiteWriter *writer);

Get the pointer to root node in XML document.

`writer` : | The GUPnPDIDLLiteWriter
Returns : | The pointer to root node in XML document. [transfer none]

### gupnp_didl_lite_writer_get_string ()

    char *              gupnp_didl_lite_writer_get_string   (GUPnPDIDLLiteWriter *writer);

Creates a string representation of the DIDL-Lite XML document.

`writer` : | A GUPnPDIDLLiteWriter
Returns : | The DIDL-Lite XML string, or `NULL`. g_free after usage.

### gupnp_didl_lite_writer_get_language ()

    const char *        gupnp_didl_lite_writer_get_language (GUPnPDIDLLiteWriter *writer);

Get the language the DIDL-Lite fragment is in.

`writer` : | GUPnPDIDLLiteWriter
Returns : | The language of the `writer`, or `NULL`. [transfer none]

### gupnp_didl_lite_writer_filter ()

    void                gupnp_didl_lite_writer_filter       (GUPnPDIDLLiteWriter *writer,
                                                             const char *filter);

Clears the DIDL-Lite XML document of the properties not specified in the `filter`. The passed filter string would typically come from the 'Filter' argument of Browse or Search actions from a ContentDirectory control point. Please refer to Section 2.3.15 of UPnP AV ContentDirectory version 3 specification for details on this string.

`writer` : | A GUPnPDIDLLiteWriter
`filter` : | A filter string
Returns : | None.

## Property Details

### The `"language"` property

      "language"                 gchar*                : Read / Write / Construct Only

The language the DIDL-Lite fragment is in.

Default value: NULL

### The `"xml-node"` property

      "xml-node"                 gpointer              : Read

The pointer to root node in XML document.