0.8.11claws26
[claws.git] / src / mutt.h
1 /*
2  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 2001 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  */
19
20 /*
21  * Definitions necessary to access MUTT addressbook files. These are
22  * used by the MUTT E-Mail client.
23  */
24
25 #ifndef __MUTT_H__
26 #define __MUTT_H__
27
28 #include <stdio.h>
29 #include <glib.h>
30
31 #include "addrcache.h"
32
33 /*
34 * Typical MUTT entry:
35 *
36 * alias alias-name email-address (friendly-name) [, email-address (friendly-name) ...]
37 *
38 * The alias-name maybe the name of an individual or the name of a group
39 * comprising many individuals. The alias name should not contain the space,
40 * comma (,) or at (@) character. The friendly-name is optional. A back-slash
41 * character at end-of-line may be used as a continuation character.
42 *
43 * An example:
44
45 * alias myhome  axel@axelrose.com (Axel Rose)
46 * alias axe     axelrose@aol.com  (The Axe)
47 * alias buddies esr@wheres-my-mail.com (Eric Raymond), bgates@hotmail.com (Oops Lost It)
48 *
49 */
50
51 /* MUTT file object */
52 typedef struct _MuttFile MuttFile;
53 struct _MuttFile {
54         FILE  *file;
55         gchar *path;
56         gint  retVal;
57         GHashTable *uniqTable;
58         void  (*cbProgress)( void *, void *, void * );
59 };
60
61 /* Function prototypes */
62 MuttFile *mutt_create   ( void );
63 void mutt_set_file      ( MuttFile* muttFile, const gchar *value );
64 void mutt_free          ( MuttFile *muttFile );
65 gint mutt_import_data   ( MuttFile *muttFile, AddressCache *cache );
66 gchar *mutt_find_file   ( void );
67
68 #endif /* __MUTT_H__ */
69