GUPnPCDSLastChangeParser: GUPnP A/V Reference Manual

## GUPnPCDSLastChangeParser GUPnPCDSLastChangeParser — LastChange parser for the format used in CDS:3 |

## Functions

GUPnPCDSLastChangeParser * | gupnp_cds_last_change_parser_new ()
GList * | gupnp_cds_last_change_parser_parse ()
GUPnPCDSLastChangeEntry * | gupnp_cds_last_change_entry_ref ()
void | gupnp_cds_last_change_entry_unref ()
GUPnPCDSLastChangeEvent | gupnp_cds_last_change_entry_get_event ()
const char * | gupnp_cds_last_change_entry_get_object_id ()
const char * | gupnp_cds_last_change_entry_get_parent_id ()
const char * | gupnp_cds_last_change_entry_get_class ()
gboolean | gupnp_cds_last_change_entry_is_subtree_update ()
guint32 | gupnp_cds_last_change_entry_get_update_id ()

## Types and Values

struct | GUPnPCDSLastChangeParser
enum | GUPnPCDSLastChangeEvent
| GUPnPCDSLastChangeEntry

## Description

GUPnPCDSLastChangeParser parses XML strings from CDS's LastChange state variable.

## Functions

### gupnp_cds_last_change_parser_new ()

    GUPnPCDSLastChangeParser *
    gupnp_cds_last_change_parser_new (void);

Create a new GUPnPCDSLastChangeParser.

This parser is able to parse LastChange as defined in the ContentDirectory:3 specification.

#### Returns

A new instance of GUPnPCDSLastChangeParser.

[transfer full]

### gupnp_cds_last_change_parser_parse ()

    GList *
    gupnp_cds_last_change_parser_parse (GUPnPCDSLastChangeParser *parser,
                                        const char *last_change,
                                        GError **error);

Parse a LastChange XML document in the flavor defined by the ContentDirectory:3 specification.

#### Parameters

parser | GUPnPCDSLastChangeParser |
last_change | XML string to parse |
error | Return value for parser error or `NULL` to ingore |

#### Returns

List of GUPnPCDSLastChangeEntrys.

[element-type GUPnPCDSLastChangeEntry][transfer full]

### gupnp_cds_last_change_entry_ref ()

    GUPnPCDSLastChangeEntry *
    gupnp_cds_last_change_entry_ref (GUPnPCDSLastChangeEntry *entry);

Increase reference count of a GUPnPCDSLastChangeEntry.

#### Parameters

entry | A GUPnPCDSLastChangeEntry |

#### Returns

The object passed in `entry` .

[transfer full]

### gupnp_cds_last_change_entry_unref ()

    void
    gupnp_cds_last_change_entry_unref (GUPnPCDSLastChangeEntry *entry);

Decrease reference count of a GUPnPCDSLastChangeEntry. If the reference count drops to 0, `entry` is freed.

#### Parameters

entry | A GUPnPCDSLastChangeEntry |

### gupnp_cds_last_change_entry_get_event ()

    GUPnPCDSLastChangeEvent
    gupnp_cds_last_change_entry_get_event (GUPnPCDSLastChangeEntry *entry);

Get the type of the last change entry as defined in GUPnPCDSLastChangeEvent.

#### Parameters

entry | A GUPnPCDSLastChangeEntry |

#### Returns

An event from the GUPnPCDSLastChangeEvent or `GUPNP_CDS_LAST_CHANGE_EVENT_INVALID` if the entry is not valid.

### gupnp_cds_last_change_entry_get_object_id ()

    const char *
    gupnp_cds_last_change_entry_get_object_id
                                   (GUPnPCDSLastChangeEntry *entry);

Get the ID of the object in this change entry.

#### Parameters

entry | A GUPnPCDSLastChangeEntry |

#### Returns

The id of the object of this entry.

[transfer none]

### gupnp_cds_last_change_entry_get_parent_id ()

    const char *
    gupnp_cds_last_change_entry_get_parent_id
                                   (GUPnPCDSLastChangeEntry *entry);

Get the parent object id of the object in this change entry. This is only valid if `gupnp_cds_last_change_entry_get_event()` returns `GUPNP_CDS_LAST_CHANGE_EVENT_OBJECT_ADDED`.

#### Parameters

entry | A GUPnPCDSLastChangeEntry |

#### Returns

The id of the object's parent of this entry.

[transfer none]

### gupnp_cds_last_change_entry_get_class ()

    const char *
    gupnp_cds_last_change_entry_get_class (GUPnPCDSLastChangeEntry *entry);

Get the class of the object in this change entry. This is only valid if `gupnp_cds_last_change_entry_get_event()` returns `GUPNP_CDS_LAST_CHANGE_EVENT_OBJECT_ADDED`.

#### Parameters

entry | A GUPnPCDSLastChangeEntry |

#### Returns

The upnp class of the object of this entry.

[transfer none]

### gupnp_cds_last_change_entry_is_subtree_update ()

    gboolean
    gupnp_cds_last_change_entry_is_subtree_update
                                   (GUPnPCDSLastChangeEntry *entry);

Returns whether this entry is part of a subtree update.

#### Parameters

entry | A GUPnPCDSLastChangeEntry |

#### Returns

`TRUE`, if the entry is part of a subtree update, `FALSE` otherwise.

### gupnp_cds_last_change_entry_get_update_id ()

    guint32
    gupnp_cds_last_change_entry_get_update_id
                                   (GUPnPCDSLastChangeEntry *entry);

Get the update id of the last change entry.

#### Parameters

entry | A GUPnPCDSLastChangeEntry |

#### Returns

update id of the entry or 0 if the entry is not valid.

## Types and Values

### struct GUPnPCDSLastChangeParser

    struct GUPnPCDSLastChangeParser {
            GObject parent;

            GUPnPCDSLastChangeParserPrivate *priv;
    };

### enum GUPnPCDSLastChangeEvent

#### Members

GUPNP_CDS_LAST_CHANGE_EVENT_INVALID | Invalid GUPnPCDSLastChangeEntry. |
GUPNP_CDS_LAST_CHANGE_EVENT_OBJECT_ADDED | The GUPnPCDSLastChangeEntry is an object added event. |
GUPNP_CDS_LAST_CHANGE_EVENT_OBJECT_REMOVED | The GUPnPCDSLastChangeEntry is an object removal event. |
GUPNP_CDS_LAST_CHANGE_EVENT_OBJECT_MODIFIED | The GUPnPCDSLastChangeEntry is an object modification event. |
GUPNP_CDS_LAST_CHANGE_EVENT_ST_DONE | The GUPnPCDSLastChangeEntry is a subtree update done event. |

### GUPnPCDSLastChangeEntry

    typedef struct _GUPnPCDSLastChangeEntry GUPnPCDSLastChangeEntry;

Opaque struct which contains information about the event.