~ubuntu-branches/ubuntu/maverick/evolution-data-server/maverick-proposed

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.1.79 upstream) (1.6.12 experimental)
  • Revision ID: james.westby@ubuntu.com-20100517170206-4ufr52vwrhh26yh0
Tags: 2.30.1-1ubuntu1
* Merge from debian experimental. Remaining change:
  (LP: #42199, #229669, #173703, #360344, #508494)
  + debian/control:
    - add Vcs-Bzr tag
    - don't use libgnome
    - Use Breaks instead of Conflicts against evolution 2.25 and earlier.
  + debian/evolution-data-server.install,
    debian/patches/45_libcamel_providers_version.patch:
    - use the upstream versioning, not a Debian-specific one 
  + debian/libedata-book1.2-dev.install, debian/libebackend-1.2-dev.install,
    debian/libcamel1.2-dev.install, debian/libedataserverui1.2-dev.install:
    - install html documentation
  + debian/rules:
    - don't build documentation it's shipped with the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include "e-book-backend-cache.h"
28
28
#include "e-book-backend-sexp.h"
29
29
 
 
30
G_DEFINE_TYPE (EBookBackendCache, e_book_backend_cache, E_TYPE_FILE_CACHE)
 
31
 
30
32
struct _EBookBackendCachePrivate {
31
33
        gchar *uri;
32
34
};
189
191
 
190
192
}
191
193
 
192
 
GType
193
 
e_book_backend_cache_get_type (void)
194
 
{
195
 
        static GType type = 0;
196
 
 
197
 
        if (!type) {
198
 
                static GTypeInfo info = {
199
 
                        sizeof (EBookBackendCacheClass),
200
 
                        (GBaseInitFunc) NULL,
201
 
                        (GBaseFinalizeFunc) NULL,
202
 
                        (GClassInitFunc) e_book_backend_cache_class_init,
203
 
                        NULL, NULL,
204
 
                        sizeof (EBookBackendCache),
205
 
                        0,
206
 
                        (GInstanceInitFunc) e_book_backend_cache_init,
207
 
                };
208
 
                type = g_type_register_static (E_TYPE_FILE_CACHE, "EBookBackendCache", &info, 0);
209
 
        }
210
 
 
211
 
        return type;
212
 
}
213
 
 
214
194
/**
215
195
 * e_book_backend_cache_new
216
196
 * @uri: URI of the backend to be cached.
218
198
 * Creates a new #EBookBackendCache object, which implements a local
219
199
 * cache of #EContact objects, useful for remote backends.
220
200
 *
221
 
 * Return value: A new #EBookBackendCache.
 
201
 * Returns: A new #EBookBackendCache.
222
202
 */
223
203
EBookBackendCache *
224
204
e_book_backend_cache_new (const gchar *uri)
239
219
 * newly created, and must be unreffed by the caller when no longer
240
220
 * needed.
241
221
 *
242
 
 * Return value: A cached #EContact, or %NULL if @uid is not cached.
 
222
 * Returns: A cached #EContact, or %NULL if @uid is not cached.
243
223
 **/
244
224
EContact *
245
225
e_book_backend_cache_get_contact (EBookBackendCache *cache, const gchar *uid)
266
246
 *
267
247
 * Adds @contact to @cache.
268
248
 *
269
 
 * Return value: %TRUE if the contact was cached successfully, %FALSE otherwise.
 
249
 * Returns: %TRUE if the contact was cached successfully, %FALSE otherwise.
270
250
 **/
271
251
gboolean
272
252
e_book_backend_cache_add_contact (EBookBackendCache *cache,
301
281
 *
302
282
 * Removes the contact identified by @uid from @cache.
303
283
 *
304
 
 * Return value: %TRUE if the contact was found and removed, %FALSE otherwise.
 
284
 * Returns: %TRUE if the contact was found and removed, %FALSE otherwise.
305
285
 **/
306
286
gboolean
307
287
e_book_backend_cache_remove_contact (EBookBackendCache *cache,
332
312
 *
333
313
 * Checks if the contact identified by @uid exists in @cache.
334
314
 *
335
 
 * Return value: %TRUE if the cache contains the contact, %FALSE otherwise.
 
315
 * Returns: %TRUE if the cache contains the contact, %FALSE otherwise.
336
316
 **/
337
317
gboolean
338
318
e_book_backend_cache_check_contact (EBookBackendCache *cache, const gchar *uid)
361
341
 * When done with the list, the caller must unref the contacts and
362
342
 * free the list.
363
343
 *
364
 
 * Return value: A #GList of pointers to #EContact.
 
344
 * Returns: A #GList of pointers to #EContact.
365
345
 **/
366
346
GList *
367
347
e_book_backend_cache_get_contacts (EBookBackendCache *cache, const gchar *query)
411
391
 * in @cache matching @query. When done with the array, the caller must
412
392
 * free the ID strings and the array.
413
393
 *
414
 
 * Return value: A #GPtrArray of pointers to contact ID strings.
 
394
 * Returns: A #GPtrArray of pointers to contact ID strings.
415
395
 **/
416
396
GPtrArray *
417
397
e_book_backend_cache_search (EBookBackendCache *cache, const gchar *query)
438
418
 *
439
419
 * Checks if an #EBookBackendCache exists at @uri.
440
420
 *
441
 
 * Return value: %TRUE if cache exists, %FALSE if not.
 
421
 * Returns: %TRUE if cache exists, %FALSE if not.
442
422
 **/
443
423
gboolean
444
424
e_book_backend_cache_exists (const gchar *uri)
476
456
 *
477
457
 * Checks if @cache is populated.
478
458
 *
479
 
 * Return value: %TRUE if @cache is populated, %FALSE otherwise.
 
459
 * Returns: %TRUE if @cache is populated, %FALSE otherwise.
480
460
 **/
481
461
gboolean
482
462
e_book_backend_cache_is_populated (EBookBackendCache *cache)