2005-11-08 [colin] 1.9.100cvs3
[claws.git] / src / addrcindex.h
1 /*
2  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 2002-2003 Match Grun
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19
20 /*
21  * Functions to maintain address completion index.
22  */
23
24 #ifndef __ADDRCINDEX_H__
25 #define __ADDRCINDEX_H__
26
27 #include <glib.h>
28 #include <stdio.h>
29
30 #include "addritem.h"
31
32 /*
33  * Constants.
34  */
35
36 /* Data structures */
37 typedef struct {
38         GCompletion *completion;
39         GList       *addressList;
40         gboolean    invalid;
41 }
42 AddrCacheIndex;
43
44 /* Function prototypes */
45 AddrCacheIndex *addrcindex_create       ( void );
46 void addrcindex_clear           ( AddrCacheIndex *index );
47 void addrcindex_free            ( AddrCacheIndex *index );
48 void addrcindex_invalidate      ( AddrCacheIndex *index );
49 void addrcindex_validate        ( AddrCacheIndex *index );
50 void addrcindex_add_entry       ( AddrCacheIndex *index,
51                                   gchar *name,
52                                   ItemEMail *email );
53 void addrcindex_add_email       ( AddrCacheIndex *index, ItemEMail *email );
54 void addrcindex_add_person      ( AddrCacheIndex *index, ItemPerson *person );
55 void addrcindex_print           ( AddrCacheIndex *index, FILE *stream );
56 GList *addrcindex_search        ( AddrCacheIndex *index, const gchar *search );
57
58 #endif /* __ADDRCINDEX_H__ */
59
60 /*
61 * End of Source.
62 */