Merge lp:~rodrigo-moya/couchdb-glib/add-missing-name-fields into lp:couchdb-glib

Proposed by Rodrigo Moya
Status: Merged
Approved by: Elliot Murphy
Approved revision: 178
Merge reported by: Rodrigo Moya
Merged at revision: not available
Proposed branch: lp:~rodrigo-moya/couchdb-glib/add-missing-name-fields
Merge into: lp:couchdb-glib
Diff against target: 138 lines (+64/-21)
2 files modified
desktopcouch-glib/desktopcouch-document-contact.c (+57/-19)
desktopcouch-glib/desktopcouch-document-contact.h (+7/-2)
To merge this branch: bzr merge lp:~rodrigo-moya/couchdb-glib/add-missing-name-fields
Reviewer Review Type Date Requested Status
Elliot Murphy (community) Approve
Rick McBride (community) Approve
Review via email: mp+22955@code.launchpad.net

Description of the change

Add missing name fields to desktopcouch API

To post a comment you must log in.
Revision history for this message
Rick McBride (rmcbride) :
review: Approve
Revision history for this message
Elliot Murphy (statik) wrote :

yay

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'desktopcouch-glib/desktopcouch-document-contact.c'
2--- desktopcouch-glib/desktopcouch-document-contact.c 2010-01-27 13:30:28 +0000
3+++ desktopcouch-glib/desktopcouch-document-contact.c 2010-04-07 15:47:19 +0000
4@@ -46,6 +46,25 @@
5 }
6
7 const char *
8+desktopcouch_document_contact_get_title (CouchdbDocument *document)
9+{
10+ g_return_val_if_fail (COUCHDB_IS_DOCUMENT (document), NULL);
11+ g_return_val_if_fail (desktopcouch_document_is_contact (document), NULL);
12+
13+ return couchdb_document_get_string_field (document, "title");
14+}
15+
16+void
17+desktopcouch_document_contact_set_title (CouchdbDocument *document, const char *title)
18+{
19+ g_return_if_fail (COUCHDB_IS_DOCUMENT (document));
20+ g_return_if_fail (desktopcouch_document_is_contact (document));
21+ g_return_if_fail (title != NULL);
22+
23+ couchdb_document_set_string_field (document, "title", title);
24+}
25+
26+const char *
27 desktopcouch_document_contact_get_first_name (CouchdbDocument *document)
28 {
29 g_return_val_if_fail (COUCHDB_IS_DOCUMENT (document), NULL);
30@@ -65,6 +84,25 @@
31 }
32
33 const char *
34+desktopcouch_document_contact_get_middle_name (CouchdbDocument *document)
35+{
36+ g_return_val_if_fail (COUCHDB_IS_DOCUMENT (document), NULL);
37+ g_return_val_if_fail (desktopcouch_document_is_contact (document), NULL);
38+
39+ return couchdb_document_get_string_field (document, "middle_name");
40+}
41+
42+void
43+desktopcouch_document_contact_set_middle_name (CouchdbDocument *document, const char *middle_name)
44+{
45+ g_return_if_fail (COUCHDB_IS_DOCUMENT (document));
46+ g_return_if_fail (desktopcouch_document_is_contact (document));
47+ g_return_if_fail (middle_name != NULL);
48+
49+ couchdb_document_set_string_field (document, "middle_name", middle_name);
50+}
51+
52+const char *
53 desktopcouch_document_contact_get_last_name (CouchdbDocument *document)
54 {
55 g_return_val_if_fail (COUCHDB_IS_DOCUMENT (document), NULL);
56@@ -84,6 +122,25 @@
57 }
58
59 const char *
60+desktopcouch_document_contact_get_suffix (CouchdbDocument *document)
61+{
62+ g_return_val_if_fail (COUCHDB_IS_DOCUMENT (document), NULL);
63+ g_return_val_if_fail (desktopcouch_document_is_contact (document), NULL);
64+
65+ return couchdb_document_get_string_field (document, "suffix");
66+}
67+
68+void
69+desktopcouch_document_contact_set_suffix (CouchdbDocument *document, const char *suffix)
70+{
71+ g_return_if_fail (COUCHDB_IS_DOCUMENT (document));
72+ g_return_if_fail (desktopcouch_document_is_contact (document));
73+ g_return_if_fail (suffix != NULL);
74+
75+ couchdb_document_set_string_field (document, "suffix", suffix);
76+}
77+
78+const char *
79 desktopcouch_document_contact_get_nick_name (CouchdbDocument *document)
80 {
81 g_return_val_if_fail (COUCHDB_IS_DOCUMENT (document), NULL);
82@@ -202,25 +259,6 @@
83 }
84
85 const char *
86-desktopcouch_document_contact_get_title (CouchdbDocument *document)
87-{
88- g_return_val_if_fail (COUCHDB_IS_DOCUMENT (document), NULL);
89- g_return_val_if_fail (desktopcouch_document_is_contact (document), NULL);
90-
91- return couchdb_document_get_string_field (document, "title");
92-}
93-
94-void
95-desktopcouch_document_contact_set_title (CouchdbDocument *document, const char *title)
96-{
97- g_return_if_fail (COUCHDB_IS_DOCUMENT (document));
98- g_return_if_fail (desktopcouch_document_is_contact (document));
99- g_return_if_fail (title != NULL);
100-
101- couchdb_document_set_string_field (document, "title", title);
102-}
103-
104-const char *
105 desktopcouch_document_contact_get_job_title (CouchdbDocument *document)
106 {
107 g_return_val_if_fail (COUCHDB_IS_DOCUMENT (document), NULL);
108
109=== modified file 'desktopcouch-glib/desktopcouch-document-contact.h'
110--- desktopcouch-glib/desktopcouch-document-contact.h 2010-01-27 13:30:28 +0000
111+++ desktopcouch-glib/desktopcouch-document-contact.h 2010-04-07 15:47:19 +0000
112@@ -36,10 +36,17 @@
113 * Top level functions to manipulate documents representing a contact
114 */
115
116+const char *desktopcouch_document_contact_get_title (CouchdbDocument *document);
117+void desktopcouch_document_contact_set_title (CouchdbDocument *document, const char *title);
118 const char *desktopcouch_document_contact_get_first_name (CouchdbDocument *document);
119 void desktopcouch_document_contact_set_first_name (CouchdbDocument *document, const char *first_name);
120+const char *desktopcouch_document_contact_get_middle_name (CouchdbDocument *document);
121+void desktopcouch_document_contact_set_middle_name (CouchdbDocument *document, const char *middle_name);
122 const char *desktopcouch_document_contact_get_last_name (CouchdbDocument *document);
123 void desktopcouch_document_contact_set_last_name (CouchdbDocument *document, const char *last_name);
124+const char *desktopcouch_document_contact_get_suffix (CouchdbDocument *document);
125+void desktopcouch_document_contact_set_suffix (CouchdbDocument *document, const char *suffix);
126+
127 const char *desktopcouch_document_contact_get_nick_name (CouchdbDocument *document);
128 void desktopcouch_document_contact_set_nick_name (CouchdbDocument *document, const char *nick_name);
129 const char *desktopcouch_document_contact_get_spouse_name (CouchdbDocument *document);
130@@ -53,8 +60,6 @@
131 void desktopcouch_document_contact_set_company (CouchdbDocument *document, const char *company);
132 const char *desktopcouch_document_contact_get_department (CouchdbDocument *document);
133 void desktopcouch_document_contact_set_department (CouchdbDocument *document, const char *department);
134-const char *desktopcouch_document_contact_get_title (CouchdbDocument *document);
135-void desktopcouch_document_contact_set_title (CouchdbDocument *document, const char *title);
136 const char *desktopcouch_document_contact_get_job_title (CouchdbDocument *document);
137 void desktopcouch_document_contact_set_job_title (CouchdbDocument *document, const char *job_title);
138 const char *desktopcouch_document_contact_get_manager_name (CouchdbDocument *document);

Subscribers

People subscribed via source and target branches