1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
4 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
6 * Authors: Devashish Sharma <sdevashish@novell.com>
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of version 2 of the GNU Lesser General Public
10 * License as published by the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 #if !defined (__LIBEDATA_BOOK_H_INSIDE__) && !defined (LIBEDATA_BOOK_COMPILATION)
23 #error "Only <libedata-book/libedata-book.h> should be included directly."
26 #ifndef E_BOOK_BACKEND_DB_CACHE_H
27 #define E_BOOK_BACKEND_DB_CACHE_H
29 #include <libebook/libebook.h>
33 /* Avoid including <db.h> in a public header file. */
36 EContact * e_book_backend_db_cache_get_contact (struct __db *db, const gchar *uid);
37 gchar *e_book_backend_db_cache_get_filename (struct __db *db);
38 void e_book_backend_db_cache_set_filename (struct __db *db, const gchar *filename);
39 gboolean e_book_backend_db_cache_add_contact (struct __db *db,
41 gboolean e_book_backend_db_cache_remove_contact (struct __db *db,
43 gboolean e_book_backend_db_cache_check_contact (struct __db *db, const gchar *uid);
44 GList * e_book_backend_db_cache_get_contacts (struct __db *db, const gchar *query);
45 gboolean e_book_backend_db_cache_exists (const gchar *uri);
46 void e_book_backend_db_cache_set_populated (struct __db *db);
47 gboolean e_book_backend_db_cache_is_populated (struct __db *db);
48 GPtrArray * e_book_backend_db_cache_search (struct __db *db, const gchar *query);
49 void e_book_backend_db_cache_set_time (struct __db *db, const gchar *t);
50 gchar * e_book_backend_db_cache_get_time (struct __db *db);