Enable GUI option for 'custom command' connection. Don't g_free strings in
[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 2000 Ximian, Inc. (www.ximian.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 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 General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22  * USA
23  */
24
25 #ifndef CAMEL_UID_CACHE_H
26 #define CAMEL_UID_CACHE_H 1
27
28 #ifdef __cplusplus
29 extern "C" {
30 #pragma }
31 #endif /* __cplusplus */
32
33 #include <glib.h>
34
35 #include <stdio.h>
36 #include <sys/types.h>
37
38 typedef struct {
39         char *filename;
40         GHashTable *uids;
41         unsigned int level;
42         size_t expired;
43         size_t size;
44         int fd;
45 } CamelUIDCache;
46
47 CamelUIDCache *camel_uid_cache_new (const char *filename);
48 gboolean camel_uid_cache_save (CamelUIDCache *cache);
49 void camel_uid_cache_destroy (CamelUIDCache *cache);
50
51 GPtrArray *camel_uid_cache_get_new_uids (CamelUIDCache *cache, GPtrArray *uids);
52
53 void camel_uid_cache_save_uid (CamelUIDCache *cache, const char *uid);
54 void camel_uid_cache_free_uids (GPtrArray *uids);
55
56 #ifdef __cplusplus
57 }
58 #endif /* __cplusplus */
59
60 #endif /* CAMEL_UID_CACHE_H */