| Evolution-Data-Server Manual: Address Book Backend (libedata-book) | ||||
|---|---|---|---|---|
| Top | Description | ||||
EContact * e_book_backend_db_cache_get_contact (struct __db *db,const gchar *uid); gchar * e_book_backend_db_cache_get_filename (struct __db *db); void e_book_backend_db_cache_set_filename (struct __db *db,const gchar *filename); gboolean e_book_backend_db_cache_add_contact (struct __db *db,EContact *contact); gboolean e_book_backend_db_cache_remove_contact (struct __db *db,const gchar *uid); gboolean e_book_backend_db_cache_check_contact (struct __db *db,const gchar *uid); GList * e_book_backend_db_cache_get_contacts (struct __db *db,const gchar *query); gboolean e_book_backend_db_cache_exists (const gchar *uri); void e_book_backend_db_cache_set_populated (struct __db *db); gboolean e_book_backend_db_cache_is_populated (struct __db *db); GPtrArray * e_book_backend_db_cache_search (struct __db *db,const gchar *query); void e_book_backend_db_cache_set_time (struct __db *db,const gchar *t); gchar * e_book_backend_db_cache_get_time (struct __db *db);
EContact * e_book_backend_db_cache_get_contact (struct __db *db,const gchar *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.
|
DB Handle |
|
a unique contact ID |
Returns : |
A cached EContact, or NULL if uid is not cached. |
gchar * e_book_backend_db_cache_get_filename
(struct __db *db);
Get the filename for db cacahe file.
|
DB Handle |
void e_book_backend_db_cache_set_filename (struct __db *db,const gchar *filename);
Set the filename for db cacahe file.
|
DB Handle |
|
filename to be set |
gboolean e_book_backend_db_cache_add_contact (struct __db *db,EContact *contact);
Adds contact to cache.
|
DB Handle |
|
an EContact |
Returns : |
TRUE if the contact was cached successfully, FALSE otherwise. |
gboolean e_book_backend_db_cache_remove_contact (struct __db *db,const gchar *uid);
Removes the contact identified by uid from cache.
|
DB Handle |
|
a unique contact ID |
Returns : |
TRUE if the contact was found and removed, FALSE otherwise. |
gboolean e_book_backend_db_cache_check_contact (struct __db *db,const gchar *uid);
Checks if the contact identified by uid exists in cache.
|
DB Handle |
|
a unique contact ID |
Returns : |
TRUE if the cache contains the contact, FALSE otherwise. |
GList * e_book_backend_db_cache_get_contacts (struct __db *db,const gchar *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.
|
DB Handle |
|
an s-expression |
Returns : |
A GList of pointers to EContact. |
gboolean e_book_backend_db_cache_exists (const gchar *uri);
Checks if an EBookBackendCache exists at uri.
|
URI for the cache |
Returns : |
TRUE if cache exists, FALSE if not. |
void e_book_backend_db_cache_set_populated
(struct __db *db);
Flags cache as being populated - that is, it is up-to-date on the
contents of the book it's caching.
|
DB handle |
gboolean e_book_backend_db_cache_is_populated
(struct __db *db);
GPtrArray * e_book_backend_db_cache_search (struct __db *db,const gchar *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.
|
DB handle |
|
an s-expression |
Returns : |
A GPtrArray of pointers to contact ID strings. |
void e_book_backend_db_cache_set_time (struct __db *db,const gchar *t);
Since 2.26