~ubuntu-branches/ubuntu/breezy/evolution-data-server/breezy

« back to all changes in this revision

Viewing changes to addressbook/libedata-book/e-book-backend-sync.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2005-10-10 11:30:56 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20051010113056-rb4vj4kbs8yxft85
Tags: 1.4.1-0ubuntu3
* debian/patches/camel-imap-store.c.patch:
  - Ubuntu 17465: apply patch from
  http://bugzilla.gnome.org/attachment.cgi?id=53234&action=view
  (additional NULL pointer check)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
static GObjectClass *parent_class;
21
21
 
 
22
/**
 
23
 * e_book_backend_sync_construct:
 
24
 * @backend: an #EBookBackendSync
 
25
 *
 
26
 * Does nothing.
 
27
 *
 
28
 * Return value: %TRUE.
 
29
 **/
22
30
gboolean
23
31
e_book_backend_sync_construct (EBookBackendSync *backend)
24
32
{
25
33
        return TRUE;
26
34
}
27
35
 
 
36
/**
 
37
 * e_book_backend_sync_create_contact:
 
38
 * @backend: an #EBookBackendSync
 
39
 * @book: an #EDataBook
 
40
 * @opid: the unique ID of the operation
 
41
 * @vcard: a VCard representation of a contact
 
42
 * @contact: a pointer to a location to store the resulting #EContact
 
43
 *
 
44
 * Creates a new contact with the contents of @vcard in @backend.
 
45
 *
 
46
 * Return value: An #EBookBackendSyncStatus indicating the outcome of the operation.
 
47
 **/
28
48
EBookBackendSyncStatus
29
49
e_book_backend_sync_create_contact (EBookBackendSync *backend,
30
50
                                    EDataBook *book,
42
62
        return (* E_BOOK_BACKEND_SYNC_GET_CLASS (backend)->create_contact_sync) (backend, book, opid, vcard, contact);
43
63
}
44
64
 
 
65
/**
 
66
 * e_book_backend_sync_remove:
 
67
 * @backend: an #EBookBackendSync
 
68
 * @book: an #EDataBook
 
69
 * @opid: the unique ID of the operation
 
70
 *
 
71
 * Remove @book's database and storage overhead from the storage
 
72
 * medium. This will delete all contacts in @book.
 
73
 *
 
74
 * Return value: An #EBookBackendSyncStatus indicating the outcome of the operation.
 
75
 **/
45
76
EBookBackendSyncStatus
46
77
e_book_backend_sync_remove (EBookBackendSync *backend,
47
78
                            EDataBook *book,
55
86
        return (* E_BOOK_BACKEND_SYNC_GET_CLASS (backend)->remove_sync) (backend, book, opid);
56
87
}
57
88
 
 
89
/**
 
90
 * e_book_backend_sync_remove_contacts:
 
91
 * @backend: an #EBookBackendSync
 
92
 * @book: an #EDataBook
 
93
 * @opid: the unique ID of the operation
 
94
 * @id_list: a #GList of pointers to unique contact ID strings
 
95
 * @removed_ids: a pointer to a location to store a list of the contacts actually removed
 
96
 *
 
97
 * Removes the contacts specified by @id_list from @backend. The returned list
 
98
 * of removed contacts is in the same format as the passed-in list, and must be
 
99
 * freed by the caller.
 
100
 *
 
101
 * Return value: An #EBookBackendSyncStatus indicating the outcome of the operation.
 
102
 **/
58
103
EBookBackendSyncStatus
59
104
e_book_backend_sync_remove_contacts (EBookBackendSync *backend,
60
105
                                     EDataBook *book,
72
117
        return (* E_BOOK_BACKEND_SYNC_GET_CLASS (backend)->remove_contacts_sync) (backend, book, opid, id_list, removed_ids);
73
118
}
74
119
 
 
120
/**
 
121
 * e_book_backend_sync_modify_contact:
 
122
 * @backend: an #EBookBackendSync
 
123
 * @book: an #EDataBook
 
124
 * @opid: the unique ID of the operation
 
125
 * @vcard: the string representation of a contact
 
126
 * @contact: a pointer to a location to store the resulting #EContact
 
127
 * 
 
128
 * Modifies the contact specified by the ID embedded in @vcard, to
 
129
 * reflect the full contents of @vcard.
 
130
 *
 
131
 * Return value: An #EBookBackendSyncStatus indicating the outcome of the operation.
 
132
 **/
75
133
EBookBackendSyncStatus
76
134
e_book_backend_sync_modify_contact (EBookBackendSync *backend,
77
135
                                    EDataBook *book,
89
147
        return (* E_BOOK_BACKEND_SYNC_GET_CLASS (backend)->modify_contact_sync) (backend, book, opid, vcard, contact);
90
148
}
91
149
 
 
150
/**
 
151
 * e_book_backend_sync_get_contact:
 
152
 * @backend: an #EBookBackendSync
 
153
 * @book: an #EDataBook
 
154
 * @opid: the unique ID of the operation
 
155
 * @id: a unique contact ID
 
156
 * @vcard: a pointer to a location to store the resulting VCard string
 
157
 *
 
158
 * Gets a contact from @book.
 
159
 *
 
160
 * Return value: An #EBookBackendSyncStatus indicating the outcome of the operation.
 
161
 **/
92
162
EBookBackendSyncStatus
93
163
e_book_backend_sync_get_contact (EBookBackendSync *backend,
94
164
                                 EDataBook *book,
106
176
        return (* E_BOOK_BACKEND_SYNC_GET_CLASS (backend)->get_contact_sync) (backend, book, opid, id, vcard);
107
177
}
108
178
 
 
179
/**
 
180
 * e_book_backend_sync_get_contact_list:
 
181
 * @backend: an #EBookBackendSync
 
182
 * @book: an #EDataBook
 
183
 * @opid: the unique ID of the operation
 
184
 * @query: an s-expression of the query to perform
 
185
 * @contacts: a pointer to a location to store the resulting list of VCard strings
 
186
 *
 
187
 * Gets a list of contacts from @book. The list and its elements must be freed
 
188
 * by the caller.
 
189
 * 
 
190
 * Return value: An #EBookBackendSyncStatus indicating the outcome of the operation.
 
191
 **/
109
192
EBookBackendSyncStatus
110
193
e_book_backend_sync_get_contact_list (EBookBackendSync *backend,
111
194
                                      EDataBook *book,
123
206
        return (* E_BOOK_BACKEND_SYNC_GET_CLASS (backend)->get_contact_list_sync) (backend, book, opid, query, contacts);
124
207
}
125
208
 
 
209
/**
 
210
 * e_book_backend_sync_get_changes:
 
211
 * @backend: an #EBookBackendSync
 
212
 * @book: an #EDataBook
 
213
 * @opid: the unique ID of the operation
 
214
 * @change_id: a unique changes ID
 
215
 * @changes: a pointer to a location to store the resulting list of changes
 
216
 *
 
217
 * Gets the changes made to @book since the last call to this function.
 
218
 * The returned list will contain items of CORBA type
 
219
 * #GNOME_Evolution_Addressbook_BookChangeItem.
 
220
 *
 
221
 * Return value: An #EBookBackendSyncStatus indicating the outcome of the operation.
 
222
 **/
126
223
EBookBackendSyncStatus
127
224
e_book_backend_sync_get_changes (EBookBackendSync *backend,
128
225
                                 EDataBook *book,
140
237
        return (* E_BOOK_BACKEND_SYNC_GET_CLASS (backend)->get_changes_sync) (backend, book, opid, change_id, changes);
141
238
}
142
239
 
 
240
/**
 
241
 * e_book_backend_sync_authenticate_user:
 
242
 * @backend: an #EBookBackendSync
 
243
 * @book: an #EDataBook
 
244
 * @opid: the unique ID of the operation
 
245
 * @user: the user's name
 
246
 * @passwd: the user's password
 
247
 * @auth_method: the authentication method desired
 
248
 *
 
249
 * Authenticates @user against @book.
 
250
 *
 
251
 * Return value: An #EBookBackendSyncStatus indicating the outcome of the operation.
 
252
 **/
143
253
EBookBackendSyncStatus
144
254
e_book_backend_sync_authenticate_user (EBookBackendSync *backend,
145
255
                                       EDataBook *book,
157
267
        return (* E_BOOK_BACKEND_SYNC_GET_CLASS (backend)->authenticate_user_sync) (backend, book, opid, user, passwd, auth_method);
158
268
}
159
269
 
 
270
/**
 
271
 * e_book_backend_sync_get_required_fields:
 
272
 * @backend: an #EBookBackendSync
 
273
 * @book: an #EDataBook
 
274
 * @opid: the unique ID of the operation
 
275
 * @fields: a pointer to a location to store the fields
 
276
 *
 
277
 * Gets a list of the fields required for all contacts in @book. The
 
278
 * fields are represented by strings from #e_contact_field_name. The list
 
279
 * and its contents must be freed by the caller.
 
280
 *
 
281
 * Return value: An #EBookBackendSyncStatus indicating the outcome of the operation.
 
282
 **/
160
283
EBookBackendSyncStatus
161
284
e_book_backend_sync_get_required_fields (EBookBackendSync *backend,
162
285
                                          EDataBook *book,
172
295
        return (* E_BOOK_BACKEND_SYNC_GET_CLASS (backend)->get_required_fields_sync) (backend, book, opid, fields);
173
296
}
174
297
 
 
298
/**
 
299
 * e_book_backend_sync_get_supported_fields:
 
300
 * @backend: an #EBookBackendSync
 
301
 * @book: an #EDataBook
 
302
 * @opid: the unique ID of the operation
 
303
 * @fields: a pointer to a location to store the fields
 
304
 *
 
305
 * Gets a list of the fields supported for contacts in @book. Other fields
 
306
 * may not be stored. The fields are represented by strings from #e_contact_field_name.
 
307
 * The list and its contents must be freed by the caller.
 
308
 *
 
309
 * Return value: An #EBookBackendSyncStatus indicating the outcome of the operation.
 
310
 **/
175
311
EBookBackendSyncStatus
176
312
e_book_backend_sync_get_supported_fields (EBookBackendSync *backend,
177
313
                                          EDataBook *book,
187
323
        return (* E_BOOK_BACKEND_SYNC_GET_CLASS (backend)->get_supported_fields_sync) (backend, book, opid, fields);
188
324
}
189
325
 
 
326
/**
 
327
 * e_book_backend_sync_get_supported_auth_methods:
 
328
 * @backend: an #EBookBackendSync
 
329
 * @book: an #EDataBook
 
330
 * @opid: the unique ID of the operation
 
331
 * @methods: a pointer to a location to store the methods
 
332
 *
 
333
 * Gets a list of the authentication methods supported by @book. The
 
334
 * methods are represented by strings. The list and its contents must
 
335
 * be freed by the caller.
 
336
 *
 
337
 * Return value: An #EBookBackendSyncStatus indicating the outcome of the operation.
 
338
 **/
190
339
EBookBackendSyncStatus
191
340
e_book_backend_sync_get_supported_auth_methods (EBookBackendSync *backend,
192
341
                                                EDataBook *book,