remove unnecessary cm_return_val_if_fail()
[claws.git] / src / pine.h
blobdd06868aabaada7132ee94ac5e9234ffd11aa711
1 /*
2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 2002-2012 Match Grun and the Claws Mail team
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 3 of the License, or
8 * (at your option) any later version.
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.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 * Definitions necessary to access Pine addressbook files. These are
22 * used by the Pine E-Mail client.
25 #ifndef __PINE_H__
26 #define __PINE_H__
28 #include <stdio.h>
29 #include <glib.h>
31 #include "addrcache.h"
34 * Typical Pine simple entry:
36 * nick-name \t friendly-name \t email-address \t fcc \t comments
38 * Or for a distribution list:
40 * group-name \t friendly-name \t ( email, email, ... ) \t fcc \t comments
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.
46 * An example:
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
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 * );
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 );
71 #endif /* __PINE_H__ */