[couchdb-glib] Add desktopcouch-glib API documentation



commit 04c91c085f829789dbdb009d4e90a1a281eeeee4
Author: Rodrigo Moya <rodrigo gnome-db org>
Date:   Wed Feb 10 17:18:00 2010 +0100

    Add desktopcouch-glib API documentation

 desktopcouch-glib/desktopcouch-document.c |   39 +++++++++++++++++++++++++++++
 desktopcouch-glib/desktopcouch-session.c  |    4 ++-
 2 files changed, 42 insertions(+), 1 deletions(-)
---
diff --git a/desktopcouch-glib/desktopcouch-document.c b/desktopcouch-glib/desktopcouch-document.c
index 2aecd16..3950e10 100644
--- a/desktopcouch-glib/desktopcouch-document.c
+++ b/desktopcouch-glib/desktopcouch-document.c
@@ -21,6 +21,17 @@
 
 #include "desktopcouch-document.h"
 
+/**
+ * desktopcouch_document_get_record_type:
+ * @document: A #CouchdbDocument object
+ *
+ * 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/desktopcouch#Formats.
+ *
+ * Return value: The record type of the given document.
+ */
 const char *
 desktopcouch_document_get_record_type (CouchdbDocument *document)
 {
@@ -29,6 +40,13 @@ desktopcouch_document_get_record_type (CouchdbDocument *document)
 	return couchdb_document_get_string_field (document, "record_type");
 }
 
+/**
+ * desktopcouch_document_set_record_type:
+ * @document: A #CouchdbDocument object
+ * @record_type: Record type to set the document to
+ *
+ * Set the record type of the given document.
+ */
 void
 desktopcouch_document_set_record_type (CouchdbDocument *document, const char *record_type)
 {
@@ -38,6 +56,20 @@ desktopcouch_document_set_record_type (CouchdbDocument *document, const char *re
 	couchdb_document_set_string_field (document, "record_type", record_type);
 }
 
+/**
+ * desktopcouch_document_get_application_annotations:
+ * @document: A #CouchdbDocument object
+ *
+ * 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/desktopcouch#Formats) that are
+ * not part of the standard, but still needed by the application.
+ *
+ * Return value: A #CouchdbStructField containing the value of the application
+ * annotations for the given document.
+ */
 CouchdbStructField *
 desktopcouch_document_get_application_annotations (CouchdbDocument *document)
 {
@@ -46,6 +78,13 @@ desktopcouch_document_get_application_annotations (CouchdbDocument *document)
 	return couchdb_document_get_struct_field (document, "application_annotations");
 }
 
+/**
+ * desktopcouch_document_set_application_annotations:
+ * @document: A #CouchdbDocument object
+ * @annotations: A #CouchdbStructField with the contents of the application_annotations field.
+ *
+ * Set the application annotations for the given document.
+ */
 void
 desktopcouch_document_set_application_annotations (CouchdbDocument *document, CouchdbStructField *annotations)
 {
diff --git a/desktopcouch-glib/desktopcouch-session.c b/desktopcouch-glib/desktopcouch-session.c
index 9aad5f7..1aee1dc 100644
--- a/desktopcouch-glib/desktopcouch-session.c
+++ b/desktopcouch-glib/desktopcouch-session.c
@@ -47,7 +47,9 @@ desktopcouch_session_init (DesktopcouchSession *dc)
 /**
  * desktopcouch_session_new:
  *
- * Create a #CouchdbSession instance prepared to connect to desktopcouch.
+ * Create a #CouchdbSession instance prepared to connect to desktopcouch. Once
+ * created, applications can use the #CouchdbSession API to communicate with
+ * the underlying CouchDB instance.
  *
  * Return value: A #CouchdbSession instance.
  */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]