1 /*
2  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 2002-2012 Match Grun and the Claws Mail team
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 3 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, see <http://www.gnu.org/licenses/>.
17  *
18  */
19 
20 /*
21  * Definitions for an E-Mail address harvester.
22  */
23 
24 #ifndef __EXPORT_HTML_H__
25 #define __EXPORT_HTML_H__
26 
27 #include <glib.h>
28 
29 #include "addrcache.h"
30 
31 /* Stylesheet ID's */
32 #define EXPORT_HTML_ID_NONE     0
33 #define EXPORT_HTML_ID_DEFAULT  1
34 #define EXPORT_HTML_ID_FULL     2
35 #define EXPORT_HTML_ID_CUSTOM   3
36 #define EXPORT_HTML_ID_CUSTOM2  4
37 #define EXPORT_HTML_ID_CUSTOM3  5
38 #define EXPORT_HTML_ID_CUSTOM4  6
39 
40 #define EXPORT_HTML_FIRST_LAST  0
41 #define EXPORT_HTML_LAST_FIRST  1
42 
43 /* Export HTML control data */
44 typedef struct _ExportHtmlCtl ExportHtmlCtl;
45 struct _ExportHtmlCtl {
46 	gchar    *path;
47 	gchar    *dirOutput;
48 	gchar    *fileHtml;
49 	gchar    *encoding;
50 	gchar    *settingsFile;
51 	gint     stylesheet;
52 	gint     nameFormat;
53 	gboolean banding;
54 	gboolean linkEMail;
55 	gboolean showAttribs;
56 	gint     retVal;
57 	gint     rcCreate;
58 	GList    *listStyle;
59 };
60 
61 /* Function prototypes */
62 ExportHtmlCtl *exporthtml_create( void );
63 void exporthtml_free		( ExportHtmlCtl *ctl );
64 void exporthtml_set_stylesheet	( ExportHtmlCtl *ctl,
65 				  const gint value );
66 void exporthtml_set_name_format	( ExportHtmlCtl *ctl,
67 				  const gint value );
68 void exporthtml_set_banding	( ExportHtmlCtl *ctl,
69 				  const gboolean value );
70 void exporthtml_set_link_email	( ExportHtmlCtl *ctl,
71 				  const gboolean value );
72 void exporthtml_set_attributes	( ExportHtmlCtl *ctl,
73 				  const gboolean value );
74 void exporthtml_process		( ExportHtmlCtl *ctl,
75 				  AddressCache *cache );
76 gboolean exporthtml_create_dir	( ExportHtmlCtl *ctl );
77 gchar *exporthtml_get_create_msg( ExportHtmlCtl *ctl );
78 
79 void exporthtml_parse_filespec	( ExportHtmlCtl *ctl,
80 				  gchar *fileSpec );
81 void exporthtml_load_settings	( ExportHtmlCtl *ctl );
82 void exporthtml_save_settings	( ExportHtmlCtl *ctl );
83 
84 #endif /* __EXPORT_HTML_H__ */
85 
86