[couchdb-glib] Fix introspection annotations
- From: Rodrigo Moya <rodrigo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [couchdb-glib] Fix introspection annotations
- Date: Mon, 10 Oct 2011 14:16:06 +0000 (UTC)
commit e9cedca76bf7a7d9331eccf1037a54434c94e3f8
Author: Rodrigo Moya <rodrigo gnome-db org>
Date: Mon Oct 10 16:16:07 2011 +0200
Fix introspection annotations
couchdb-glib/Makefile.am | 2 +-
couchdb-glib/couchdb-array-field.c | 4 +-
couchdb-glib/couchdb-database-info.c | 4 +-
couchdb-glib/couchdb-database.c | 13 ++--
couchdb-glib/couchdb-design-document.c | 2 +-
couchdb-glib/couchdb-document-contact.c | 123 ++++++++++++++++++++++++++++---
couchdb-glib/couchdb-document.c | 10 +-
couchdb-glib/couchdb-query.c | 12 ++--
couchdb-glib/couchdb-session.c | 11 ++-
couchdb-glib/couchdb-struct-field.c | 18 ++--
10 files changed, 153 insertions(+), 46 deletions(-)
---
diff --git a/couchdb-glib/Makefile.am b/couchdb-glib/Makefile.am
index 2abb362..c9d8951 100644
--- a/couchdb-glib/Makefile.am
+++ b/couchdb-glib/Makefile.am
@@ -101,7 +101,7 @@ CLEANFILES = $(BUILT_SOURCES)
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
-INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
if HAVE_INTROSPECTION
diff --git a/couchdb-glib/couchdb-array-field.c b/couchdb-glib/couchdb-array-field.c
index 36cf130..fdac964 100644
--- a/couchdb-glib/couchdb-array-field.c
+++ b/couchdb-glib/couchdb-array-field.c
@@ -215,7 +215,7 @@ couchdb_array_field_remove_element (CouchdbArrayField *array, guint index)
*
* Retrieve an array value on the given position of the array.
*
- * Return value: Value of the element stored in the given position of the array.
+ * Returns: (transfer full): Value of the element stored in the given position of the array.
*/
CouchdbArrayField *
couchdb_array_field_get_array_element (CouchdbArrayField *array, guint index)
@@ -313,7 +313,7 @@ couchdb_array_field_get_string_element (CouchdbArrayField *array, guint index)
*
* Retrieve a struct value on the given position of the array.
*
- * Return value: Value of the element stored in the given position of the array.
+ * Returns: (transfer full): Value of the element stored in the given position of the array.
*/
CouchdbStructField *
couchdb_array_field_get_struct_element (CouchdbArrayField *array, guint index)
diff --git a/couchdb-glib/couchdb-database-info.c b/couchdb-glib/couchdb-database-info.c
index d3c92ce..6c13dfb 100644
--- a/couchdb-glib/couchdb-database-info.c
+++ b/couchdb-glib/couchdb-database-info.c
@@ -101,7 +101,7 @@ couchdb_database_info_new (const char *dbname,
/**
* couchdb_database_info_ref:
- * @doc_info: A #CouchdbDatabaseInfo object
+ * @dbinfo: A #CouchdbDatabaseInfo object
*
* Increments reference counting of the given #CouchdbDatabaseInfo object.
*
@@ -120,7 +120,7 @@ couchdb_database_info_ref (CouchdbDatabaseInfo *dbinfo)
/**
* couchdb_database_info_unref:
- * @doc_info: A #CouchdbDatabaseInfo object
+ * @dbinfo: A #CouchdbDatabaseInfo object
*
* Decrements reference counting of the given #CouchdbDatabaseInfo object.
* When the reference count is equal to 0, the object will be destroyed.
diff --git a/couchdb-glib/couchdb-database.c b/couchdb-glib/couchdb-database.c
index 8706d8d..3320017 100644
--- a/couchdb-glib/couchdb-database.c
+++ b/couchdb-glib/couchdb-database.c
@@ -315,7 +315,7 @@ couchdb_database_list_documents (CouchdbDatabase *database, GError **error)
* to create queries on the database that are cached and so make access to the database
* much quicker.
*
- * Return value: A list of #CouchdbDesignDocument objects, or NULL if there are none
+ * Returns: (element-type Couchdb.DesignDocument) (transfer full): A list of #CouchdbDesignDocument objects, or NULL if there are none
* or there was an error (in which case the error argument will contain information
* about the error). Once no longer needed, the list should be freed by calling
* #couchdb_database_free_document_list.
@@ -379,7 +379,7 @@ couchdb_database_get_design_documents (CouchdbDatabase *database, GError **error
* on the list, which represents the document's contents as found on the
* underlying database.
*
- * Return value: a list of #CouchdbDocument objects, or NULL if there are none
+ * Returns: (element-type Couchdb.Document) (transfer full): a list of #CouchdbDocument objects, or NULL if there are none
* or there was an error (in which case the error argument will contain information
* about the error). Once no longer needed, the list should be freed by calling
* #couchdb_database_free_document_list.
@@ -438,7 +438,7 @@ couchdb_database_get_all_documents (CouchdbDatabase *database, GError **error)
* on the list, which represents the document's contents as found on the
* underlying database.
*
- * Return value: a list of #CouchdbDocument objects, or NULL if there are none
+ * Returns: (element-type Couchdb.Document) (transfer full): a list of #CouchdbDocument objects, or NULL if there are none
* or there was an error (in which case the error argument will contain information
* about the error). Once no longer needed, the list should be freed by calling
* #couchdb_database_free_document_list.
@@ -531,7 +531,7 @@ couchdb_database_free_document_list (GSList *doclist)
*
* Retrieve the last revision of a document from the given database.
*
- * Return value: A #CouchdbDocument object if successful, NULL otherwise, in
+ * Returns: (transfer full): A #CouchdbDocument object if successful, NULL otherwise, in
* which case, the error argument will contain information about the error.
*/
CouchdbDocument *
@@ -572,7 +572,7 @@ couchdb_database_get_document (CouchdbDatabase *database,
*
* Retrieve a design document from the given database.
*
- * Return value: A #CouchdbDesignDocument object if successful, NULL otherwise, in
+ * Returns: (transfer full): A #CouchdbDesignDocument object if successful, NULL otherwise, in
* which case, the error argument will contain information about the error.
*/
CouchdbDesignDocument *
@@ -745,7 +745,6 @@ couchdb_database_delete_document (CouchdbDatabase *database, CouchdbDocument *do
/**
* couchdb_database_listen_for_changes:
* @database: A #CouchdbDatabase object
- * @dbname: Name of the database to poll changes for
*
* Setup a listener to get information about changes done to a specific database. Please
* note that changes done in the application using couchdb-glib will be notified
@@ -794,7 +793,7 @@ couchdb_database_listen_for_changes (CouchdbDatabase *database)
*
* Retrieve the #CouchdbSession associated with the given database object.
*
- * Return value: A #CouchdbSession object.
+ * Returns: (transfer none): A #CouchdbSession object.
*/
CouchdbSession *
couchdb_database_get_session (CouchdbDatabase *database)
diff --git a/couchdb-glib/couchdb-design-document.c b/couchdb-glib/couchdb-design-document.c
index 25ec0e3..de43dd6 100644
--- a/couchdb-glib/couchdb-design-document.c
+++ b/couchdb-glib/couchdb-design-document.c
@@ -54,7 +54,7 @@ couchdb_design_document_new (void)
* Return a list of the names of the views contained in the given
* #CouchdbDesignDocument object.
*
- * Return value: A list of names of views. When no longer needed, this list
+ * Returns: (element-type utf8) (transfer full): A list of names of views. When no longer needed, this list
* should be freed by calling #couchdb_design_document_free_views_list.
*/
GSList *
diff --git a/couchdb-glib/couchdb-document-contact.c b/couchdb-glib/couchdb-document-contact.c
index a23c28f..8401d61 100644
--- a/couchdb-glib/couchdb-document-contact.c
+++ b/couchdb-glib/couchdb-document-contact.c
@@ -360,7 +360,7 @@ foreach_object_cb (JsonObject *object,
* g_slist_foreach (list, (GFunc) couchdb_struct_field_unref, NULL);
* g_slist_free (list);
*
- * Return value: a #GSList of #CouchdbStructField objects.
+ * Returns: (element-type Couchdb.StructField) (transfer full): a #GSList of #CouchdbStructField objects.
*/
GSList *
couchdb_document_contact_get_email_addresses (CouchdbDocumentContact *document)
@@ -418,6 +418,16 @@ couchdb_document_contact_set_email_addresses (CouchdbDocumentContact *document,
addresses_json);
}
+/**
+ * couchdb_document_contact_get_phone_numbers:
+ * @document: A #CouchdbDocumentContact object
+ *
+ * Get the list of phone numbers for this contact document.
+ *
+ * Returns: (element-type Couchdb.StructField) (transfer full): A #GSList of
+ * #CouchdbStructField's representing all the phone numbers stored for this
+ * contact.
+ */
GSList *
couchdb_document_contact_get_phone_numbers (CouchdbDocumentContact *document)
{
@@ -475,6 +485,16 @@ couchdb_document_contact_set_phone_numbers (CouchdbDocumentContact *document, GS
"phone_numbers", phone_numbers);
}
+/**
+ * couchdb_document_contact_get_addresses:
+ * @document: A #CouchdbDocumentContact object
+ *
+ * Get the list of addresses for this contact document.
+ *
+ * Returns: (element-type Couchdb.StructField) (transfer full): A #GSList of
+ * #CouchdbStructField's representing all the addresses stored for this
+ * contact.
+ */
GSList *
couchdb_document_contact_get_addresses (CouchdbDocumentContact *document)
{
@@ -543,6 +563,16 @@ couchdb_document_contact_set_addresses (CouchdbDocumentContact *document, GSList
"addresses", addresses);
}
+/**
+ * couchdb_document_contact_get_im_addresses:
+ * @document: A #CouchdbDocumentContact object
+ *
+ * Get the list of IM addresses for this contact document.
+ *
+ * Returns: (element-type Couchdb.StructField) (transfer full): A #GSList of
+ * #CouchdbStructField's representing all the IM addresses stored for this
+ * contact.
+ */
GSList *
couchdb_document_contact_get_im_addresses (CouchdbDocumentContact *document)
{
@@ -600,6 +630,16 @@ couchdb_document_contact_set_im_addresses (CouchdbDocumentContact *document, GSL
"im_addresses", im_addresses_json);
}
+/**
+ * couchdb_document_contact_get_urls:
+ * @document: A #CouchdbDocumentContact object
+ *
+ * Get the list of URLs for this contact document.
+ *
+ * Returns: (element-type Couchdb.StructField) (transfer full): A #GSList of
+ * #CouchdbStructField's representing all the URLs stored for this
+ * contact.
+ */
GSList *
couchdb_document_contact_get_urls (CouchdbDocumentContact *document)
{
@@ -661,7 +701,7 @@ couchdb_document_contact_set_urls (CouchdbDocumentContact *document, GSList *lis
*
* Get the list of categories (as a string) for this contact document.
*
- * Return value: A comma separated list of categories as a string.
+ * Returns: A comma separated list of categories as a string.
*/
const char *
couchdb_document_contact_get_categories (CouchdbDocumentContact *document)
@@ -701,6 +741,17 @@ couchdb_document_contact_set_notes (CouchdbDocumentContact *document, const char
couchdb_document_set_string_field (COUCHDB_DOCUMENT (document), "notes", notes);
}
+/**
+ * couchdb_document_contact_email_new:
+ * @uuid: A unique ID
+ * @address: Email address
+ * @description: Description for this email address
+ *
+ * Returns a #CouchdbStructField object representing an email address:
+ *
+ * Returns: (transfer full): A newly-created #CouchdbStructField representing an
+ * email address.
+ */
CouchdbStructField *
couchdb_document_contact_email_new (const char *uuid, const char *address, const char *description)
{
@@ -756,6 +807,18 @@ couchdb_document_contact_email_set_description (CouchdbStructField *sf, const ch
couchdb_struct_field_set_string_field (sf, "description", description);
}
+/**
+ * couchdb_document_contact_phone_new:
+ * @uuid: A unique ID
+ * @number: A phone number
+ * @description: Description for this phone number
+ * @priority: Priority of this phone number
+ *
+ * Returns a #CouchdbStructField representing the given phone number.
+ *
+ * Returns: (transfer full): A newly-created #CouchdbStructField representing
+ * the given phone number information.
+ */
CouchdbStructField *
couchdb_document_contact_phone_new (const char *uuid, const char *number, const char *description, gint priority)
{
@@ -828,16 +891,33 @@ couchdb_document_contact_phone_set_description (CouchdbStructField *sf, const ch
couchdb_struct_field_set_string_field (sf, "description", description);
}
+/**
+ * couchdb_document_contact_address_new:
+ * @uuid: A unique ID
+ * @street: Street
+ * @ext_street: Extra information for the street
+ * @city: City
+ * @state: State or region
+ * @country: Country
+ * @postalcode: Postal code
+ * @pobox: Post Office box
+ * @description: Description for thos address
+ *
+ * Returns a #CouchdbStructField representing the given address.
+ *
+ * Returns: (transfer full): A newly-created #CouchdbStructField representing
+ * the given address information.
+ */
CouchdbStructField *
couchdb_document_contact_address_new (const char *uuid,
- const char *street,
- const char *ext_street,
- const char *city,
- const char *state,
- const char *country,
- const char *postalcode,
- const char *pobox,
- const char *description)
+ const char *street,
+ const char *ext_street,
+ const char *city,
+ const char *state,
+ const char *country,
+ const char *postalcode,
+ const char *pobox,
+ const char *description)
{
CouchdbStructField *sf;
@@ -1003,6 +1083,18 @@ couchdb_document_contact_address_set_description (CouchdbStructField *sf, const
couchdb_struct_field_set_string_field (sf, "description", description);
}
+/**
+ * couchdb_document_contact_im_new:
+ * @uuid: A unique ID
+ * @address: IM address
+ * @description: Description for this IM address
+ * @protocol: Protocol used for this IM address
+ *
+ * Returns a #CouchdbStructField representing the given IM address.
+ *
+ * Returns: (transfer full): A newly-created #CouchdbStructField representing
+ * the given IM address information.
+ */
CouchdbStructField *
couchdb_document_contact_im_new (const char *uuid,
const char *address,
@@ -1081,6 +1173,17 @@ couchdb_document_contact_im_set_protocol (CouchdbStructField *sf, const char *pr
couchdb_struct_field_set_string_field (sf, "protocol", protocol);
}
+/**
+ * couchdb_document_contact_url_new:
+ * @uuid: A unique ID
+ * @address: URL address
+ * @description: A description for this URL
+ *
+ * Returns a #CouchdbStructField representing the given URL.
+ *
+ * Returns: (transfer full): A newly-created #CouchdbStructField representing
+ * the given URL information.
+ */
CouchdbStructField *
couchdb_document_contact_url_new (const char *uuid, const char *address, const char *description)
{
diff --git a/couchdb-glib/couchdb-document.c b/couchdb-glib/couchdb-document.c
index 322c1d0..f677960 100644
--- a/couchdb-glib/couchdb-document.c
+++ b/couchdb-glib/couchdb-document.c
@@ -295,7 +295,7 @@ couchdb_document_remove_field (CouchdbDocument *document, const char *field)
*
* Retrieve the list of fields contained in the given #CouchdbDocument.
*
- * Return value: A list of strings containing the names of all the fields contained
+ * Returns: (element-type utf8) (transfer full): A list of strings containing the names of all the fields contained
* in the given #CouchdbDocument object. When no longer needed, the list should
* be freed by calling #g_slist_free.
*/
@@ -341,7 +341,7 @@ couchdb_document_get_field_type (CouchdbDocument *document, const char *field)
*
* Retrieve the value of an array field from the given document.
*
- * Return value: The value of the given array field.
+ * Returns: (transfer full): The value of the given array field.
*/
CouchdbArrayField *
couchdb_document_get_array_field (CouchdbDocument *document, const char *field)
@@ -545,7 +545,7 @@ couchdb_document_set_string_field (CouchdbDocument *document, const char *field,
*
* Retrieve the value of a struct field from the given document.
*
- * Return value: The value of the given struct field.
+ * Returns: (transfer full): The value of the given struct field.
*/
CouchdbStructField *
couchdb_document_get_struct_field (CouchdbDocument *document, const char *field)
@@ -587,7 +587,7 @@ couchdb_document_set_struct_field (CouchdbDocument *document, const char *field,
*
* List all the attachments for the given document.
*
- * Return value: A list containing the IDs of all the attachments for the
+ * Returns: (element-type utf8) (transfer full): A list containing the IDs of all the attachments for the
* given document. When no longer needed, the list should
* be freed by calling #g_slist_free.
*/
@@ -697,7 +697,7 @@ couchdb_document_set_record_type (CouchdbDocument *document, const char *record_
* 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
+ * Returns: (transfer full): A #CouchdbStructField containing the value of the application
* annotations for the given document.
*/
CouchdbStructField *
diff --git a/couchdb-glib/couchdb-query.c b/couchdb-glib/couchdb-query.c
index 930216a..2848954 100644
--- a/couchdb-glib/couchdb-query.c
+++ b/couchdb-glib/couchdb-query.c
@@ -154,7 +154,7 @@ couchdb_query_init (CouchdbQuery *self)
}
/**
- * couchdb_query_new
+ * couchdb_query_new:
*
* Creates and returns a new #CouchdbQuery object
*
@@ -168,7 +168,7 @@ couchdb_query_new ()
}
/**
- * couchdb_query_new_for_path
+ * couchdb_query_new_for_path:
* @path: a path for query
*
* Creates and returns a new #CouchdbQuery object for a given path
@@ -185,7 +185,7 @@ couchdb_query_new_for_path (const gchar *path)
}
/**
- * couchdb_query_new_for_path
+ * couchdb_query_new_for_view:
* @design_doc: A document's ID. You can ommit the _design/ part if you want to.
* @view_name: Name of the view to call.
*
@@ -334,7 +334,7 @@ couchdb_query_get_query_options_string (CouchdbQuery *self)
*
* Returns the Json body of the query.
*
- * Return value: (transfer none) (allow none): A JsonObject set as a body
+ * Return value: (transfer none): A JsonObject set as a body
* of a query.
*/
JsonObject *
@@ -365,9 +365,9 @@ couchdb_query_set_json_object (CouchdbQuery *self, JsonObject *body)
}
/**
- * couchdb_query_set_path
+ * couchdb_query_set_path:
* @self: A #CouchdbQuery object
- * @method: A path for query.
+ * @path: A path for query.
*
* Sets path for the Query.
*/
diff --git a/couchdb-glib/couchdb-session.c b/couchdb-glib/couchdb-session.c
index 61941c2..085151c 100644
--- a/couchdb-glib/couchdb-session.c
+++ b/couchdb-glib/couchdb-session.c
@@ -238,7 +238,7 @@ couchdb_session_get_uri (CouchdbSession *session)
*
* Retrieve the list of databases that exist in the CouchDB instance being used.
*
- * Return value: A list of strings containing the names of all the databases
+ * Returns: (element-type utf8) (transfer full): A list of strings containing the names of all the databases
* that exist in the CouchDB instance connected to. Once no longer needed, this
* list can be freed by calling #couchdb_session_free_database_list.
*/
@@ -332,7 +332,7 @@ couchdb_session_get_database_info (CouchdbSession *session, const char *dbname,
*
* Get a #CouchdbDatabase object reference for an existing database.
*
- * Return value: A #CouchdbDatabase object if the database exists on the specified
+ * Returns: (transfer full): A #CouchdbDatabase object if the database exists on the specified
* #CouchdbSession object, or NULL if the database does not exist.
*/
CouchdbDatabase *
@@ -707,7 +707,12 @@ parse_json_response (CouchdbSession *session, JsonParser *json_parser, SoupMessa
* Return value: TRUE if successful, FALSE otherwise.
*/
gboolean
-couchdb_session_send_message (CouchdbSession *session, const char *method, const char *url, const char *body, JsonParser *output, GError **error)
+couchdb_session_send_message (CouchdbSession *session,
+ const char *method,
+ const char *url,
+ const char *body,
+ JsonParser *output,
+ GError **error)
{
SoupMessage *http_message;
guint status;
diff --git a/couchdb-glib/couchdb-struct-field.c b/couchdb-glib/couchdb-struct-field.c
index 9fc2971..083839b 100644
--- a/couchdb-glib/couchdb-struct-field.c
+++ b/couchdb-glib/couchdb-struct-field.c
@@ -166,7 +166,7 @@ couchdb_struct_field_remove_field (CouchdbStructField *sf, const char *field)
*
* Get the list of field names the given #CouchdbStructField object contains.
*
- * Return value: A list of strings containing the names of all the fields contained
+ * Returns: (element-type utf8) (transfer full): A list of strings containing the names of all the fields contained
* in the given #CouchdbStructField object. When no longer needed, the list should
* be freed by calling #g_slist_free.
*/
@@ -212,7 +212,7 @@ couchdb_struct_field_get_field_type (CouchdbStructField *sf, const char *field)
*
* Retrieve the value of an array field from the given struct field.
*
- * Return value: The value of the given field.
+ * Returns: (transfer full): The value of the given field.
*/
CouchdbArrayField *
couchdb_struct_field_get_array_field (CouchdbStructField *sf, const char *field)
@@ -231,7 +231,7 @@ couchdb_struct_field_get_array_field (CouchdbStructField *sf, const char *field)
* couchdb_struct_field_set_array_field:
* @sf: A #CouchdbStructField object
* @field: Name of the field
- * @calue: Value to set the field to
+ * @value: Value to set the field to
*
* Set the value of an array field in the given struct field.
*/
@@ -267,7 +267,7 @@ couchdb_struct_field_get_boolean_field (CouchdbStructField *sf, const char *fiel
* couchdb_struct_field_set_boolean_field:
* @sf: A #CouchdbStructField object
* @field: Name of the field
- * @calue: Value to set the field to
+ * @value: Value to set the field to
*
* Set the value of a boolean field in the given struct field.
*/
@@ -302,7 +302,7 @@ couchdb_struct_field_get_double_field (CouchdbStructField *sf, const char *field
* couchdb_struct_field_set_double_field:
* @sf: A #CouchdbStructField object
* @field: Name of the field
- * @calue: Value to set the field to
+ * @value: Value to set the field to
*
* Set the value of a decimal number field in the given struct field.
*/
@@ -337,7 +337,7 @@ couchdb_struct_field_get_int_field (CouchdbStructField *sf, const char *field)
* couchdb_struct_field_set_int_field:
* @sf: A #CouchdbStructField object
* @field: Name of the field
- * @calue: Value to set the field to
+ * @value: Value to set the field to
*
* Set the value of an integer field in the given struct field.
*/
@@ -372,7 +372,7 @@ couchdb_struct_field_get_string_field (CouchdbStructField *sf, const char *field
* couchdb_struct_field_set_string_field:
* @sf: A #CouchdbStructField object
* @field: Name of the field
- * @calue: Value to set the field to
+ * @value: Value to set the field to
*
* Set the value of a string field in the given struct field.
*/
@@ -397,7 +397,7 @@ couchdb_struct_field_set_string_field (CouchdbStructField *sf, const char *field
*
* Retrieve the value of a struct field from the given struct field.
*
- * Return value: The value of the given field.
+ * Returns: (transfer full): The value of the given field.
*/
CouchdbStructField *
couchdb_struct_field_get_struct_field (CouchdbStructField *sf, const char *field)
@@ -416,7 +416,7 @@ couchdb_struct_field_get_struct_field (CouchdbStructField *sf, const char *field
* couchdb_struct_field_set_struct_field:
* @sf: A #CouchdbStructField object
* @field: Name of the field
- * @calue: Value to set the field to
+ * @value: Value to set the field to
*
* Set the value of a string field in the given struct field.
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]