зеркало из https://github.com/mozilla/gecko-dev.git
105 строки
3.4 KiB
Plaintext
105 строки
3.4 KiB
Plaintext
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
*
|
|
* The contents of this file are subject to the Netscape Public
|
|
* License Version 1.1 (the "License"); you may not use this file
|
|
* except in compliance with the License. You may obtain a copy of
|
|
* the License at http://www.mozilla.org/NPL/
|
|
*
|
|
* Software distributed under the License is distributed on an "AS
|
|
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
* implied. See the License for the specific language governing
|
|
* rights and limitations under the License.
|
|
*
|
|
* The Original Code is mozilla.org code.
|
|
*
|
|
* The Initial Developer of the Original Code is Netscape
|
|
* Communications Corporation. Portions created by Netscape are
|
|
* Copyright (C) 1998 Netscape Communications Corporation. All
|
|
* Rights Reserved.
|
|
*
|
|
* Contributor(s):
|
|
*/
|
|
|
|
/*
|
|
|
|
Interface for importing mail - ui provided by the import module. If
|
|
you wish to provide your own UI then implement the nsIImportGeneric
|
|
interface.
|
|
|
|
*/
|
|
|
|
/*
|
|
If you support this interface then the standard mailbox import UI
|
|
can be used to drive your import of mailboxes, which means you don't have
|
|
to worry about anything other than implementing this interface
|
|
(and nsIImportModule) to import mailboxes.
|
|
*/
|
|
|
|
/*
|
|
The general process is:
|
|
1) Do you know where the mail is located
|
|
2) Do you want the user to "verify" this location and have
|
|
the option of specifying a different mail directory?
|
|
3) Given a directory (either specified in 1 or 2) build a list
|
|
of all of the mailboxes to be imported.
|
|
4) Import each mail box to the destination provided!
|
|
5) Update the portion of the mailbox imported so far. This should
|
|
always be less than the mailbox size until you are done. This
|
|
is used for progress bar updating and MAY BE CALLED FROM ANOTHER
|
|
THREAD!
|
|
|
|
*/
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
interface nsIFileSpec;
|
|
interface nsISupportsArray;
|
|
interface nsIImportMailboxDescriptor;
|
|
interface nsIOutputStream;
|
|
|
|
[scriptable, uuid(c9e314c0-234e-11d3-a206-00a0cc26da63)]
|
|
interface nsIImportMail : nsISupports
|
|
{
|
|
|
|
/*
|
|
If found and userVerify BOTH return false, then it is assumed that this
|
|
means an error - mail cannot be found on this machine.
|
|
If userVerify is true, the user will have an opportunity to specify
|
|
a different location to import mail from.
|
|
*/
|
|
void GetDefaultLocation( out nsIFileSpec location,
|
|
out boolean found,
|
|
out boolean userVerify);
|
|
/*
|
|
Returns an nsISupportsArray which contains an nsIImportMailboxID for each
|
|
mailbox. The array is not sorted before display to the user.
|
|
*/
|
|
nsISupportsArray FindMailboxes( in nsIFileSpec location);
|
|
|
|
/*
|
|
Import a specific mailbox into the destination file supplied. If an error
|
|
occurs that is non-fatal, the destination will be deleted and other mailbox's
|
|
will be imported. If a fatal error occurs, the destination will be deleted
|
|
and the import operation will abort.
|
|
*/
|
|
void ImportMailbox( in nsIImportMailboxDescriptor source,
|
|
in nsIFileSpec destination,
|
|
out wstring errorLog,
|
|
out wstring successLog,
|
|
out boolean fatalError);
|
|
|
|
/*
|
|
Return the amount of the mailbox that has been imported so far. This number
|
|
is used to present progress information and must never be larger than the
|
|
size specified in nsIImportMailboxID.GetSize(); May be called from
|
|
a different thread than ImportMailbox()
|
|
*/
|
|
unsigned long GetImportProgress();
|
|
};
|
|
|
|
|
|
|
|
%{ C++
|
|
|
|
%}
|