File: mail-importer.h

package info (click to toggle)
evolution 3.30.5-1.1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 118,136 kB
  • sloc: ansic: 485,682; xml: 5,159; python: 702; makefile: 565; sh: 294; perl: 169
file content (89 lines) | stat: -rw-r--r-- 2,930 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, see <http://www.gnu.org/licenses/>.
 *
 *
 * Authors:
 *		Iain Holmes <iain@ximian.com>
 *
 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
 *
 */

#ifndef __MAIL_IMPORTER_H__
#define __MAIL_IMPORTER_H__

#include <camel/camel.h>
#include <e-util/e-util.h>
#include <libemail-engine/libemail-engine.h>

EImportImporter *mbox_importer_peek (void);

typedef void (*MboxImporterCreatePreviewFunc)(GObject *preview, GtkWidget **preview_widget);
typedef void (*MboxImporterFillPreviewFunc)(GObject *preview, CamelMimeMessage *msg);

/* 'create_func' is a function to create a view. 'fill_func' is to fill view with a preview of a message 'msg'
 * (mail importer cannot link to em-format-html-display directly) */
void mbox_importer_set_preview_funcs (MboxImporterCreatePreviewFunc create_func, MboxImporterFillPreviewFunc fill_func);

EImportImporter *elm_importer_peek (void);
EImportImporter *pine_importer_peek (void);
EImportImporter *kmail_importer_peek (void);

/* Defines copied from nsMsgMessageFlags.h in Mozilla source. */
/* Evolution only cares about these headers I think */
#define MSG_FLAG_READ 0x0001
#define MSG_FLAG_REPLIED 0x0002
#define MSG_FLAG_MARKED 0x0004
#define MSG_FLAG_EXPUNGED 0x0008

gint		mail_importer_import_mbox	(EMailSession *session,
						 const gchar *path,
						 const gchar *folderuri,
						 GCancellable *cancellable,
						 void (*done)(gpointer data, GError **),
						 gpointer data);
void		mail_importer_import_mbox_sync	(EMailSession *session,
						 const gchar *path,
						 const gchar *folderuri,
						 GCancellable *cancellable);

gint		mail_importer_import_kmail      (EMailSession *session,
						 const gchar *path,
						 const gchar *folderuri,
						 GCancellable *cancellable,
						 void (*done)(gpointer data, GError **),
						 gpointer data);

void		mail_importer_import_kmail_sync (EMailSession *session,
						 const gchar *path,
						 const gchar *folderuri,
						 GCancellable *cancellable);

struct _MailImporterSpecial {
	const gchar *orig, *new;
};
typedef struct _MailImporterSpecial MailImporterSpecial;

/* mozilla format subdirs */
#define MAIL_IMPORTER_MOZFMT (1<<0)

/* api in flux */
void		mail_importer_import_folders_sync
						(EMailSession *session,
						 const gchar *filepath,
						 MailImporterSpecial special_folders[],
						 gint flags,
						 GCancellable *cancellable);

#endif