2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
2000-03-20 03:15:14 +03:00
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* 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/
|
2000-03-20 03:15:14 +03:00
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* 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.
|
2000-03-20 03:15:14 +03:00
|
|
|
*
|
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 2000
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
2000-03-20 03:15:14 +03:00
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the NPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the NPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
2000-03-20 03:15:14 +03:00
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// The IMAP Service is an interfaced designed to make building and running imap urls
|
|
|
|
// easier. Clients typically go to the imap service and ask it do things such as:
|
|
|
|
// get new mail, etc....
|
|
|
|
//
|
|
|
|
// Oh and in case you couldn't tell by the name, the imap service is a service! and you
|
|
|
|
// should go through the service manager to obtain an instance of it.
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
#include "nsIImapUrl.idl"
|
|
|
|
|
|
|
|
interface nsIImapProtocol;
|
|
|
|
interface nsIImapMessageSink;
|
|
|
|
interface nsIUrlListener;
|
|
|
|
interface nsIURI;
|
|
|
|
interface nsIEventQueue;
|
|
|
|
interface nsIMsgFolder;
|
|
|
|
interface nsIMsgWindow;
|
2000-04-30 12:19:31 +04:00
|
|
|
interface nsIImapIncomingServer;
|
2001-04-13 07:48:37 +04:00
|
|
|
interface nsICacheSession;
|
2000-04-30 12:19:31 +04:00
|
|
|
|
2000-03-20 03:15:14 +03:00
|
|
|
|
|
|
|
[scriptable, uuid(18236127-FA1D-11d3-98BA-001083010E9B)]
|
|
|
|
interface nsIImapService : nsISupports
|
|
|
|
{
|
|
|
|
// As always, you can pass in null for the url listener and the url if you don't require either.....
|
|
|
|
// aClientEventQueue is the event queue of the event sinks. We post events into this queue.
|
|
|
|
// mscott -- eventually this function will take in the account (identity/incoming server) associated with
|
|
|
|
// the request
|
|
|
|
void selectFolder(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aImapMailFolder,
|
|
|
|
in nsIUrlListener aUrlListener,
|
|
|
|
in nsIMsgWindow aMsgWindow,
|
|
|
|
out nsIURI aURL);
|
|
|
|
|
|
|
|
void liteSelectFolder(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aImapMailFolder,
|
|
|
|
in nsIUrlListener aUrlListener,
|
|
|
|
out nsIURI aURL);
|
|
|
|
|
|
|
|
void fetchMessage(in nsIImapUrl aUrl,
|
|
|
|
in nsImapState aImapAction,
|
|
|
|
in nsIMsgFolder aImapMailFolder,
|
|
|
|
in nsIImapMessageSink aImapMessageSink,
|
2002-12-03 16:06:46 +03:00
|
|
|
in nsIMsgWindow aMsgWindow,
|
2000-03-20 03:15:14 +03:00
|
|
|
in nsISupports aConsumer,
|
2002-12-03 16:06:46 +03:00
|
|
|
in string aMessageIdentifierList,
|
|
|
|
in boolean convertDataToText,
|
|
|
|
in string additionalHeader,
|
|
|
|
out nsIURI aOutURL);
|
2000-03-20 03:15:14 +03:00
|
|
|
|
|
|
|
void noop(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aImapMailFolder,
|
|
|
|
in nsIUrlListener aUrlListener,
|
|
|
|
out nsIURI aURL);
|
|
|
|
|
|
|
|
void getHeaders(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aImapMailFolder,
|
|
|
|
in nsIUrlListener aUrlListener,
|
|
|
|
out nsIURI aURL,
|
2002-12-03 16:06:46 +03:00
|
|
|
in string aMessageIdentifierList,
|
2000-03-20 03:15:14 +03:00
|
|
|
in boolean aMessageIdsAreUID);
|
|
|
|
|
|
|
|
void expunge(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aImapMailFolder,
|
|
|
|
in nsIUrlListener aUrlListener,
|
|
|
|
out nsIURI aURL);
|
|
|
|
|
2003-11-14 06:19:58 +03:00
|
|
|
nsIURI updateFolderStatus(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aImapMailFolder,
|
|
|
|
in nsIUrlListener aUrlListener);
|
|
|
|
|
2000-03-20 03:15:14 +03:00
|
|
|
void biff(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aImapMailFolder,
|
|
|
|
in nsIUrlListener aUrlListener,
|
|
|
|
out nsIURI aURL,
|
|
|
|
in unsigned long aUidHighWater);
|
|
|
|
|
|
|
|
void deleteMessages(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aImapMailFolder,
|
|
|
|
in nsIUrlListener aUrlListener,
|
|
|
|
out nsIURI aURL,
|
|
|
|
in string aMessageIdentifierList,
|
|
|
|
in boolean aMessageIdsAreUID);
|
|
|
|
|
|
|
|
void deleteAllMessages(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aImapMailFolder,
|
|
|
|
in nsIUrlListener aUrlListener,
|
|
|
|
out nsIURI aURL);
|
|
|
|
|
|
|
|
void addMessageFlags(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aImapMailFolder,
|
|
|
|
in nsIUrlListener aUrlListener,
|
|
|
|
out nsIURI aURL,
|
|
|
|
in string aMessageIdentifierList,
|
|
|
|
in imapMessageFlagsType aFlags,
|
|
|
|
in boolean aMessageIdsAreUID);
|
|
|
|
|
|
|
|
void subtractMessageFlags(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aImapMailFolder,
|
|
|
|
in nsIUrlListener aUrlListener,
|
|
|
|
out nsIURI aURL,
|
|
|
|
in string aMessageIdentifierList,
|
|
|
|
in imapMessageFlagsType aFlags,
|
|
|
|
in boolean aMessageIdsAreUID);
|
|
|
|
|
|
|
|
void setMessageFlags(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aImapMailFolder,
|
|
|
|
in nsIUrlListener aUrlListener,
|
|
|
|
out nsIURI aURL,
|
|
|
|
in string aMessageIdentifierList,
|
|
|
|
in imapMessageFlagsType aFlags,
|
|
|
|
in boolean aMessageIdsAreUID);
|
|
|
|
|
|
|
|
void discoverAllFolders(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aImapMailFolder,
|
|
|
|
in nsIUrlListener aUrlListener,
|
2002-12-03 16:06:46 +03:00
|
|
|
in nsIMsgWindow aMsgWindow,
|
2000-03-20 03:15:14 +03:00
|
|
|
out nsIURI aURL);
|
|
|
|
|
|
|
|
void discoverAllAndSubscribedFolders(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aImapMailFolder,
|
|
|
|
in nsIUrlListener aUrlListener,
|
|
|
|
out nsIURI aURL);
|
|
|
|
void discoverChildren(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aImapMailFolder,
|
|
|
|
in nsIUrlListener aUrlListener,
|
2002-12-03 16:06:46 +03:00
|
|
|
in string folderPath,
|
2000-03-20 03:15:14 +03:00
|
|
|
out nsIURI aURL);
|
|
|
|
|
|
|
|
void discoverLevelChildren(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aImapMailFolder,
|
|
|
|
in nsIUrlListener aUrlListener,
|
2002-12-03 16:06:46 +03:00
|
|
|
in string folderPath,
|
2000-03-20 03:15:14 +03:00
|
|
|
in long aLevel,
|
|
|
|
out nsIURI aURL);
|
|
|
|
|
|
|
|
void onlineMessageCopy(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aSrcFolder,
|
|
|
|
in string aMessageIds,
|
|
|
|
in nsIMsgFolder aDstFolder,
|
|
|
|
in boolean aIdsAreUids,
|
|
|
|
in boolean aIsMove,
|
|
|
|
in nsIUrlListener aUrlListener,
|
|
|
|
out nsIURI aURL,
|
2000-07-27 01:27:39 +04:00
|
|
|
in nsISupports aCopyState,
|
2001-09-27 06:47:03 +04:00
|
|
|
in nsIMsgWindow aWindow);
|
2000-03-20 03:15:14 +03:00
|
|
|
|
|
|
|
|
|
|
|
void appendMessageFromFile(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIFileSpec aFileSpec,
|
|
|
|
in nsIMsgFolder aDstFolder,
|
|
|
|
in string aMessageId,
|
|
|
|
in boolean idsAreUids,
|
|
|
|
in boolean aInSelectedState,
|
|
|
|
in nsIUrlListener aUrlListener,
|
|
|
|
out nsIURI aURL,
|
2002-02-09 04:36:22 +03:00
|
|
|
in nsISupports aCopyState,
|
|
|
|
in nsIMsgWindow aMsgWindow);
|
2000-03-20 03:15:14 +03:00
|
|
|
|
2000-12-12 06:14:43 +03:00
|
|
|
void downloadMessagesForOffline(in string aMessageIds, in nsIMsgFolder aSrcFolder,
|
2001-02-01 18:20:31 +03:00
|
|
|
in nsIUrlListener aListener, in nsIMsgWindow aMsgWindow);
|
2000-03-20 03:15:14 +03:00
|
|
|
nsIURI moveFolder(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aSrcFolder,
|
|
|
|
in nsIMsgFolder aDstFolder,
|
2001-09-27 06:47:03 +04:00
|
|
|
in nsIUrlListener aUrlListener,
|
|
|
|
in nsIMsgWindow msgWindow);
|
2000-03-20 03:15:14 +03:00
|
|
|
|
|
|
|
nsIURI renameLeaf(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aSrcFolder,
|
|
|
|
in wstring aLeafName,
|
2001-09-27 06:47:03 +04:00
|
|
|
in nsIUrlListener aUrlListener,
|
|
|
|
in nsIMsgWindow msgWindow);
|
2000-03-20 03:15:14 +03:00
|
|
|
|
|
|
|
nsIURI deleteFolder(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aFolder,
|
|
|
|
in nsIUrlListener aUrlListener);
|
|
|
|
|
|
|
|
nsIURI createFolder(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aParentFolder,
|
|
|
|
in wstring aLeafName,
|
|
|
|
in nsIUrlListener aUrlListener);
|
|
|
|
|
|
|
|
nsIURI listFolder(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aMailFolder,
|
|
|
|
in nsIUrlListener aUrlListener);
|
2000-04-30 12:19:31 +04:00
|
|
|
|
2000-05-11 04:49:51 +04:00
|
|
|
nsIURI subscribeFolder(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aMailFolder,
|
|
|
|
in wstring mailboxName,
|
|
|
|
in nsIUrlListener aUrlListener);
|
|
|
|
|
|
|
|
nsIURI unsubscribeFolder(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aMailFolder,
|
|
|
|
in wstring mailboxName,
|
|
|
|
in nsIUrlListener aUrlListener);
|
|
|
|
|
2000-08-05 18:28:47 +04:00
|
|
|
// this method will first check if the folder exists but is
|
|
|
|
// not subscribed to, in which case it will subscribe to the folder.
|
|
|
|
// otherwise, it will try to create the folder. It will try to do this
|
|
|
|
// with one url.
|
|
|
|
nsIURI ensureFolderExists(in nsIEventQueue aClientEventQueue,
|
2002-12-03 16:06:46 +03:00
|
|
|
in nsIMsgFolder aParentFolder,
|
|
|
|
in wstring aLeafName,
|
|
|
|
in nsIUrlListener aUrlListener);
|
2000-08-05 18:28:47 +04:00
|
|
|
|
|
|
|
|
2002-02-08 05:05:28 +03:00
|
|
|
nsIURI getFolderAdminUrl(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aMailFolder,
|
|
|
|
in nsIMsgWindow aMsgWindow,
|
|
|
|
in nsIUrlListener aUrlListener);
|
|
|
|
|
2002-08-13 05:41:33 +04:00
|
|
|
nsIURI issueCommandOnMsgs(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aMailFolder,
|
|
|
|
in nsIMsgWindow aMsgWindow,
|
|
|
|
in string aCommand,
|
|
|
|
in string aMessageIdentifierList);
|
|
|
|
|
|
|
|
nsIURI fetchCustomMsgAttribute(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aMailFolder,
|
|
|
|
in nsIMsgWindow aMsgWindow,
|
|
|
|
in string aAttribute,
|
|
|
|
in string aMessageIdentifierList);
|
|
|
|
|
2003-01-21 21:00:00 +03:00
|
|
|
nsIURI storeCustomKeywords(in nsIEventQueue aClientEventQueue,
|
|
|
|
in nsIMsgFolder aMailFolder,
|
|
|
|
in nsIMsgWindow aMsgWindow,
|
|
|
|
in string flagsToAdd,
|
|
|
|
in string flagsToSubtract,
|
|
|
|
in string aMessageIdentifierList);
|
|
|
|
|
2000-11-17 23:47:31 +03:00
|
|
|
void getListOfFoldersOnServer(in nsIImapIncomingServer aServer, in nsIMsgWindow aMsgWindow);
|
|
|
|
void getListOfFoldersWithPath(in nsIImapIncomingServer aServer, in nsIMsgWindow aMsgWindow, in string folderPath);
|
2001-03-17 04:59:34 +03:00
|
|
|
|
2001-09-25 03:28:15 +04:00
|
|
|
nsISupports playbackAllOfflineOperations(in nsIMsgWindow aMsgWindow, in nsIUrlListener aListener);
|
2001-03-17 04:59:34 +03:00
|
|
|
void downloadAllOffineImapFolders(in nsIMsgWindow aMsgWindow, in nsIUrlListener aListener);
|
2001-04-13 07:48:37 +04:00
|
|
|
|
|
|
|
readonly attribute nsICacheSession cacheSession;
|
2000-03-20 03:15:14 +03:00
|
|
|
};
|