new matcher parser / bounce fix / rrr fixed
[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 #define MUTTBUFSIZE         2048
34
35 #define MUTT_TAG_ALIAS      "alias"
36
37 /*
38 // Typical MUTT entry:
39 //
40 // alias alias-name email-address (friendly-name) [, email-address (friendly-name) ...]
41 //
42 // The alias-name maybe the name of an individual or the name of a group
43 // comprising many individuals. The alias name should not contain the space,
44 // comma (,) or at (@) character. The friendly-name is optional. A back-slash
45 // character at end-of-line may be used as a continuation character.
46 //
47 // An example:
48 // 
49 // alias myhome  axel@axelrose.com (Axel Rose)
50 // alias axe     axelrose@aol.com  (The Axe)
51 // alias buddies esr@wheres-my-mail.com (Eric Raymond), bgates@hotmail.com (Oops Lost It)
52 //
53 */
54
55 /* MUTT file object */
56 typedef struct _MuttFile MuttFile;
57 struct _MuttFile {
58         FILE  *file;
59         gchar *path;
60         gchar *bufptr;
61         gchar buffer[ MUTTBUFSIZE ];
62         gint  retVal;
63         void  (*cbProgress)( void *, void *, void * );
64 };
65
66 /* Function prototypes */
67 MuttFile *mutt_create   ( void );
68 void mutt_set_file      ( MuttFile* muttFile, const gchar *value );
69 void mutt_free          ( MuttFile *muttFile );
70 gint mutt_import_data   ( MuttFile *muttFile, AddressCache *cache );
71 gchar *mutt_find_file   ( void );
72
73 #endif /* __MUTT_H__ */
74