Files
evolution/mail/mail-importer.h
Not Zed 1dc4c5de39 ** for mail part of bug #38461.
2003-03-21  Not Zed  <NotZed@Ximian.com>

	** for mail part of bug #38461.

	* importers/evolution-outlook-importer.c (load_file_fn): dont pass
	in create flag to uri_to_folder, the folder must already exist.

	* importers/evolution-mbox-importer.c (folder_created_cb):
	Removed, we now force the caller to create the destination folder
	first.
	(load_file_fn): Dont try and create a folder if it doesn't exist.
	Also, use the uri directly as the destination uri, so we can
	import into any folder.
	(process_item_fn): If we dont have a folder, thats just an error,
	return BAD_FILE.

	* importers/netscape-importer.c (netscape_import_file): As below
	for elm_import_file.
	(import_next): similarly as for pine import_next.
	(importer_cb): just record result.
	(importer_timeout_fn): removed.

	* importers/pine-importer.c (import_next): Similar to below for
	the elm import_next.
	(pine_import_file): As below for elm_import_file.
	(importer_timeout_fn): removed.
	(importer_cb): just record the result, and exit.
	(import_next): change around to behave more like the elm importer,
	cleaning up when we're done.

	* importers/elm-importer.c (elm_import_file): Create the
	destination folder ourselves, dont pass it onto the mbox importer.
	Simplify logic, just do the import within a while loop, polling
	the g main loop as necessary, remove need for idle callbacks and
	other crap.
	(import_next): If elm_import_file fails, then just go straight to
	the next folder, stops it falling in a heap.
	(import_item_idle): removed.
	(importer_cb): just record result/exit.

	* mail-importer.c (mail_importer_create_folder): removed.
	(mail_importer_make_local_folder): new function to create a
	local-only folder from a path.  It runs synchronously by using a
	recursive main loop.
	(folder_created_cb): callback for make_local_folder.

svn path=/trunk/; revision=20379
2003-03-20 10:17:25 +00:00

54 lines
1.6 KiB
C

/* -*- 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__
#include <bonobo/bonobo-listener.h>
#include <camel/camel-folder.h>
#include <camel/camel-stream-mem.h>
#include <evolution-shell-client.h>
typedef struct _MailImporter MailImporter;
struct _MailImporter {
CamelFolder *folder;
CamelStreamMem *mstream;
gboolean frozen; /* Is folder frozen? */
};
void mail_importer_init (EvolutionShellClient *client);
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,
const BonoboListener *listener);
/* creates a folder at folderpath on the local storage */
char *mail_importer_make_local_folder(const char *folderpath);
#endif