![]() |
![]() |
![]() |
Evolution API Reference: libedata-book, the Addressbook backend library | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
EBookBackendCache; EBookBackendCache* e_book_backend_cache_new (const char *uri); EContact* e_book_backend_cache_get_contact (EBookBackendCache *cache, const char *uid); gboolean e_book_backend_cache_add_contact (EBookBackendCache *cache, EContact *contact); gboolean e_book_backend_cache_remove_contact (EBookBackendCache *cache, const char *uid); gboolean e_book_backend_cache_check_contact (EBookBackendCache *cache, const char *uid); GList* e_book_backend_cache_get_contacts (EBookBackendCache *cache, const char *query); gboolean e_book_backend_cache_exists (const char *uri); void e_book_backend_cache_set_populated (EBookBackendCache *cache); gboolean e_book_backend_cache_is_populated (EBookBackendCache *cache); void e_book_backend_cache_set_time (EBookBackendCache *cache, const char *t); char * e_book_backend_cache_get_time (EBookBackendCache *cache); GPtrArray* e_book_backend_cache_search (EBookBackendCache *cache, const char *query);
EBookBackendCache* e_book_backend_cache_new (const char *uri);
Creates a new EBookBackendCache object, which implements a local cache of EContact objects, useful for remote backends.
|
URI of the backend to be cached. |
Returns : |
A new EBookBackendCache. |
EContact* e_book_backend_cache_get_contact (EBookBackendCache *cache, const char *uid);
Get a cached contact. Note that the returned EContact will be newly created, and must be unreffed by the caller when no longer needed.
|
an EBookBackendCache |
|
a unique contact ID |
Returns : |
A cached EContact, or NULL if uid is not cached.
|
gboolean e_book_backend_cache_add_contact (EBookBackendCache *cache, EContact *contact);
Adds contact
to cache
.
|
an EBookBackendCache |
|
an EContact |
Returns : |
TRUE if the contact was cached successfully, FALSE otherwise.
|
gboolean e_book_backend_cache_remove_contact (EBookBackendCache *cache, const char *uid);
Removes the contact identified by uid
from cache
.
|
an EBookBackendCache |
|
a unique contact ID |
Returns : |
TRUE if the contact was found and removed, FALSE otherwise.
|
gboolean e_book_backend_cache_check_contact (EBookBackendCache *cache, const char *uid);
Checks if the contact identified by uid
exists in cache
.
|
an EBookBackendCache |
|
a unique contact ID |
Returns : |
TRUE if the cache contains the contact, FALSE otherwise.
|
GList* e_book_backend_cache_get_contacts (EBookBackendCache *cache, const char *query);
Returns a list of EContact elements from cache
matching query
.
When done with the list, the caller must unref the contacts and
free the list.
|
an EBookBackendCache |
|
an s-expression |
Returns : |
A GList of pointers to EContact. |
gboolean e_book_backend_cache_exists (const char *uri);
Checks if an EBookBackendCache exists at uri
.
|
URI for the cache |
Returns : |
TRUE if cache exists, FALSE if not.
|
void e_book_backend_cache_set_populated (EBookBackendCache *cache);
Flags cache
as being populated - that is, it is up-to-date on the
contents of the book it's caching.
|
an EBookBackendCache |
gboolean e_book_backend_cache_is_populated (EBookBackendCache *cache);
Checks if cache
is populated.
|
|
Returns : |
TRUE if cache is populated, FALSE otherwise.
|
void e_book_backend_cache_set_time (EBookBackendCache *cache, const char *t);
|
|
|
char * e_book_backend_cache_get_time (EBookBackendCache *cache);
|
|
Returns : |
GPtrArray* e_book_backend_cache_search (EBookBackendCache *cache, const char *query);
Returns an array of pointers to unique contact ID strings for contacts
in cache
matching query
. When done with the array, the caller must
free the ID strings and the array.
|
an EBookBackendCache |
|
an s-expression |
Returns : |
A GPtrArray of pointers to contact ID strings. |