desktopcouch-document

desktopcouch-document

Stability Level

, unless otherwise indicated

Synopsis

const char *        desktopcouch_document_get_record_type
                                                        (CouchdbDocument *document);
void                desktopcouch_document_set_record_type
                                                        (CouchdbDocument *document,
                                                         const char *record_type);
CouchdbStructField * desktopcouch_document_get_application_annotations
                                                        (CouchdbDocument *document);
void                desktopcouch_document_set_application_annotations
                                                        (CouchdbDocument *document,
                                                         CouchdbStructField *annotations);

Description

Details

desktopcouch_document_get_record_type ()

const char *        desktopcouch_document_get_record_type
                                                        (CouchdbDocument *document);

Retrieve the record type of the given document. Record types are special fields in the CouchDB documents, used in DesktopCouch, to identify standard records. All supported record types are listed at http://www.freedesktop.org/wiki/Specifications/desktopcouchFormats.

document :

A CouchdbDocument object

Returns :

The record type of the given document.

desktopcouch_document_set_record_type ()

void                desktopcouch_document_set_record_type
                                                        (CouchdbDocument *document,
                                                         const char *record_type);

Set the record type of the given document.

document :

A CouchdbDocument object

record_type :

Record type to set the document to

desktopcouch_document_get_application_annotations ()

CouchdbStructField * desktopcouch_document_get_application_annotations
                                                        (CouchdbDocument *document);

Retrieve the application annotations for the given document.

Application annotations is a special field (named "application_annotations"), used in desktopcouch to allow applications to set values on standard documents (as defined at http://www.freedesktop.org/wiki/Specifications/desktopcouchFormats) that are not part of the standard, but still needed by the application.

document :

A CouchdbDocument object

Returns :

A CouchdbStructField containing the value of the application annotations for the given document.

desktopcouch_document_set_application_annotations ()

void                desktopcouch_document_set_application_annotations
                                                        (CouchdbDocument *document,
                                                         CouchdbStructField *annotations);

Set the application annotations for the given document.

document :

A CouchdbDocument object

annotations :

A CouchdbStructField with the contents of the application_annotations field.