1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ 2 /* 3 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) 4 * 5 * This library is free software: you can redistribute it and/or modify it 6 * under the terms of the GNU Lesser General Public License as published by 7 * the Free Software Foundation. 8 * 9 * This library is distributed in the hope that it will be useful, but 10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License 12 * for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public License 15 * along with this library. If not, see <http://www.gnu.org/licenses/>. 16 * 17 * Authors: Devashish Sharma <sdevashish@novell.com> 18 */ 19 20 #ifndef E_BOOK_BACKEND_DB_CACHE_H 21 #define E_BOOK_BACKEND_DB_CACHE_H 22 23 #ifndef EDS_DISABLE_DEPRECATED 24 25 #include <libebook-contacts/libebook-contacts.h> 26 27 G_BEGIN_DECLS 28 29 /* Avoid including <db.h> in a public header file. */ 30 struct __db; 31 32 EContact * e_book_backend_db_cache_get_contact 33 (struct __db *db, 34 const gchar *uid); 35 gchar * e_book_backend_db_cache_get_filename 36 (struct __db *db); 37 void e_book_backend_db_cache_set_filename 38 (struct __db *db, 39 const gchar *filename); 40 gboolean e_book_backend_db_cache_add_contact 41 (struct __db *db, 42 EContact *contact); 43 gboolean e_book_backend_db_cache_remove_contact 44 (struct __db *db, 45 const gchar *uid); 46 gboolean e_book_backend_db_cache_check_contact 47 (struct __db *db, 48 const gchar *uid); 49 GList * e_book_backend_db_cache_get_contacts 50 (struct __db *db, 51 const gchar *query); 52 gboolean e_book_backend_db_cache_exists (const gchar *uri); 53 void e_book_backend_db_cache_set_populated 54 (struct __db *db); 55 gboolean e_book_backend_db_cache_is_populated 56 (struct __db *db); 57 GPtrArray * e_book_backend_db_cache_search (struct __db *db, 58 const gchar *query); 59 void e_book_backend_db_cache_set_time 60 (struct __db *db, 61 const gchar *t); 62 gchar * e_book_backend_db_cache_get_time 63 (struct __db *db); 64 65 G_END_DECLS 66 67 #endif /* EDS_DISABLE_DEPRECATED */ 68 69 #endif /* E_BOOK_BACKEND_DB_CACHE_H */ 70 71