diff options
Diffstat (limited to 'mail/importers')
-rw-r--r-- | mail/importers/.cvsignore | 12 | ||||
-rw-r--r-- | mail/importers/GNOME_Evolution_Mail_Mbox_Importer.oaf.in | 29 | ||||
-rw-r--r-- | mail/importers/GNOME_Evolution_Mail_Outlook_Importer.oaf.in | 29 | ||||
-rw-r--r-- | mail/importers/Makefile.am | 30 | ||||
-rw-r--r-- | mail/importers/evolution-mbox-importer.c | 433 | ||||
-rw-r--r-- | mail/importers/evolution-outlook-importer.c | 318 | ||||
-rw-r--r-- | mail/importers/mozilla-status-headers.h | 29 |
7 files changed, 0 insertions, 880 deletions
diff --git a/mail/importers/.cvsignore b/mail/importers/.cvsignore deleted file mode 100644 index ee1568b9e0..0000000000 --- a/mail/importers/.cvsignore +++ /dev/null @@ -1,12 +0,0 @@ -.deps -.libs -.pure -Makefile -Makefile.in -*.bb -*.bbg -*.da -*.gcov -*.oaf -*.lo -*.la
\ No newline at end of file diff --git a/mail/importers/GNOME_Evolution_Mail_Mbox_Importer.oaf.in b/mail/importers/GNOME_Evolution_Mail_Mbox_Importer.oaf.in deleted file mode 100644 index b9da9ce3c8..0000000000 --- a/mail/importers/GNOME_Evolution_Mail_Mbox_Importer.oaf.in +++ /dev/null @@ -1,29 +0,0 @@ -<oaf_info> - -<oaf_server iid="OAFIID:GNOME_Evolution_Mail_Mbox_ImporterFactory" - type="exe" - location="evolution-mail"> - - <oaf_attribute name="repo_ids" type="stringv"> - <item value="IDL:GNOME/ObjectFactory:1.0"/> - </oaf_attribute> - - <oaf_attribute name="description" type="string" - _value="Factory to import mbox into Evolution"/> -</oaf_server> - -<oaf_server iid="OAFIID:GNOME_Evolution_Mail_Mbox_Importer" - type="factory" - location="OAFIID:GNOME_Evolution_Mail_Mbox_ImporterFactory"> - - <oaf_attribute name="repo_ids" type="stringv"> - <item value="IDL:GNOME/Evolution/Importer:1.0"/> - </oaf_attribute> - - <oaf_attribute name="evolution:menu-name" type="string" - value="MBox (mbox)"/> - <oaf_attribute name="description" type="string" - _value="Imports mbox files into Evolution"/> -</oaf_server> - -</oaf_info> diff --git a/mail/importers/GNOME_Evolution_Mail_Outlook_Importer.oaf.in b/mail/importers/GNOME_Evolution_Mail_Outlook_Importer.oaf.in deleted file mode 100644 index 66317e3d7a..0000000000 --- a/mail/importers/GNOME_Evolution_Mail_Outlook_Importer.oaf.in +++ /dev/null @@ -1,29 +0,0 @@ -<oaf_info> - -<oaf_server iid="OAFIID:GNOME_Evolution_Mail_Outlook_ImporterFactory" - type="exe" - location="evolution-mail"> - - <oaf_attribute name="repo_ids" type="stringv"> - <item value="IDL:GNOME/ObjectFactory:1.0"/> - </oaf_attribute> - - <oaf_attribute name="description" type="string" - _value="Factory to import Outlook Express 4 mails into Evolution"/> -</oaf_server> - -<oaf_server iid="OAFIID:GNOME_Evolution_Mail_Outlook_Importer" - type="factory" - location="OAFIID:GNOME_Evolution_Mail_Outlook_ImporterFactory"> - - <oaf_attribute name="repo_ids" type="stringv"> - <item value="IDL:GNOME/Evolution/Importer:1.0"/> - </oaf_attribute> - - <oaf_attribute name="evolution:menu-name" type="string" - value="Outlook Express 4 (.mbx)"/> - <oaf_attribute name="description" type="string" - _value="Imports Outlook Express 4 files into Evolution"/> -</oaf_server> - -</oaf_info> diff --git a/mail/importers/Makefile.am b/mail/importers/Makefile.am deleted file mode 100644 index f8a97d66dd..0000000000 --- a/mail/importers/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -importersdir = $(pkglibdir)/evolution-mail-importers/$(VERSION) - -importers_LTLIBRARIES = liboutlook.la libmbox.la - -INCLUDES = -I.. \ - -I$(srcdir)/.. \ - -I$(top_srcdir) \ - -I$(top_srcdir)/shell \ - -I$(top_builddir)/shell \ - -I$(includedir) \ - -DG_LOG_DOMAIN=\"evolution-mail-importer\" \ - $(IMPORTERS_CFLAGS) - -liboutlook_la_SOURCES = \ - evolution-outlook-importer.c -liboutlook_la_LDFLAGS = -avoid-version -module - -libmbox_la_SOURCES = evolution-mbox-importer.c \ - mozilla-status-headers.h -libmbox_la_LDFLAGS = -avoid-version -module - -oafdir = $(datadir)/oaf -oaf_in_files = GNOME_Evolution_Mail_Mbox_Importer.oaf.in \ - GNOME_Evolution_Mail_Outlook_Importer.oaf.in - -oaf_DATA = $(oaf_in_files:.oaf.in=.oaf) - -EXTRA_DIST = $(oaf_in_files) $(oaf_DATA) - -@XML_I18N_MERGE_OAF_RULE@ diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c deleted file mode 100644 index ffa8872fc6..0000000000 --- a/mail/importers/evolution-mbox-importer.c +++ /dev/null @@ -1,433 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* evolution-mbox-importer.c - * - * 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. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <stdio.h> -#include <ctype.h> - -#include <bonobo/bonobo-object.h> -#include <bonobo/bonobo-generic-factory.h> - -#include <camel/camel-exception.h> -#include <camel/camel-mime-message.h> -#include <camel/camel-mime-parser.h> -#include <camel/camel-mime-part.h> - -#include <importer/evolution-importer.h> -#include <importer/GNOME_Evolution_Importer.h> - -#include "mozilla-status-headers.h" - -#include "mail/mail-importer.h" -#include "mail-tools.h" - -#include "e-util/e-path.h" - -/* #define IMPORTER_DEBUG */ -#ifdef IMPORTER_DEBUG -#define IN g_print ("=====> %s (%d)\n", __FUNCTION__, __LINE__) -#define OUT g_print ("<==== %s (%d)\n", __FUNCTION__, __LINE__) -#else -#define IN -#define OUT -#endif - -#define MBOX_FACTORY_IID "OAFIID:GNOME_Evolution_Mail_Mbox_ImporterFactory" - -typedef struct { - MailImporter importer; /* Parent */ - - char *filename; - int num; - CamelMimeParser *mp; - gboolean is_folder; -} MboxImporter; - -void mail_importer_module_init (void); - -/* EvolutionImporter methods */ - -static int -string_to_int (const char *str) -{ - int result = 0; - char *s; - - for (s = (char *) str; *s; s++) { - char c = toupper (*s); - - result *= 16; - - if (c >= '0' && c <= '9') { - result += (c - '0'); - } else if (c >= 'A' && c <= 'F') { - result += (c - 'A'); - } - } - - g_print ("%s became %d\n", str, result); - - return result; -} - -static CamelMessageInfo * -get_info_from_mozilla (const char *mozilla_status, - gboolean *deleted) -{ - int status; - CamelMessageInfo *info; - - info = g_new0 (CamelMessageInfo, 1); - - *deleted = FALSE; - - status = string_to_int (mozilla_status); - if (status == 0) { - return info; - } - - if (status & MSG_FLAG_EXPUNGED) { - *deleted = TRUE; - g_free (info); - - return NULL; - } - - if (status & MSG_FLAG_READ) { - info->flags |= CAMEL_MESSAGE_SEEN; - } - - if (status & MSG_FLAG_MARKED) { - info->flags |= CAMEL_MESSAGE_FLAGGED; - } - - if (status & MSG_FLAG_REPLIED) { - info->flags |= CAMEL_MESSAGE_ANSWERED; - } - - return info; -} - -static void -process_item_fn (EvolutionImporter *eimporter, - CORBA_Object listener, - void *closure, - CORBA_Environment *ev) -{ - MboxImporter *mbi = (MboxImporter *) closure; - MailImporter *importer = (MailImporter *) mbi; - gboolean done = FALSE; - CamelException *ex; - const char *mozilla_status; - - if (importer->folder == NULL) { - GNOME_Evolution_ImporterListener_notifyResult (listener, - GNOME_Evolution_ImporterListener_NOT_READY, - TRUE, ev); - return; - } - - if (mbi->is_folder == TRUE) { - GNOME_Evolution_ImporterListener_notifyResult (listener, - GNOME_Evolution_ImporterListener_OK, - FALSE, ev); - return; - } - - ex = camel_exception_new (); - if (camel_mime_parser_step (mbi->mp, 0, 0) == HSCAN_FROM) { - /* Import the next message */ - CamelMimeMessage *msg; - CamelMessageInfo *info; - gboolean deleted; - - IN; - msg = camel_mime_message_new (); - if (camel_mime_part_construct_from_parser (CAMEL_MIME_PART (msg), - mbi->mp) == -1) { - g_warning ("Failed message %d", mbi->num); - camel_object_unref (CAMEL_OBJECT (msg)); - done = TRUE; - } - - mozilla_status = camel_medium_get_header (CAMEL_MEDIUM (msg), "X-Mozilla-Status"); - if (mozilla_status != NULL) { - g_print ("Got Mozilla status header: %s\n", mozilla_status); - info = get_info_from_mozilla (mozilla_status, &deleted); - } else { - info = g_new0 (CamelMessageInfo, 1); - } - - if (deleted == FALSE) { - /* write the mesg */ - camel_folder_append_message (importer->folder, msg, info, NULL, ex); - g_free (info); - } - - camel_object_unref (CAMEL_OBJECT (msg)); - if (camel_exception_is_set (ex)) { - g_warning ("Failed message %d", mbi->num); - done = TRUE; - } - OUT; - } else { - IN; - /* all messages have now been imported */ - camel_folder_sync (importer->folder, FALSE, ex); - camel_folder_thaw (importer->folder); - importer->frozen = FALSE; - done = TRUE; - OUT; - } - - if (!done) { - camel_mime_parser_step (mbi->mp, 0, 0); - } - - camel_exception_free (ex); - GNOME_Evolution_ImporterListener_notifyResult (listener, - GNOME_Evolution_ImporterListener_OK, - !done, ev); - return; -} - -static gboolean -support_format_fn (EvolutionImporter *importer, - const char *filename, - void *closure) -{ - char signature[6]; - gboolean ret = FALSE; - int fd, n; - - fd = open (filename, O_RDONLY); - if (fd == -1) - return FALSE; - - n = read (fd, signature, 5); - if (n > 0) { - signature[n] = '\0'; - if (!g_strncasecmp (signature, "From ", 5)) - ret = TRUE; - } - - close (fd); - - return ret; -} - -static void -importer_destroy_cb (GtkObject *object, - MboxImporter *mbi) -{ - MailImporter *importer; - - importer = (MailImporter *) mbi; - if (importer->frozen) { - camel_folder_sync (importer->folder, FALSE, NULL); - camel_folder_thaw (importer->folder); - } - - if (importer->folder) - camel_object_unref (CAMEL_OBJECT (importer->folder)); - - g_free (mbi->filename); - if (mbi->mp) - camel_object_unref (CAMEL_OBJECT (mbi->mp)); - - g_free (mbi); -} - -static void -folder_created_cb (BonoboListener *listener, - const char *event_name, - const BonoboArg *event_data, - CORBA_Environment *ev, - MailImporter *importer) -{ - char *fullpath; - GNOME_Evolution_Storage_FolderResult *result; - CamelException *ex; - - if (strcmp (event_name, "evolution-shell:folder_created") != 0) { - return; /* Unknown event */ - } - - result = event_data->_value; - fullpath = g_strconcat ("file://", result->path, NULL); - - ex = camel_exception_new (); - importer->folder = mail_tool_uri_to_folder (fullpath, CAMEL_STORE_FOLDER_CREATE, ex); - if (camel_exception_is_set (ex)) { - g_warning ("Error opening %s", fullpath); - camel_exception_free (ex); - - g_free (fullpath); - return; - } - - camel_folder_freeze (importer->folder); - importer->frozen = TRUE; - - g_free (fullpath); - bonobo_object_unref (BONOBO_OBJECT (listener)); -} - -static gboolean -load_file_fn (EvolutionImporter *eimporter, - const char *filename, - const char *folderpath, - void *closure) -{ - MboxImporter *mbi; - MailImporter *importer; - gboolean delayed = FALSE; - struct stat buf; - int fd; - - mbi = (MboxImporter *) closure; - importer = (MailImporter *) mbi; - - mbi->filename = g_strdup (filename); - - fd = open (filename, O_RDONLY); - if (fd == -1) { - g_warning ("Cannot open file"); - return FALSE; - } - - fstat (fd, &buf); - if (S_ISREG (buf.st_mode)) { - mbi->mp = camel_mime_parser_new (); - camel_mime_parser_scan_from (mbi->mp, TRUE); - if (camel_mime_parser_init_with_fd (mbi->mp, fd) == -1) { - g_warning ("Unable to process spool folder"); - goto fail; - } - mbi->is_folder = FALSE; - } else { - mbi->is_folder = TRUE; - } - - importer->mstream = NULL; - if (folderpath == NULL || *folderpath == '\0') { - importer->folder = mail_tool_get_local_inbox (NULL); - } else { - char *parent, *tmp, *fullpath, *homedir; - const char *name; - BonoboListener *listener; - CamelException *ex; - - tmp = gnome_util_prepend_user_home ("evolution/local"); - homedir = g_strconcat ("file://", tmp, NULL); - g_free (tmp); - - fullpath = e_path_to_physical (homedir, folderpath); - ex = camel_exception_new (); - importer->folder = mail_tool_uri_to_folder (fullpath, 0, ex); - g_free (homedir); - - if (camel_exception_is_set (ex) || importer->folder == NULL) { - /* Make a new directory */ - name = strrchr (folderpath, '/'); - if (name == NULL) { - parent = g_strdup ("/"); - name = folderpath; - } else { - name += 1; - parent = g_dirname (folderpath); - } - - listener = bonobo_listener_new (NULL, NULL); - gtk_signal_connect (GTK_OBJECT (listener), "event-notify", - GTK_SIGNAL_FUNC (folder_created_cb), - importer); - - mail_importer_create_folder (parent, name, NULL, listener); - camel_exception_free (ex); - ex = camel_exception_new (); - importer->folder = NULL; - g_print ("No folder yet\n"); - delayed = TRUE; - g_free (parent); - } - camel_exception_free (ex); - g_free (fullpath); - } - - if (importer->folder == NULL && delayed == FALSE){ - g_warning ("Bad folder\n"); - goto fail; - } - - if (importer->folder != NULL) { - camel_folder_freeze (importer->folder); - importer->frozen = TRUE; - } - - return TRUE; - - fail: - camel_object_unref (CAMEL_OBJECT (mbi->mp)); - mbi->mp = NULL; - - return FALSE; -} - -static BonoboObject * -mbox_factory_fn (BonoboGenericFactory *_factory, - void *closure) -{ - EvolutionImporter *importer; - MboxImporter *mbox; - - mbox = g_new0 (MboxImporter, 1); - importer = evolution_importer_new (support_format_fn, load_file_fn, - process_item_fn, NULL, mbox); - gtk_signal_connect (GTK_OBJECT (importer), "destroy", - GTK_SIGNAL_FUNC (importer_destroy_cb), mbox); - - return BONOBO_OBJECT (importer); -} - -/* Entry point */ -void -mail_importer_module_init (void) -{ - static gboolean initialised = FALSE; - BonoboGenericFactory *factory; - - if (initialised == TRUE) - return; - - factory = bonobo_generic_factory_new (MBOX_FACTORY_IID, - mbox_factory_fn, NULL); - - if (factory == NULL) - g_warning ("Could not initialise Outlook importer factory."); - - initialised = TRUE; -} - diff --git a/mail/importers/evolution-outlook-importer.c b/mail/importers/evolution-outlook-importer.c deleted file mode 100644 index 977d610055..0000000000 --- a/mail/importers/evolution-outlook-importer.c +++ /dev/null @@ -1,318 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* evolution-outlook-importer.c - * - * 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. - */ - - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <bonobo/bonobo-object.h> -#include <bonobo/bonobo-generic-factory.h> - -#include <stdio.h> - -#include <importer/evolution-importer.h> -#include <importer/GNOME_Evolution_Importer.h> - -#include <camel/camel-exception.h> - -#include "e-util/e-memory.h" - -#include "mail-importer.h" -#include "mail-tools.h" - - -#define OUTLOOK_FACTORY_IID "OAFIID:GNOME_Evolution_Mail_Outlook_ImporterFactory" - -extern char *evolution_dir; -typedef struct { - MailImporter importer; - - char *filename; - gboolean oe4; /* Is file OE4 or not? */ - FILE *handle; - long pos; - off_t size; - - gboolean busy; -} OutlookImporter; - -struct oe_msg_segmentheader { - int self; - int increase; - int include; - int next; - int usenet; -}; - -typedef struct oe_msg_segmentheader oe_msg_segmentheader; - -/* Prototype */ - -void mail_importer_module_init (void); - - -/* EvolutionImporter methods */ - -/* Based on code from liboe 0.92 (STABLE) - Copyright (C) 2000 Stephan B. Nedregård (stephan@micropop.com) - Modified 2001 Iain Holmes <iain@ximian.com> - Copyright (C) 2001 Ximian, Inc. */ - -static void -process_item_fn (EvolutionImporter *eimporter, - CORBA_Object listener, - void *closure, - CORBA_Environment *ev) -{ - OutlookImporter *oli = (OutlookImporter *) closure; - MailImporter *importer = (MailImporter *) oli; - oe_msg_segmentheader *header; - gboolean more = TRUE; - char *cb, *sfull, *s; - long end_pos = 0; - int i; - - if (oli->busy == TRUE) { - GNOME_Evolution_ImporterListener_notifyResult (listener, - GNOME_Evolution_ImporterListener_BUSY, - more, ev); - return; - } - - oli->busy = TRUE; - header = g_new (oe_msg_segmentheader, 1); - fread (header, 16, 1, oli->handle); - - /* Write a From line */ - mail_importer_add_line (importer, - "From evolution-outlook-importer", FALSE); - end_pos = oli->pos + header->include; - if (end_pos >= oli->size) { - end_pos = oli->size; - more = FALSE; - } - - oli->pos += 4; - - cb = g_new (char, 4); - sfull = g_new (char, 65536); - s = sfull; - - while (oli->pos < end_pos) { - fread (cb, 1, 4, oli->handle); - for (i = 0; i < 4; i++, oli->pos++) { - if (*(cb + i ) != 0x0d) { - *s++ = *(cb + i); - - if (*(cb + i) == 0x0a) { - *s = '\0'; - mail_importer_add_line (importer, - sfull, FALSE); - s = sfull; - } - } - } - } - - if (s != sfull) { - *s = '\0'; - mail_importer_add_line (importer, sfull, FALSE); - s = sfull; - } - - mail_importer_add_line (importer, "\n", TRUE); - - oli->pos = end_pos; - fseek (oli->handle, oli->pos, SEEK_SET); - - g_free (header); - g_free (sfull); - g_free (cb); - - GNOME_Evolution_ImporterListener_notifyResult (listener, - GNOME_Evolution_ImporterListener_OK, - more, ev); - if (more == FALSE) { - CamelException *ex; - - ex = camel_exception_new (); - camel_folder_thaw (importer->folder); - camel_folder_sync (importer->folder, FALSE, ex); - camel_exception_free (ex); - fclose (oli->handle); - oli->handle = NULL; - } - - oli->busy = FALSE; - return; -} - - -/* EvolutionImporterFactory methods */ - -static gboolean -support_format_fn (EvolutionImporter *importer, - const char *filename, - void *closure) -{ - FILE *handle; - int signature[4]; - - /* Outlook Express sniffer. - Taken from liboe 0.92 (STABLE) - Copyright (C) 2000 Stephan B. Nedregård (stephan@micropop.com) */ - - handle = fopen (filename, "rb"); - if (handle == NULL) - return FALSE; /* Can't open file: Can't support it :) */ - - /* SIGNATURE */ - fread (&signature, 16, 1, handle); - if ((signature[0]!=0xFE12ADCF) || /* OE 5 & OE 5 BETA SIGNATURE */ - (signature[1]!=0x6F74FDC5) || - (signature[2]!=0x11D1E366) || - (signature[3]!=0xC0004E9A)) { - if ((signature[0]==0x36464D4A) && - (signature[1]==0x00010003)) /* OE4 SIGNATURE */ { - fclose (handle); - return TRUE; /* OE 4 */ - } - fclose (handle); - return FALSE; /* Not Outlook 4 or 5 */ - } - - fclose (handle); - return FALSE; /* Can't handle OE 5 yet */ -} - -static void -importer_destroy_cb (GtkObject *object, - OutlookImporter *oli) -{ - MailImporter *importer; - - importer = (MailImporter *) oli; - if (importer->folder) - camel_object_unref (CAMEL_OBJECT (importer->folder)); - - g_free (oli->filename); - if (oli->handle) - fclose (oli->handle); - - g_free (oli); -} - -static gboolean -load_file_fn (EvolutionImporter *eimporter, - const char *filename, - const char *folderpath, - void *closure) -{ - OutlookImporter *oli; - MailImporter *importer; - struct stat buf; - long pos = 0x54; - - oli = (OutlookImporter *) closure; - importer = (MailImporter *) oli; - - oli->filename = g_strdup (filename); - /* Will return TRUE if oe4 format */ - oli->oe4 = support_format_fn (NULL, filename, NULL); - if (oli->oe4 == FALSE) { - g_warning ("Not OE4 format"); - return FALSE; - } - - oli->handle = fopen (filename, "rb"); - if (oli->handle == NULL) { - g_warning ("Cannot open the file"); - return FALSE; - } - - /* Get size of file */ - if (stat (filename, &buf) == -1) { - g_warning ("Cannot stat file"); - return FALSE; - } - - oli->size = buf.st_size; - - /* Set the fposition to the begining */ - fseek (oli->handle, pos, SEEK_SET); - oli->pos = pos; - - importer->mstream = NULL; - - if (folderpath == NULL || *folderpath == '\0') - importer->folder = mail_tool_get_local_inbox (NULL); - else - importer->folder = mail_tool_uri_to_folder (folderpath, CAMEL_STORE_FOLDER_CREATE, NULL); - - if (importer->folder == NULL){ - g_warning ("Bad folder"); - return FALSE; - } - - camel_folder_freeze (importer->folder); - oli->busy = FALSE; - return TRUE; -} - -static BonoboObject * -outlook_factory_fn (BonoboGenericFactory *_factory, - void *closure) -{ - EvolutionImporter *importer; - OutlookImporter *oli; - - oli = g_new0 (OutlookImporter, 1); - - importer = evolution_importer_new (support_format_fn, load_file_fn, - process_item_fn, NULL, oli); - gtk_signal_connect (GTK_OBJECT (importer), "destroy", - GTK_SIGNAL_FUNC (importer_destroy_cb), oli); - - return BONOBO_OBJECT (importer); -} - -/* Entry point */ -void -mail_importer_module_init (void) -{ - static gboolean initialised = FALSE; - BonoboGenericFactory *factory; - - if (initialised == TRUE) - return; - - factory = bonobo_generic_factory_new (OUTLOOK_FACTORY_IID, - outlook_factory_fn, NULL); - - if (factory == NULL) - g_warning ("Could not initialise Outlook importer factory."); - - initialised = TRUE; -} - - diff --git a/mail/importers/mozilla-status-headers.h b/mail/importers/mozilla-status-headers.h deleted file mode 100644 index f459d6ec8f..0000000000 --- a/mail/importers/mozilla-status-headers.h +++ /dev/null @@ -1,29 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* mozilla-status-headers.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. - */ - -/* 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 |