* src/summaryview.c
[claws.git] / src / pine.h
1 /*
2  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 2002 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 Pine addressbook files. These are
22  * used by the Pine E-Mail client.
23  */
24
25 #ifndef __PINE_H__
26 #define __PINE_H__
27
28 #include <stdio.h>
29 #include <glib.h>
30
31 #include "addrcache.h"
32
33 /*
34 * Typical Pine simple entry:
35 *
36 *   nick-name \t friendly-name \t email-address \t fcc \t comments
37 *
38 * Or for a distribution list:
39 *
40 *   group-name \t friendly-name \t ( email, email, ... ) \t fcc \t comments
41 *
42 * The record is may span several lines if longer than about 80 characters.
43 * Pine formats subsequent line with exactly 3 spaces to indicate that the
44 * line is a continuation.
45 *
46 * An example:
47
48 * axe \t Axel Rose \t axelrose@aol.com \t \t Guitar player
49 *  \t Axel Rose \t axelrose@aol.com \t \t Guitarist
50 * evilaxis \t \t (bgates@hotmail.com,shoebomber@empire.com) \t \t Axis of Evil
51 *
52 */
53
54 /* Pine file object */
55 typedef struct _PineFile PineFile;
56 struct _PineFile {
57         FILE  *file;
58         gchar *path;
59         gint  retVal;
60         GHashTable *uniqTable;
61         void  (*cbProgress)( void *, void *, void * );
62 };
63
64 /* Function prototypes */
65 PineFile *pine_create   ( void );
66 void pine_set_file      ( PineFile* pineFile, const gchar *value );
67 void pine_free          ( PineFile *pineFile );
68 gint pine_import_data   ( PineFile *pineFile, AddressCache *cache );
69 gchar *pine_find_file   ( void );
70
71 #endif /* __PINE_H__ */
72