Extending test-client-custom-summary to try e_book_client_get_contacts_uids()
[platform/upstream/evolution-data-server.git] / camel / camel-uid-cache.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* camel-uid-cache.h: UID caching code. */
3
4 /*
5  * Authors:
6  *  Bertrand Guiheneuf <bertrand@helixcode.com>
7  *
8  * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of version 2 of the GNU Lesser General Public
12  * License as published by the Free Software Foundation.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
22  * USA
23  */
24
25 #if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
26 #error "Only <camel/camel.h> can be included directly."
27 #endif
28
29 #ifndef CAMEL_UID_CACHE_H
30 #define CAMEL_UID_CACHE_H
31
32 #include <glib.h>
33
34 #include <stdio.h>
35 #include <sys/types.h>
36
37 G_BEGIN_DECLS
38
39 typedef struct {
40         gchar *filename;
41         GHashTable *uids;
42         guint level;
43         gsize expired;
44         gsize size;
45         gint fd;
46 } CamelUIDCache;
47
48 CamelUIDCache *camel_uid_cache_new (const gchar *filename);
49 gboolean camel_uid_cache_save (CamelUIDCache *cache);
50 void camel_uid_cache_destroy (CamelUIDCache *cache);
51
52 GPtrArray *camel_uid_cache_get_new_uids (CamelUIDCache *cache, GPtrArray *uids);
53
54 void camel_uid_cache_save_uid (CamelUIDCache *cache, const gchar *uid);
55 void camel_uid_cache_free_uids (GPtrArray *uids);
56
57 G_END_DECLS
58
59 #endif /* CAMEL_UID_CACHE_H */