[couchdb-glib] Add missing contact name fields to desktopcouch API
- From: Rodrigo Moya <rodrigo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [couchdb-glib] Add missing contact name fields to desktopcouch API
- Date: Thu, 8 Apr 2010 08:10:15 +0000 (UTC)
commit 5233c174934f6bf713d83db4c21d7d46dc81155f
Author: Rodrigo Moya <rodrigo gnome-db org>
Date: Thu Apr 8 10:10:01 2010 +0200
Add missing contact name fields to desktopcouch API
desktopcouch-glib/desktopcouch-document-contact.c | 76 +++++++++++++++-----
desktopcouch-glib/desktopcouch-document-contact.h | 9 ++-
2 files changed, 64 insertions(+), 21 deletions(-)
---
diff --git a/desktopcouch-glib/desktopcouch-document-contact.c b/desktopcouch-glib/desktopcouch-document-contact.c
index 8a7c3df..0f2a965 100644
--- a/desktopcouch-glib/desktopcouch-document-contact.c
+++ b/desktopcouch-glib/desktopcouch-document-contact.c
@@ -46,6 +46,25 @@ desktopcouch_document_is_contact (CouchdbDocument *document)
}
const char *
+desktopcouch_document_contact_get_title (CouchdbDocument *document)
+{
+ g_return_val_if_fail (COUCHDB_IS_DOCUMENT (document), NULL);
+ g_return_val_if_fail (desktopcouch_document_is_contact (document), NULL);
+
+ return couchdb_document_get_string_field (document, "title");
+}
+
+void
+desktopcouch_document_contact_set_title (CouchdbDocument *document, const char *title)
+{
+ g_return_if_fail (COUCHDB_IS_DOCUMENT (document));
+ g_return_if_fail (desktopcouch_document_is_contact (document));
+ g_return_if_fail (title != NULL);
+
+ couchdb_document_set_string_field (document, "title", title);
+}
+
+const char *
desktopcouch_document_contact_get_first_name (CouchdbDocument *document)
{
g_return_val_if_fail (COUCHDB_IS_DOCUMENT (document), NULL);
@@ -65,6 +84,25 @@ desktopcouch_document_contact_set_first_name (CouchdbDocument *document, const c
}
const char *
+desktopcouch_document_contact_get_middle_name (CouchdbDocument *document)
+{
+ g_return_val_if_fail (COUCHDB_IS_DOCUMENT (document), NULL);
+ g_return_val_if_fail (desktopcouch_document_is_contact (document), NULL);
+
+ return couchdb_document_get_string_field (document, "middle_name");
+}
+
+void
+desktopcouch_document_contact_set_middle_name (CouchdbDocument *document, const char *middle_name)
+{
+ g_return_if_fail (COUCHDB_IS_DOCUMENT (document));
+ g_return_if_fail (desktopcouch_document_is_contact (document));
+ g_return_if_fail (middle_name != NULL);
+
+ couchdb_document_set_string_field (document, "middle_name", middle_name);
+}
+
+const char *
desktopcouch_document_contact_get_last_name (CouchdbDocument *document)
{
g_return_val_if_fail (COUCHDB_IS_DOCUMENT (document), NULL);
@@ -84,6 +122,25 @@ desktopcouch_document_contact_set_last_name (CouchdbDocument *document, const ch
}
const char *
+desktopcouch_document_contact_get_suffix (CouchdbDocument *document)
+{
+ g_return_val_if_fail (COUCHDB_IS_DOCUMENT (document), NULL);
+ g_return_val_if_fail (desktopcouch_document_is_contact (document), NULL);
+
+ return couchdb_document_get_string_field (document, "suffix");
+}
+
+void
+desktopcouch_document_contact_set_suffix (CouchdbDocument *document, const char *suffix)
+{
+ g_return_if_fail (COUCHDB_IS_DOCUMENT (document));
+ g_return_if_fail (desktopcouch_document_is_contact (document));
+ g_return_if_fail (suffix != NULL);
+
+ couchdb_document_set_string_field (document, "suffix", suffix);
+}
+
+const char *
desktopcouch_document_contact_get_nick_name (CouchdbDocument *document)
{
g_return_val_if_fail (COUCHDB_IS_DOCUMENT (document), NULL);
@@ -202,25 +259,6 @@ desktopcouch_document_contact_set_department (CouchdbDocument *document, const c
}
const char *
-desktopcouch_document_contact_get_title (CouchdbDocument *document)
-{
- g_return_val_if_fail (COUCHDB_IS_DOCUMENT (document), NULL);
- g_return_val_if_fail (desktopcouch_document_is_contact (document), NULL);
-
- return couchdb_document_get_string_field (document, "title");
-}
-
-void
-desktopcouch_document_contact_set_title (CouchdbDocument *document, const char *title)
-{
- g_return_if_fail (COUCHDB_IS_DOCUMENT (document));
- g_return_if_fail (desktopcouch_document_is_contact (document));
- g_return_if_fail (title != NULL);
-
- couchdb_document_set_string_field (document, "title", title);
-}
-
-const char *
desktopcouch_document_contact_get_job_title (CouchdbDocument *document)
{
g_return_val_if_fail (COUCHDB_IS_DOCUMENT (document), NULL);
diff --git a/desktopcouch-glib/desktopcouch-document-contact.h b/desktopcouch-glib/desktopcouch-document-contact.h
index 6d48975..5f3c431 100644
--- a/desktopcouch-glib/desktopcouch-document-contact.h
+++ b/desktopcouch-glib/desktopcouch-document-contact.h
@@ -36,10 +36,17 @@ gboolean desktopcouch_document_is_contact (CouchdbDocument *document);
* Top level functions to manipulate documents representing a contact
*/
+const char *desktopcouch_document_contact_get_title (CouchdbDocument *document);
+void desktopcouch_document_contact_set_title (CouchdbDocument *document, const char *title);
const char *desktopcouch_document_contact_get_first_name (CouchdbDocument *document);
void desktopcouch_document_contact_set_first_name (CouchdbDocument *document, const char *first_name);
+const char *desktopcouch_document_contact_get_middle_name (CouchdbDocument *document);
+void desktopcouch_document_contact_set_middle_name (CouchdbDocument *document, const char *middle_name);
const char *desktopcouch_document_contact_get_last_name (CouchdbDocument *document);
void desktopcouch_document_contact_set_last_name (CouchdbDocument *document, const char *last_name);
+const char *desktopcouch_document_contact_get_suffix (CouchdbDocument *document);
+void desktopcouch_document_contact_set_suffix (CouchdbDocument *document, const char *suffix);
+
const char *desktopcouch_document_contact_get_nick_name (CouchdbDocument *document);
void desktopcouch_document_contact_set_nick_name (CouchdbDocument *document, const char *nick_name);
const char *desktopcouch_document_contact_get_spouse_name (CouchdbDocument *document);
@@ -53,8 +60,6 @@ const char *desktopcouch_document_contact_get_company (CouchdbDocument *document
void desktopcouch_document_contact_set_company (CouchdbDocument *document, const char *company);
const char *desktopcouch_document_contact_get_department (CouchdbDocument *document);
void desktopcouch_document_contact_set_department (CouchdbDocument *document, const char *department);
-const char *desktopcouch_document_contact_get_title (CouchdbDocument *document);
-void desktopcouch_document_contact_set_title (CouchdbDocument *document, const char *title);
const char *desktopcouch_document_contact_get_job_title (CouchdbDocument *document);
void desktopcouch_document_contact_set_job_title (CouchdbDocument *document, const char *job_title);
const char *desktopcouch_document_contact_get_manager_name (CouchdbDocument *document);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]