[couchdb-glib] Add CouchdbDatabaseInfo API documentation



commit 135d64fe6e8b3e1c5320eec0848fe67c51dcf92f
Author: Rodrigo Moya <rodrigo gnome-db org>
Date:   Wed Feb 10 16:41:01 2010 +0100

    Add CouchdbDatabaseInfo API documentation

 couchdb-glib/couchdb-database-info.c |   79 ++++++++++++++++++++++++++++++++++
 couchdb-glib/couchdb-document-info.c |   10 +++--
 2 files changed, 85 insertions(+), 4 deletions(-)
---
diff --git a/couchdb-glib/couchdb-database-info.c b/couchdb-glib/couchdb-database-info.c
index b859b24..e5d001a 100644
--- a/couchdb-glib/couchdb-database-info.c
+++ b/couchdb-glib/couchdb-database-info.c
@@ -51,6 +51,20 @@ couchdb_database_info_get_type (void)
 	return object_type;
 }
 
+/**
+ * couchdb_database_info_new:
+ * @dbname: Database name
+ * @doc_count: Number of documents in the database
+ * @doc_del_count: Number of deleted documents in the database
+ * @update_seq: Last update sequence
+ * @compact_running: Whether compacting is in progress
+ * @disk_size: Size of database on disk
+ *
+ * Create a new @CouchdbDatabaseInfo object, which is used to store information
+ * (name, number of documents, etc) of a database in CouchDB.
+ *
+ * Return value: A newly-created #CouchdbDatabaseInfo object.
+ */
 CouchdbDatabaseInfo *
 couchdb_database_info_new (const char *dbname,
 			   gint doc_count,
@@ -73,6 +87,14 @@ couchdb_database_info_new (const char *dbname,
 	return dbinfo;
 }
 
+/**
+ * couchdb_database_info_ref:
+ * @doc_info: A #CouchdbDatabaseInfo object
+ *
+ * Increments reference counting of the given #CouchdbDatabaseInfo object.
+ *
+ * Return value: A pointer to the object being referenced.
+ */
 CouchdbDatabaseInfo *
 couchdb_database_info_ref (CouchdbDatabaseInfo *dbinfo)
 {
@@ -84,6 +106,13 @@ couchdb_database_info_ref (CouchdbDatabaseInfo *dbinfo)
 	return dbinfo;
 }
 
+/**
+ * couchdb_database_info_unref:
+ * @doc_info: A #CouchdbDatabaseInfo object
+ *
+ * Decrements reference counting of the given #CouchdbDatabaseInfo object.
+ * When the reference count is equal to 0, the object will be destroyed.
+ */
 void
 couchdb_database_info_unref (CouchdbDatabaseInfo *dbinfo)
 {
@@ -101,6 +130,14 @@ couchdb_database_info_unref (CouchdbDatabaseInfo *dbinfo)
 	}
 }
 
+/**
+ * couchdb_database_info_get_dbname:
+ * @dbinfo: A #CouchdbDatabaseInfo object
+ *
+ * Get the database name stored in the #CouchdbDatabaseInfo object.
+ *
+ * Return value: Name of the database.
+ */
 const char *
 couchdb_database_info_get_dbname (CouchdbDatabaseInfo *dbinfo)
 {
@@ -109,6 +146,14 @@ couchdb_database_info_get_dbname (CouchdbDatabaseInfo *dbinfo)
 	return (const char *) dbinfo->dbname;
 }
 
+/**
+ * couchdb_database_info_get_documents_count:
+ * @dbinfo: A #CouchdbDatabaseInfo object
+ *
+ * Get the number of documents stored in the #CouchdbDatabaseInfo object.
+ *
+ * Return value: Number of documents in the database.
+ */
 gint
 couchdb_database_info_get_documents_count (CouchdbDatabaseInfo *dbinfo)
 {
@@ -117,6 +162,14 @@ couchdb_database_info_get_documents_count (CouchdbDatabaseInfo *dbinfo)
 	return dbinfo->doc_count;
 }
 
+/**
+ * couchdb_database_info_get_deleted_documents_count:
+ * @dbinfo: A #CouchdbDatabaseInfo object
+ *
+ * Get the number of deleted documents stored in the #CouchdbDatabaseInfo object.
+ *
+ * Return value: Number of deleted documents.
+ */
 gint
 couchdb_database_info_get_deleted_documents_count (CouchdbDatabaseInfo *dbinfo)
 {
@@ -125,6 +178,15 @@ couchdb_database_info_get_deleted_documents_count (CouchdbDatabaseInfo *dbinfo)
 	return dbinfo->doc_del_count;
 }
 
+/**
+ * couchdb_database_info_get_update_sequence:
+ * @dbinfo: A #CouchdbDatabaseInfo object
+ *
+ * Get the last update sequence stored in the #CouchdbDatabaseInfo object.
+ * This sequence is incremented with each change done to the database.
+ *
+ * Return value: Last update sequence.
+ */
 gint
 couchdb_database_info_get_update_sequence (CouchdbDatabaseInfo *dbinfo)
 {
@@ -133,6 +195,15 @@ couchdb_database_info_get_update_sequence (CouchdbDatabaseInfo *dbinfo)
 	return dbinfo->update_seq;
 }
 
+/**
+ * couchdb_database_info_is_compact_running:
+ * @dbinfo: A #CouchdbDatabaseInfo object
+ *
+ * Get whether compacting is running on the database at the time the information
+ * was retrieved.
+ *
+ * Return value: Whether compacting is running or not.
+ */
 gboolean
 couchdb_database_info_is_compact_running (CouchdbDatabaseInfo *dbinfo)
 {
@@ -141,6 +212,14 @@ couchdb_database_info_is_compact_running (CouchdbDatabaseInfo *dbinfo)
 	return dbinfo->compact_running;
 }
 
+/**
+ * couchdb_database_info_get_disk_size:
+ * @dbinfo: A #CouchdbDatabaseInfo object
+ *
+ * Get the size of database on disk stored in the #CouchdbDatabaseInfo object.
+ *
+ * Return value: Size of the database on disk.
+ */
 gint
 couchdb_database_info_get_disk_size (CouchdbDatabaseInfo *dbinfo)
 {
diff --git a/couchdb-glib/couchdb-document-info.c b/couchdb-glib/couchdb-document-info.c
index c0e284e..b72a897 100644
--- a/couchdb-glib/couchdb-document-info.c
+++ b/couchdb-glib/couchdb-document-info.c
@@ -75,7 +75,9 @@ couchdb_document_info_new (const char *docid, const char *revision)
  * couchdb_document_info_ref:
  * @doc_info: A #CouchdbDocumentInfo object
  *
- * Increments reference counting of the given #CouchdbDocument object.
+ * Increments reference counting of the given #CouchdbDocumentInfo object.
+ *
+ * Return value: A pointer to the object being referenced.
  */
 CouchdbDocumentInfo *
 couchdb_document_info_ref (CouchdbDocumentInfo *doc_info)
@@ -92,7 +94,7 @@ couchdb_document_info_ref (CouchdbDocumentInfo *doc_info)
  * couchdb_document_info_unref:
  * @doc_info: A #CouchdbDocumentInfo object
  *
- * Decrements reference counting of the given #CouchdbDocument object.
+ * Decrements reference counting of the given #CouchdbDocumentInfo object.
  * When the reference count is equal to 0, the object will be destroyed.
  */
 void
@@ -119,7 +121,7 @@ couchdb_document_info_unref (CouchdbDocumentInfo *doc_info)
  *
  * Get the unique ID stored in the #CouchdbDocumentInfo object.
  *
- * Return value: Unique ID stored in the #CouchdbDocumentInfo object.
+ * Return value: Unique ID.
  */
 const char *
 couchdb_document_info_get_docid (CouchdbDocumentInfo *doc_info)
@@ -135,7 +137,7 @@ couchdb_document_info_get_docid (CouchdbDocumentInfo *doc_info)
  *
  * Get the revision stored in the #CouchdbDocumentInfo object.
  *
- * Return value: Revision stored in the #CouchdbDocumentInfo object.
+ * Return value: Revision number.
  */
 const char *
 couchdb_document_info_get_revision (CouchdbDocumentInfo *doc_info)



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