diff options
author | Not Zed <NotZed@Ximian.com> | 2004-02-11 16:26:58 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-02-11 16:26:58 +0800 |
commit | 06b08adb257351bf8080d960fb98b4265cc43081 (patch) | |
tree | 9f429f497d47c5b933d2c4c98a1058566233a7dc /mail/importers/mail-importer.h | |
parent | 136b8ea938580f3c1d4fb9f92093c4631ec6038b (diff) | |
download | gsoc2013-evolution-06b08adb257351bf8080d960fb98b4265cc43081.tar.gz gsoc2013-evolution-06b08adb257351bf8080d960fb98b4265cc43081.tar.zst gsoc2013-evolution-06b08adb257351bf8080d960fb98b4265cc43081.zip |
Basically rewrote this, the import tasks run in another thread. It tells
2004-02-11 Not Zed <NotZed@Ximian.com>
* importers/pine-importer.c: Basically rewrote this, the import
tasks run in another thread. It tells you more about what's going
on, and its cancellable.
(pine_store_settings): changed the meaning of the settings
slightly, if set it means we've processed them already.
* mail-component-factory.c (factory): hook in importer factory
callback.
2004-02-10 Not Zed <NotZed@Ximian.com>
* importers/*-importer.c: removed module init, just provide a new
method. Updates for api changes.
* Makefile.am: link mail importers in directly.
* mail-importer.c: changed to do stuff in-memory with linked
stuff, moved to importers/.
* importers/GNOME_Evolution_Mail_Importers.server.in.in: merge all
importer .server info's here, point them all to the mailer
factory. Removed the others.
* importers/Makefile.am: remove Mailer.idl stuff. Move all
importers to a single library.
svn path=/trunk/; revision=24701
Diffstat (limited to 'mail/importers/mail-importer.h')
-rw-r--r-- | mail/importers/mail-importer.h | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/mail/importers/mail-importer.h b/mail/importers/mail-importer.h new file mode 100644 index 0000000000..2f28538a80 --- /dev/null +++ b/mail/importers/mail-importer.h @@ -0,0 +1,88 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* mail-importer.h + * + * Authors: Iain Holmes <iain@ximian.com> + * + * Copyright (C) 2001 Ximian, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU 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 General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __MAIL_IMPORTER_H__ +#define __MAIL_IMPORTER_H__ + +struct _MailComponent *mc; + +typedef struct _MailImporter MailImporter; +struct _MailImporter { + struct _CamelFolder *folder; + struct _CamelStreamMem *mstream; + + gboolean frozen; /* Is folder frozen? */ +}; + +void mail_importer_init (struct _MailComponent *mc); +void mail_importer_uninit (void); + +void mail_importer_add_line (MailImporter *importer, + const char *str, + gboolean finished); +void mail_importer_create_folder (const char *parent_path, + const char *name, + const char *description); + +/* creates a folder at folderpath on the local storage */ +char *mail_importer_make_local_folder(const char *folderpath); + +struct _BonoboObject; +struct _BonoboGenericFactory; +struct _CamelOperation; + +#define ELM_INTELLIGENT_IMPORTER_IID "OAFIID:GNOME_Evolution_Mail_Elm_Intelligent_Importer:" BASE_VERSION +#define PINE_INTELLIGENT_IMPORTER_IID "OAFIID:GNOME_Evolution_Mail_Pine_Intelligent_Importer:" BASE_VERSION +#define NETSCAPE_INTELLIGENT_IMPORTER_IID "OAFIID:GNOME_Evolution_Mail_Netscape_Intelligent_Importer:" BASE_VERSION + +#define MBOX_IMPORTER_IID "OAFIID:GNOME_Evolution_Mail_Mbox_Importer:" BASE_VERSION +#define OUTLOOK_IMPORTER_IID "OAFIID:GNOME_Evolution_Mail_Outlook_Importer:" BASE_VERSION + +struct _BonoboObject *elm_intelligent_importer_new(void); +struct _BonoboObject *pine_intelligent_importer_new(void); +struct _BonoboObject *netscape_intelligent_importer_new(void); + +struct _BonoboObject *mbox_importer_new(void); +struct _BonoboObject *outlook_importer_new(void); + +struct _BonoboObject *mail_importer_factory_cb(struct _BonoboGenericFactory *factory, const char *iid, void *data); + + +/* 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 + +int mail_importer_import_mbox(const char *path, const char *folderuri, struct _CamelOperation *cancel); +void mail_importer_import_mbox_sync(const char *path, const char *folderuri, struct _CamelOperation *cancel); + +struct _MailImporterSpecial { + char *orig, *new; +}; +typedef struct _MailImporterSpecial MailImporterSpecial; + +/* api in flux */ +void mail_importer_import_folders_sync(const char *filepath, const char *folderparent, MailImporterSpecial special_folders[], CamelOperation *cancel); + +#endif |