Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / addressbook / libedata-book / e-book-backend-db-cache.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* 
3  * 
4  * Copyright (C) 2004 Novell, Inc.
5  *
6  * Authors: Devashish Sharma <sdevashish@novell.com>
7  *
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.
11  *
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.
16  *
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.
20  */
21
22 #ifndef E_BOOK_BACKEND_DB_CACHE_H
23 #define E_BOOK_BACKEND_DB_CACHE_H
24
25 #include <libebook/e-contact.h>
26 #include "db.h"
27
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,
33                                            EContact *contact);
34 gboolean e_book_backend_db_cache_remove_contact (DB *db,
35                                               const char *uid);
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);
42
43
44
45
46 G_END_DECLS
47
48 #endif
49