1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
4 * Copyright (C) 2004 Novell, Inc.
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 #ifndef E_BOOK_BACKEND_DB_CACHE_H
23 #define E_BOOK_BACKEND_DB_CACHE_H
25 #include <libebook/e-contact.h>
28 EContact* e_book_backend_db_cache_get_contact (DB *db, const char *uid);
29 void string_to_dbt(const char *str, DBT *dbt);
30 char *e_book_backend_db_cache_get_filename(DB *db);
31 void e_book_backend_db_cache_set_filename(DB *db, const char *filename);
32 gboolean e_book_backend_db_cache_add_contact (DB *db,
34 gboolean e_book_backend_db_cache_remove_contact (DB *db,
36 gboolean e_book_backend_db_cache_check_contact (DB *db, const char *uid);
37 GList* e_book_backend_db_cache_get_contacts (DB *db, const char *query);
38 gboolean e_book_backend_db_cache_exists (const char *uri);
39 void e_book_backend_db_cache_set_populated (DB *db);
40 gboolean e_book_backend_db_cache_is_populated (DB *db);
41 GPtrArray* e_book_backend_db_cache_search (DB *db, const char *query);