[evolution-couchdb] Update to couchdb-glib API in master



commit a737214a44e7a7dc22e7b9eb2ed2d49fdb31b986
Author: Rodrigo Moya <rodrigo gnome-db org>
Date:   Thu Jan 7 16:19:58 2010 +0100

    Update to couchdb-glib API in master

 addressbook/e-book-backend-couchdb.c |   76 +++++++++++++++++-----------------
 addressbook/e-book-backend-couchdb.h |    2 +-
 2 files changed, 39 insertions(+), 39 deletions(-)
---
diff --git a/addressbook/e-book-backend-couchdb.c b/addressbook/e-book-backend-couchdb.c
index 2ef7ef8..7b13986 100644
--- a/addressbook/e-book-backend-couchdb.c
+++ b/addressbook/e-book-backend-couchdb.c
@@ -34,25 +34,25 @@
 G_DEFINE_TYPE (EBookBackendCouchDB, e_book_backend_couchdb, E_TYPE_BOOK_BACKEND);
 
 static char *
-vcard_from_couch_document (CouchDBDocument *document)
+vcard_from_couch_document (CouchdbDocument *document)
 {
 	EContact *contact;
 	char *str;
 	GSList *list, *sl;
 	GList *attr_list;
-	CouchDBStructField *app_annotations;
+	CouchdbStructField *app_annotations;
 
 	if (!couchdb_document_is_contact (document))
 		return NULL;
 
 	/* Check if the contact is marked for deletion */
 	if ((app_annotations = couchdb_document_get_application_annotations (document))) {
-		CouchDBStructField *u1_annotations;
+		CouchdbStructField *u1_annotations;
 
 		u1_annotations = couchdb_struct_field_get_struct_field (
 			app_annotations, "Ubuntu One");
 		if (u1_annotations != NULL) {
-			CouchDBStructField *private_annotations;
+			CouchdbStructField *private_annotations;
 
 			private_annotations = couchdb_struct_field_get_struct_field (
 				u1_annotations, "private_application_annotations");
@@ -104,7 +104,7 @@ vcard_from_couch_document (CouchDBDocument *document)
 	while (list != NULL) {
 		const char *email_str, *description_str, *uuid_str;
 		EVCardAttribute *attr;
-		CouchDBStructField *email_address = (CouchDBStructField *) list->data;
+		CouchdbStructField *email_address = (CouchdbStructField *) list->data;
 
 		email_str = couchdb_document_contact_email_get_address (email_address);
 		description_str = couchdb_document_contact_email_get_description (email_address);
@@ -150,7 +150,7 @@ vcard_from_couch_document (CouchDBDocument *document)
 	while (list != NULL) {
 		const char *phone_str, *description_str, *uuid_str;
 		EVCardAttribute *attr;
-		CouchDBStructField *phone_number = (CouchDBStructField *) list->data;
+		CouchdbStructField *phone_number = (CouchdbStructField *) list->data;
 
 		phone_str = couchdb_document_contact_phone_get_number (phone_number);
 		description_str = couchdb_document_contact_phone_get_description (phone_number);
@@ -263,7 +263,7 @@ vcard_from_couch_document (CouchDBDocument *document)
 		char **street_lines;
 		const char *description_str;
 		EContactAddress *contact_address;
-		CouchDBStructField *address = (CouchDBStructField *) list->data;
+		CouchdbStructField *address = (CouchdbStructField *) list->data;
 
 		contact_address = g_new0 (EContactAddress, 1);
 		contact_address->address_format = g_strdup ("");
@@ -303,7 +303,7 @@ vcard_from_couch_document (CouchDBDocument *document)
 	while (list != NULL) {
 		const char *description_str, *address_str, *uuid_str;
 		EVCardAttribute *attr;
-		CouchDBStructField *url = (CouchDBStructField *) list->data;
+		CouchdbStructField *url = (CouchdbStructField *) list->data;
 
 		address_str = couchdb_document_contact_url_get_address (url);
 		description_str = couchdb_document_contact_url_get_description (url);
@@ -337,7 +337,7 @@ vcard_from_couch_document (CouchDBDocument *document)
 	while (list != NULL) {
 		const char *address_str, *description_str, *protocol_str, *uuid_str;
 		EVCardAttribute *attr = NULL;
-		CouchDBStructField *im = (CouchDBStructField *) list->data;
+		CouchdbStructField *im = (CouchdbStructField *) list->data;
 
 		address_str = couchdb_document_contact_im_get_address (im);
 		description_str = couchdb_document_contact_im_get_description (im);
@@ -423,7 +423,7 @@ vcard_from_couch_document (CouchDBDocument *document)
 
 	/* application annotations */
 	if (couchdb_document_has_field (document, "application_annotations")) {
-		CouchDBStructField *annotations = couchdb_document_get_application_annotations (document);
+		CouchdbStructField *annotations = couchdb_document_get_application_annotations (document);
 
 		str = couchdb_struct_field_to_string (annotations);
 		e_vcard_add_attribute_with_value (E_VCARD (contact),
@@ -442,7 +442,7 @@ vcard_from_couch_document (CouchDBDocument *document)
 	return str;
 }
 
-static CouchDBStructField *
+static CouchdbStructField *
 contact_email_to_struct_field (EVCardAttribute *attr)
 {
 	const gchar *email;
@@ -483,12 +483,12 @@ contact_email_to_struct_field (EVCardAttribute *attr)
 	return couchdb_document_contact_email_new (uuid, email, description);
 }
 
-static CouchDBStructField *
+static CouchdbStructField *
 contact_phone_to_struct_field (EVCardAttribute *attr)
 {
 	const gchar *phone;
 	GList *params, *pl;
-	CouchDBStructField *sf;
+	CouchdbStructField *sf;
 	gchar *final_description = NULL;
 	const gchar *description = NULL, *uuid = NULL, *kind = NULL;
 
@@ -553,10 +553,10 @@ contact_phone_to_struct_field (EVCardAttribute *attr)
 	return sf;
 }
 
-static CouchDBStructField *
+static CouchdbStructField *
 contact_postal_address_to_struct_field (EContact *contact, EContactField field, const char *description)
 {
-	CouchDBStructField *sf = NULL;
+	CouchdbStructField *sf = NULL;
 	EContactAddress *contact_address;
 
 	contact_address = e_contact_get (contact, field);
@@ -584,7 +584,7 @@ contact_postal_address_to_struct_field (EContact *contact, EContactField field,
 	return sf;
 }
 
-static CouchDBStructField *
+static CouchdbStructField *
 contact_url_to_struct_field (EVCardAttribute *attr, const gchar *description)
 {
 	const gchar *address, *uuid;
@@ -612,7 +612,7 @@ contact_url_to_struct_field (EVCardAttribute *attr, const gchar *description)
 	return couchdb_document_contact_url_new (uuid, address, description);
 }
 
-static CouchDBStructField *
+static CouchdbStructField *
 contact_im_to_struct_field (EVCardAttribute *attr, const gchar *protocol)
 {
 	const gchar *address, *description = NULL, *uuid = NULL;
@@ -650,16 +650,16 @@ contact_im_to_struct_field (EVCardAttribute *attr, const gchar *protocol)
 	return couchdb_document_contact_im_new (uuid, address, description, protocol);
 }
 
-static CouchDBDocument *
+static CouchdbDocument *
 couch_document_from_contact (EBookBackendCouchDB *couchdb_backend, EContact *contact)
 {
 	EContactDate *dt;
 	GSList *list;
 	GList *attr_list, *al;
 	const char *str;
-	CouchDBDocument *document;
+	CouchdbDocument *document;
 	gint i;
-	CouchDBStructField *postal_address;
+	CouchdbStructField *postal_address;
 
 	/* create the CouchDBDocument to put on the database */
 	document = couchdb_document_contact_new (couchdb_backend->couchdb);
@@ -690,7 +690,7 @@ couch_document_from_contact (EBookBackendCouchDB *couchdb_backend, EContact *con
 	list = NULL;
 	attr_list = e_contact_get_attributes (contact, E_CONTACT_EMAIL);
 	for (al = attr_list; al != NULL; al = al->next) {
-		CouchDBStructField *sf;
+		CouchdbStructField *sf;
 		EVCardAttribute *attr = (EVCardAttribute *) al->data;
 
 		sf = contact_email_to_struct_field (attr);
@@ -709,7 +709,7 @@ couch_document_from_contact (EBookBackendCouchDB *couchdb_backend, EContact *con
 	list = NULL;
 	attr_list = e_vcard_get_attributes (E_VCARD (contact));
 	for (al = attr_list; al != NULL; al = al->next) {
-		CouchDBStructField *sf;
+		CouchdbStructField *sf;
 		EVCardAttribute *attr = (EVCardAttribute *) al->data;
 
 		if (g_strcmp0 (e_vcard_attribute_get_name (attr), EVC_TEL) == 0) {
@@ -751,7 +751,7 @@ couch_document_from_contact (EBookBackendCouchDB *couchdb_backend, EContact *con
 	list = NULL;
 	attr_list = e_vcard_get_attributes (E_VCARD (contact));
 	for (al = attr_list; al != NULL; al = al->next) {
-		CouchDBStructField *sf = NULL;
+		CouchdbStructField *sf = NULL;
 		EVCardAttribute *attr = (EVCardAttribute *) al->data;
 
 		if (g_strcmp0 (e_vcard_attribute_get_name (attr),
@@ -776,7 +776,7 @@ couch_document_from_contact (EBookBackendCouchDB *couchdb_backend, EContact *con
 	list = NULL;
 	attr_list = e_vcard_get_attributes (E_VCARD (contact));
 	for (al = attr_list; al != NULL; al = al->next) {
-		CouchDBStructField *sf = NULL;
+		CouchdbStructField *sf = NULL;
 		EVCardAttribute *attr = (EVCardAttribute *) al->data;
 
 		if (g_strcmp0 (e_vcard_attribute_get_name (attr),
@@ -840,7 +840,7 @@ couch_document_from_contact (EBookBackendCouchDB *couchdb_backend, EContact *con
 	/* application annotations */
 	str = e_vcard_attribute_get_value (e_vcard_get_attribute (E_VCARD (contact), COUCHDB_APPLICATION_ANNOTATIONS_PROP));
 	if (str) {
-		CouchDBStructField *annotations;
+		CouchdbStructField *annotations;
 
 		annotations = couchdb_struct_field_new_from_string (str);
 		if (annotations) {
@@ -853,7 +853,7 @@ couch_document_from_contact (EBookBackendCouchDB *couchdb_backend, EContact *con
 }
 
 static void
-document_updated_cb (CouchDB *couchdb, const char *dbname, CouchDBDocument *document, gpointer user_data)
+document_updated_cb (Couchdb *couchdb, const char *dbname, CouchdbDocument *document, gpointer user_data)
 {
 	char *vcard;
 	EContact *contact;
@@ -876,7 +876,7 @@ document_updated_cb (CouchDB *couchdb, const char *dbname, CouchDBDocument *docu
 }
 
 static void
-document_deleted_cb (CouchDB *couchdb, const char *dbname, const char *docid, gpointer user_data)
+document_deleted_cb (Couchdb *couchdb, const char *dbname, const char *docid, gpointer user_data)
 {
 	EBookBackendCouchDB *couchdb_backend = E_BOOK_BACKEND_COUCHDB (user_data);
 
@@ -893,7 +893,7 @@ e_book_backend_couchdb_load_source (EBookBackend *backend,
 {
 	gchar *uri;
 	const gchar *property;
-	CouchDBDatabaseInfo *db_info;
+	CouchdbDatabaseInfo *db_info;
 	GError *error = NULL;
 	gboolean enable_oauth = FALSE;
 	char *oauth_c_key = NULL, *oauth_c_secret = NULL, *oauth_t_key = NULL, *oauth_t_secret = NULL;
@@ -1069,7 +1069,7 @@ e_book_backend_couchdb_get_static_capabilities (EBookBackend *backend)
 }
 
 static EContact *
-put_document (EBookBackendCouchDB *couchdb_backend, CouchDBDocument *document)
+put_document (EBookBackendCouchDB *couchdb_backend, CouchdbDocument *document)
 {
 	GError *error = NULL;
 
@@ -1101,7 +1101,7 @@ e_book_backend_couchdb_create_contact (EBookBackend *backend,
 				       const char *vcard)
 {
 	EContact *contact, *new_contact;
-	CouchDBDocument *document;
+	CouchdbDocument *document;
 	EBookBackendCouchDB *couchdb_backend = E_BOOK_BACKEND_COUCHDB (backend);
 
 	contact = e_contact_new_from_vcard (vcard);
@@ -1139,14 +1139,14 @@ e_book_backend_couchdb_remove_contacts (EBookBackend *backend,
 	EBookBackendCouchDB *couchdb_backend = E_BOOK_BACKEND_COUCHDB (backend);
 
 	for (l = id_list; l != NULL; l = l->next) {
-		CouchDBDocument *document;
+		CouchdbDocument *document;
 		GError *error = NULL;
 		const gchar *uid = (const gchar *) l->data;
 
 		document = couchdb_document_get (couchdb_backend->couchdb, couchdb_backend->dbname, uid, &error);
 		if (document) {
 			if (couchdb_backend->using_desktopcouch) {
-				CouchDBStructField *app_annotations, *u1_annotations, *private_annotations;
+				CouchdbStructField *app_annotations, *u1_annotations, *private_annotations;
 
 				/* For desktopcouch, we don't remove contacts, we just
 				 * mark them as deleted */
@@ -1218,7 +1218,7 @@ e_book_backend_couchdb_modify_contact (EBookBackend *backend,
 				       const char *vcard)
 {
 	EContact *contact, *new_contact;
-	CouchDBDocument *document;
+	CouchdbDocument *document;
 	EBookBackendCouchDB *couchdb_backend = E_BOOK_BACKEND_COUCHDB (backend);
 
 	contact = e_contact_new_from_vcard (vcard);
@@ -1253,7 +1253,7 @@ e_book_backend_couchdb_get_contact (EBookBackend *backend,
 				    const char *id)
 {
 	GError *error = NULL;
-	CouchDBDocument *document;
+	CouchdbDocument *document;
 	EBookBackendCouchDB *couchdb_backend = E_BOOK_BACKEND_COUCHDB (backend);
 
 	document = couchdb_document_get (couchdb_backend->couchdb,
@@ -1300,8 +1300,8 @@ e_book_backend_couchdb_get_contact_list (EBookBackend *backend,
 					   &error);
 	for (sl = doc_list; sl != NULL; sl = sl->next) {
 		char *vcard;
-		CouchDBDocument *document;
-		CouchDBDocumentInfo *doc_info = (CouchDBDocumentInfo *) sl->data;
+		CouchdbDocument *document;
+		CouchdbDocumentInfo *doc_info = (CouchdbDocumentInfo *) sl->data;
 
 		/* Retrieve this document */
 		error = NULL;
@@ -1346,9 +1346,9 @@ e_book_backend_couchdb_start_book_view (EBookBackend *backend,
 					   couchdb_backend->dbname,
 					   &error);
 	for (sl = doc_list; sl != NULL; sl = sl->next) {
-		CouchDBDocument *document;
+		CouchdbDocument *document;
 		char *vcard;
-		CouchDBDocumentInfo *doc_info = (CouchDBDocumentInfo *) sl->data;
+		CouchdbDocumentInfo *doc_info = (CouchdbDocumentInfo *) sl->data;
 
 		/* Retrieve this document */
 		error = NULL;
diff --git a/addressbook/e-book-backend-couchdb.h b/addressbook/e-book-backend-couchdb.h
index 2a56875..9e65fcd 100644
--- a/addressbook/e-book-backend-couchdb.h
+++ b/addressbook/e-book-backend-couchdb.h
@@ -37,7 +37,7 @@
 typedef struct {
 	EBookBackend parent_object;
 
-	CouchDB *couchdb;
+	Couchdb *couchdb;
 	char *dbname;
 	gboolean using_desktopcouch;
 } EBookBackendCouchDB;



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