1999-04-21 09:20:11 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
|
|
*
|
1999-11-06 06:43:54 +03: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/
|
1999-04-21 09:20:11 +04:00
|
|
|
*
|
1999-11-06 06:43:54 +03: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.
|
1999-04-21 09:20:11 +04:00
|
|
|
*
|
1999-11-06 06:43:54 +03:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is Netscape
|
1999-04-21 09:20:11 +04:00
|
|
|
* Communications Corporation. Portions created by Netscape are
|
1999-11-06 06:43:54 +03:00
|
|
|
* Copyright (C) 1998, 1999 Netscape Communications Corporation. All
|
|
|
|
* Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
1999-04-21 09:20:11 +04:00
|
|
|
*/
|
|
|
|
#ifndef nsImapMailFolder_h__
|
|
|
|
#define nsImapMailFolder_h__
|
|
|
|
|
|
|
|
#include "nsImapCore.h"
|
1999-05-11 01:47:59 +04:00
|
|
|
#include "nsMsgDBFolder.h"
|
1999-08-07 07:43:06 +04:00
|
|
|
#include "nsIMessage.h"
|
1999-04-26 01:25:40 +04:00
|
|
|
#include "nsIImapMailFolderSink.h"
|
1999-04-22 23:02:45 +04:00
|
|
|
#include "nsIImapMessageSink.h"
|
|
|
|
#include "nsIImapExtensionSink.h"
|
|
|
|
#include "nsIImapMiscellaneousSink.h"
|
1999-04-21 09:20:11 +04:00
|
|
|
#include "nsICopyMessageListener.h"
|
1999-04-22 23:02:45 +04:00
|
|
|
#include "nsIImapService.h"
|
|
|
|
#include "nsIUrlListener.h"
|
1999-05-15 23:39:58 +04:00
|
|
|
#include "nsIImapIncomingServer.h" // we need this for its IID
|
1999-05-28 02:13:57 +04:00
|
|
|
#include "nsIMsgParseMailMsgState.h"
|
1999-06-15 17:16:51 +04:00
|
|
|
#include "nsITransactionManager.h"
|
|
|
|
#include "nsMsgTxn.h"
|
1999-07-07 08:01:05 +04:00
|
|
|
#include "nsIMsgMessageService.h"
|
1999-06-11 11:07:04 +04:00
|
|
|
#include "nsIMsgFilterHitNotify.h"
|
|
|
|
#include "nsIMsgFilterList.h"
|
2000-01-11 05:50:46 +03:00
|
|
|
#include "prmon.h"
|
2000-01-11 08:57:45 +03:00
|
|
|
#include "nsIEventQueue.h"
|
1999-06-16 03:17:49 +04:00
|
|
|
class nsImapMoveCoalescer;
|
|
|
|
|
1999-04-21 09:20:11 +04:00
|
|
|
|
1999-07-07 08:01:05 +04:00
|
|
|
#define FOUR_K 4096
|
|
|
|
|
1999-07-19 02:33:25 +04:00
|
|
|
/* b64534f0-3d53-11d3-ac2a-00805f8ac968 */
|
|
|
|
|
|
|
|
#define NS_IMAPMAILCOPYSTATE_IID \
|
|
|
|
{ 0xb64534f0, 0x3d53, 0x11d3, \
|
|
|
|
{ 0xac, 0x2a, 0x00, 0x80, 0x5f, 0x8a, 0xc9, 0x68 } }
|
|
|
|
|
|
|
|
class nsImapMailCopyState: public nsISupports
|
1999-07-07 08:01:05 +04:00
|
|
|
{
|
1999-07-19 02:33:25 +04:00
|
|
|
public:
|
|
|
|
static const nsIID& GetIID()
|
|
|
|
{
|
|
|
|
static nsIID iid = NS_IMAPMAILCOPYSTATE_IID;
|
|
|
|
return iid;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
1999-07-07 08:01:05 +04:00
|
|
|
nsImapMailCopyState();
|
|
|
|
virtual ~nsImapMailCopyState();
|
|
|
|
|
1999-07-16 22:03:55 +04:00
|
|
|
nsCOMPtr<nsISupports> m_srcSupport; // source file spec or folder
|
|
|
|
nsCOMPtr<nsISupportsArray> m_messages; // array of source messages
|
|
|
|
nsCOMPtr<nsMsgTxn> m_undoMsgTxn; // undo object with this copy operation
|
|
|
|
nsCOMPtr<nsIMessage> m_message; // current message to be copied
|
|
|
|
nsCOMPtr<nsIMsgCopyServiceListener> m_listener; // listener of this copy
|
|
|
|
// operation
|
|
|
|
nsCOMPtr<nsIFileSpec> m_tmpFileSpec; // temp file spec for copy operation
|
1999-07-14 00:13:41 +04:00
|
|
|
|
1999-07-16 22:03:55 +04:00
|
|
|
nsIMsgMessageService* m_msgService; // source folder message service; can
|
|
|
|
// be Nntp, Mailbox, or Imap
|
|
|
|
PRBool m_isMove; // is a move
|
|
|
|
PRBool m_selectedState; // needs to be in selected state; append msg
|
|
|
|
PRUint32 m_curIndex; // message index to the message array which we are
|
|
|
|
// copying
|
|
|
|
PRUint32 m_totalCount;// total count of messages we have to do
|
1999-08-10 04:47:44 +04:00
|
|
|
PRBool m_streamCopy;
|
1999-07-16 22:03:55 +04:00
|
|
|
char *m_dataBuffer; // temporary buffer for this copy operation
|
1999-11-19 17:39:05 +03:00
|
|
|
PRUint32 m_leftOver;
|
1999-07-07 08:01:05 +04:00
|
|
|
};
|
|
|
|
|
1999-05-11 01:47:59 +04:00
|
|
|
class nsImapMailFolder : public nsMsgDBFolder,
|
1999-04-21 09:20:11 +04:00
|
|
|
public nsIMsgImapMailFolder,
|
|
|
|
public nsIImapMailFolderSink,
|
1999-04-22 23:02:45 +04:00
|
|
|
public nsIImapMessageSink,
|
|
|
|
public nsIImapExtensionSink,
|
|
|
|
public nsIImapMiscellaneousSink,
|
|
|
|
public nsICopyMessageListener,
|
1999-09-15 04:59:03 +04:00
|
|
|
public nsIMsgFilterHitNotify
|
1999-04-21 09:20:11 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsImapMailFolder();
|
|
|
|
virtual ~nsImapMailFolder();
|
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
|
1999-08-26 08:41:07 +04:00
|
|
|
// nsICollection methods
|
|
|
|
NS_IMETHOD Enumerate(nsIEnumerator **result);
|
|
|
|
|
1999-04-21 09:20:11 +04:00
|
|
|
// nsIFolder methods:
|
|
|
|
NS_IMETHOD GetSubFolders(nsIEnumerator* *result);
|
|
|
|
|
|
|
|
// nsIMsgFolder methods:
|
|
|
|
NS_IMETHOD AddUnique(nsISupports* element);
|
|
|
|
NS_IMETHOD ReplaceElement(nsISupports* element, nsISupports* newElement);
|
1999-08-26 08:41:07 +04:00
|
|
|
NS_IMETHOD GetMessages(nsISimpleEnumerator* *result);
|
1999-11-03 00:36:59 +03:00
|
|
|
NS_IMETHOD UpdateFolder(nsIMsgWindow *aWindow);
|
1999-04-21 09:20:11 +04:00
|
|
|
|
|
|
|
NS_IMETHOD CreateSubfolder(const char *folderName);
|
1999-11-22 17:43:19 +03:00
|
|
|
NS_IMETHOD AddSubfolder(nsAutoString *name, nsIMsgFolder **child);
|
1999-04-21 09:20:11 +04:00
|
|
|
|
1999-08-06 17:43:49 +04:00
|
|
|
NS_IMETHOD Compact();
|
1999-08-06 22:25:43 +04:00
|
|
|
NS_IMETHOD EmptyTrash();
|
1999-04-21 09:20:11 +04:00
|
|
|
NS_IMETHOD Delete ();
|
|
|
|
NS_IMETHOD Rename (const char *newName);
|
|
|
|
NS_IMETHOD Adopt(nsIMsgFolder *srcFolder, PRUint32 *outPos);
|
1999-08-10 04:47:44 +04:00
|
|
|
|
1999-06-29 02:29:08 +04:00
|
|
|
NS_IMETHOD GetPrettyName(PRUnichar ** prettyName); // Override of the base, for top-level mail folder
|
1999-04-21 09:20:11 +04:00
|
|
|
|
1999-10-21 01:58:21 +04:00
|
|
|
NS_IMETHOD GetFolderURL(char **url);
|
1999-04-21 09:20:11 +04:00
|
|
|
|
1999-07-18 00:33:15 +04:00
|
|
|
NS_IMETHOD UpdateSummaryTotals(PRBool force) ;
|
1999-04-21 09:20:11 +04:00
|
|
|
|
|
|
|
NS_IMETHOD GetExpungedBytesCount(PRUint32 *count);
|
|
|
|
NS_IMETHOD GetDeletable (PRBool *deletable);
|
|
|
|
NS_IMETHOD GetRequiresCleanup(PRBool *requiresCleanup);
|
|
|
|
|
1999-05-08 01:18:06 +04:00
|
|
|
NS_IMETHOD GetSizeOnDisk(PRUint32 * size);
|
fix for #17402, stationary -> stationery.
r=alecf
major fixes for the new folder / rename folder / subscribe dialogs.
we no longer use an html select for the folder picker.
now we use cascading menu popups, like the copy and move menus.
this fixes a lot of bugs, and allows pre-flighting to finally work.
our folder data source has some new properies:
CanFileMessages, CanSubscribe, CanRename, and CanCreateSubfolders
we use these to determine what cascading menu to build, what to disable, etc.
also, nsMessenger::NewFolder() and nsMessenger::RenameFolder() were changes to
take a nsIRDFResource instead of a nsIDOMXULElement. Before we were
passing through to the back end the selected xul element, now we pass
the resource in.
other cool side effects:
in the copy & move menus, you don't get the choice to file or copy to a server, on folders
in the rename dialog, you can't pick a server, on a folder
in the new folder dialog, you can't pick the imap inbox. (* more needs to be done here.)
bugs fixed: #14773, #14254, #20599, #20646
r=alecf
a couple bullet proofing fixes to prevent some crashes reported on fullcircle
r=bienvenu
1999-12-03 11:10:09 +03:00
|
|
|
|
|
|
|
NS_IMETHOD GetCanCreateSubfolders(PRBool *aResult);
|
|
|
|
|
1999-04-21 09:20:11 +04:00
|
|
|
NS_IMETHOD UserNeedsToAuthenticateForFolder(PRBool displayOnly, PRBool *authenticate);
|
1999-05-08 01:18:06 +04:00
|
|
|
NS_IMETHOD RememberPassword(const char *password);
|
1999-04-21 09:20:11 +04:00
|
|
|
NS_IMETHOD GetRememberedPassword(char ** password);
|
1999-07-29 04:42:25 +04:00
|
|
|
|
|
|
|
NS_IMETHOD MarkMessagesRead(nsISupportsArray *messages, PRBool markRead);
|
|
|
|
NS_IMETHOD MarkAllMessagesRead(void);
|
1999-09-18 00:13:42 +04:00
|
|
|
NS_IMETHOD MarkMessagesFlagged(nsISupportsArray *messages, PRBool markFlagged);
|
1999-08-10 03:20:24 +04:00
|
|
|
|
|
|
|
NS_IMETHOD DeleteSubFolders(nsISupportsArray *folders);
|
1999-12-17 06:06:42 +03:00
|
|
|
NS_IMETHOD ReadFromFolderCacheElem(nsIMsgFolderCacheElement *element);
|
|
|
|
NS_IMETHOD WriteToFolderCacheElem(nsIMsgFolderCacheElement *element);
|
1999-04-21 09:20:11 +04:00
|
|
|
|
|
|
|
virtual nsresult GetDBFolderInfoAndDB(nsIDBFolderInfo **folderInfo,
|
|
|
|
nsIMsgDatabase **db);
|
1999-06-10 18:55:36 +04:00
|
|
|
NS_IMETHOD DeleteMessages(nsISupportsArray *messages,
|
1999-10-29 08:39:06 +04:00
|
|
|
nsIMsgWindow *msgWindow, PRBool
|
1999-07-07 08:01:05 +04:00
|
|
|
deleteStorage);
|
|
|
|
NS_IMETHOD CopyMessages(nsIMsgFolder *srcFolder,
|
|
|
|
nsISupportsArray* messages,
|
1999-10-29 08:39:06 +04:00
|
|
|
PRBool isMove, nsIMsgWindow *msgWindow,
|
1999-07-14 00:13:41 +04:00
|
|
|
nsIMsgCopyServiceListener* listener);
|
1999-07-07 08:01:05 +04:00
|
|
|
NS_IMETHOD CopyFileMessage(nsIFileSpec* fileSpec,
|
|
|
|
nsIMessage* msgToReplace,
|
1999-07-14 00:13:41 +04:00
|
|
|
PRBool isDraftOrTemplate,
|
1999-10-29 08:39:06 +04:00
|
|
|
nsIMsgWindow *msgWindow,
|
1999-07-14 00:13:41 +04:00
|
|
|
nsIMsgCopyServiceListener* listener);
|
1999-05-11 02:25:26 +04:00
|
|
|
NS_IMETHOD CreateMessageFromMsgDBHdr(nsIMsgDBHdr *msgHdr, nsIMessage
|
|
|
|
**message);
|
1999-11-03 00:36:59 +03:00
|
|
|
NS_IMETHOD GetNewMessages(nsIMsgWindow *aWindow);
|
1999-04-21 09:20:11 +04:00
|
|
|
|
1999-12-18 04:09:51 +03:00
|
|
|
#if 0
|
1999-06-25 07:56:02 +04:00
|
|
|
NS_IMETHOD GetPath(nsIFileSpec** aPathName);
|
1999-12-07 08:51:53 +03:00
|
|
|
NS_IMETHOD SetPath(nsIFileSpec * aPath);
|
1999-12-18 04:09:51 +03:00
|
|
|
#endif
|
1999-08-19 23:52:51 +04:00
|
|
|
|
|
|
|
// nsIMsgImapMailFolder methods
|
1999-08-25 05:18:42 +04:00
|
|
|
NS_DECL_NSIMSGIMAPMAILFOLDER
|
1999-08-19 23:52:51 +04:00
|
|
|
|
1999-04-21 09:20:11 +04:00
|
|
|
// nsIImapMailFolderSink methods
|
2000-01-13 00:42:19 +03:00
|
|
|
NS_DECL_NSIIMAPMAILFOLDERSINK
|
1999-04-21 09:20:11 +04:00
|
|
|
|
1999-04-22 23:02:45 +04:00
|
|
|
// nsIImapMessageSink methods
|
1999-09-12 21:49:08 +04:00
|
|
|
NS_DECL_NSIIMAPMESSAGESINK
|
1999-04-22 23:02:45 +04:00
|
|
|
|
1999-09-12 21:49:08 +04:00
|
|
|
//nsICopyMessageListener
|
2000-01-19 01:33:35 +03:00
|
|
|
NS_DECL_NSICOPYMESSAGELISTENER
|
1999-04-21 09:20:11 +04:00
|
|
|
|
1999-04-22 23:02:45 +04:00
|
|
|
// nsIUrlListener methods
|
1999-06-23 07:29:44 +04:00
|
|
|
NS_IMETHOD OnStartRunningUrl(nsIURI * aUrl);
|
|
|
|
NS_IMETHOD OnStopRunningUrl(nsIURI * aUrl, nsresult aExitCode);
|
1999-04-22 23:02:45 +04:00
|
|
|
|
|
|
|
// nsIImapExtensionSink methods
|
|
|
|
NS_IMETHOD ClearFolderRights(nsIImapProtocol* aProtocol,
|
|
|
|
nsIMAPACLRightsInfo* aclRights);
|
|
|
|
NS_IMETHOD AddFolderRights(nsIImapProtocol* aProtocol,
|
|
|
|
nsIMAPACLRightsInfo* aclRights);
|
|
|
|
NS_IMETHOD RefreshFolderRights(nsIImapProtocol* aProtocol,
|
|
|
|
nsIMAPACLRightsInfo* aclRights);
|
|
|
|
NS_IMETHOD FolderNeedsACLInitialized(nsIImapProtocol* aProtocol,
|
|
|
|
nsIMAPACLRightsInfo* aclRights);
|
1999-06-15 17:16:51 +04:00
|
|
|
NS_IMETHOD SetCopyResponseUid(nsIImapProtocol* aProtocol,
|
|
|
|
nsMsgKeyArray* keyArray,
|
1999-07-07 17:45:17 +04:00
|
|
|
const char* msgIdString,
|
1999-07-19 02:33:25 +04:00
|
|
|
nsISupports* copyState);
|
1999-07-14 00:13:41 +04:00
|
|
|
NS_IMETHOD SetAppendMsgUid(nsIImapProtocol* aProtocol,
|
|
|
|
nsMsgKey aKey,
|
1999-07-19 02:33:25 +04:00
|
|
|
nsISupports* copyState);
|
1999-07-14 00:13:41 +04:00
|
|
|
NS_IMETHOD GetMessageId(nsIImapProtocol* aProtocol,
|
1999-08-07 06:30:11 +04:00
|
|
|
nsCString* messageId,
|
1999-07-19 02:33:25 +04:00
|
|
|
nsISupports* copyState);
|
1999-04-22 23:02:45 +04:00
|
|
|
|
|
|
|
// nsIImapMiscellaneousSink methods
|
|
|
|
NS_IMETHOD AddSearchResult(nsIImapProtocol* aProtocol,
|
|
|
|
const char* searchHitLine);
|
|
|
|
NS_IMETHOD GetArbitraryHeaders(nsIImapProtocol* aProtocol,
|
|
|
|
GenericInfo* aInfo);
|
|
|
|
NS_IMETHOD GetShouldDownloadArbitraryHeaders(nsIImapProtocol* aProtocol,
|
|
|
|
GenericInfo* aInfo);
|
|
|
|
NS_IMETHOD GetShowAttachmentsInline(nsIImapProtocol* aProtocol,
|
|
|
|
PRBool* aBool);
|
|
|
|
NS_IMETHOD HeaderFetchCompleted(nsIImapProtocol* aProtocol);
|
|
|
|
NS_IMETHOD UpdateSecurityStatus(nsIImapProtocol* aProtocol);
|
|
|
|
// ****
|
|
|
|
NS_IMETHOD SetBiffStateAndUpdate(nsIImapProtocol* aProtocol,
|
|
|
|
nsMsgBiffState biffState);
|
|
|
|
NS_IMETHOD GetStoredUIDValidity(nsIImapProtocol* aProtocol,
|
|
|
|
uid_validity_info* aInfo);
|
|
|
|
NS_IMETHOD LiteSelectUIDValidity(nsIImapProtocol* aProtocol,
|
|
|
|
PRUint32 uidValidity);
|
|
|
|
NS_IMETHOD ProgressStatus(nsIImapProtocol* aProtocol,
|
1999-08-18 06:03:43 +04:00
|
|
|
PRUint32 aMsgId, const char *extraInfo);
|
1999-04-22 23:02:45 +04:00
|
|
|
NS_IMETHOD PercentProgress(nsIImapProtocol* aProtocol,
|
|
|
|
ProgressInfo* aInfo);
|
|
|
|
NS_IMETHOD TunnelOutStream(nsIImapProtocol* aProtocol,
|
|
|
|
msg_line_info* aInfo);
|
|
|
|
NS_IMETHOD ProcessTunnel(nsIImapProtocol* aProtocol,
|
|
|
|
TunnelInfo *aInfo);
|
1999-07-16 22:03:55 +04:00
|
|
|
NS_IMETHOD CopyNextStreamMessage(nsIImapProtocol* aProtocol,
|
1999-07-19 02:33:25 +04:00
|
|
|
nsISupports* copyState);
|
1999-08-04 22:39:53 +04:00
|
|
|
NS_IMETHOD SetUrlState(nsIImapProtocol* aProtocol,
|
|
|
|
nsIMsgMailNewsUrl* aUrl,
|
|
|
|
PRBool isRunning,
|
|
|
|
nsresult statusCode);
|
1999-04-22 23:02:45 +04:00
|
|
|
|
1999-07-27 09:17:45 +04:00
|
|
|
NS_IMETHOD MatchName(nsString *name, PRBool *matches);
|
1999-06-11 11:07:04 +04:00
|
|
|
// nsIMsgFilterHitNotification method(s)
|
|
|
|
NS_IMETHOD ApplyFilterHit(nsIMsgFilter *filter, PRBool *applyMore);
|
|
|
|
|
1999-07-31 03:53:01 +04:00
|
|
|
// overriding nsMsgDBFolder::GetMsgDatabase()
|
|
|
|
NS_IMETHOD GetMsgDatabase(nsIMsgDatabase** aMsgDatabase);
|
|
|
|
|
1999-11-01 04:10:08 +03:00
|
|
|
nsresult GetMessageHeader(nsMsgKey key, nsIMsgDBHdr ** aMsgHdr);
|
|
|
|
|
1999-06-11 11:07:04 +04:00
|
|
|
nsresult MoveIncorporatedMessage(nsIMsgDBHdr *mailHdr,
|
|
|
|
nsIMsgDatabase *sourceDB,
|
|
|
|
char *destFolder,
|
1999-06-12 06:04:29 +04:00
|
|
|
nsIMsgFilter *filter);
|
|
|
|
nsresult StoreImapFlags(imapMessageFlagsType flags, PRBool addFlags, nsMsgKeyArray &msgKeys);
|
1999-07-31 22:16:24 +04:00
|
|
|
static nsresult AllocateUidStringFromKeyArray(nsMsgKeyArray &keyArray, nsCString &msgIds);
|
1999-04-21 09:20:11 +04:00
|
|
|
protected:
|
|
|
|
// Helper methods
|
1999-04-22 23:02:45 +04:00
|
|
|
void FindKeysToAdd(const nsMsgKeyArray &existingKeys, nsMsgKeyArray
|
2000-01-13 00:42:19 +03:00
|
|
|
&keysToFetch, nsIImapFlagAndUidState *flagState);
|
1999-04-22 23:02:45 +04:00
|
|
|
void FindKeysToDelete(const nsMsgKeyArray &existingKeys, nsMsgKeyArray
|
2000-01-13 00:42:19 +03:00
|
|
|
&keysToFetch, nsIImapFlagAndUidState *flagState);
|
1999-04-22 23:02:45 +04:00
|
|
|
void PrepareToAddHeadersToMailDB(nsIImapProtocol* aProtocol, const
|
|
|
|
nsMsgKeyArray &keysToFetch,
|
2000-01-13 00:42:19 +03:00
|
|
|
nsIMailboxSpec *boxSpec);
|
1999-04-25 00:43:25 +04:00
|
|
|
void TweakHeaderFlags(nsIImapProtocol* aProtocol, nsIMsgDBHdr *tweakMe);
|
1999-04-27 06:09:42 +04:00
|
|
|
|
2000-01-13 00:42:19 +03:00
|
|
|
nsresult SyncFlags(nsIImapFlagAndUidState *flagState);
|
1999-10-22 02:23:25 +04:00
|
|
|
|
1999-11-01 04:10:08 +03:00
|
|
|
void UpdatePendingCounts(PRBool countUnread, PRBool missingAreRead);
|
1999-04-27 06:09:42 +04:00
|
|
|
void SetIMAPDeletedFlag(nsIMsgDatabase *mailDB, const nsMsgKeyArray &msgids, PRBool markDeleted);
|
|
|
|
virtual PRBool ShowDeletedMessages();
|
1999-06-20 19:35:10 +04:00
|
|
|
virtual PRBool DeleteIsMoveToTrash();
|
1999-04-27 06:09:42 +04:00
|
|
|
void ParseUidString(char *uidString, nsMsgKeyArray &keys);
|
1999-09-02 00:06:25 +04:00
|
|
|
nsresult GetFolder(const char *name, nsIMsgFolder **pFolder);
|
1999-06-20 19:35:10 +04:00
|
|
|
nsresult GetTrashFolder(nsIMsgFolder **pTrashFolder);
|
1999-08-10 03:20:24 +04:00
|
|
|
PRBool InTrash(nsIMsgFolder* folder);
|
1999-09-14 06:23:56 +04:00
|
|
|
nsresult GetServerKey(char **serverKey);
|
1999-04-27 06:09:42 +04:00
|
|
|
|
1999-04-21 09:20:11 +04:00
|
|
|
nsresult AddDirectorySeparator(nsFileSpec &path);
|
1999-04-23 04:36:07 +04:00
|
|
|
nsresult CreateDirectoryForFolder(nsFileSpec &path);
|
1999-04-21 09:20:11 +04:00
|
|
|
nsresult CreateSubFolders(nsFileSpec &path);
|
1999-04-23 05:33:52 +04:00
|
|
|
nsresult GetDatabase();
|
1999-06-22 07:03:48 +04:00
|
|
|
virtual const char *GetIncomingServerType() {return "imap";}
|
1999-05-15 23:39:58 +04:00
|
|
|
|
1999-07-07 08:01:05 +04:00
|
|
|
// Uber message copy service
|
1999-08-25 05:18:42 +04:00
|
|
|
nsresult CopyMessagesWithStream(nsIMsgFolder* srcFolder,
|
1999-07-07 08:01:05 +04:00
|
|
|
nsISupportsArray* messages,
|
|
|
|
PRBool isMove,
|
1999-10-29 08:39:06 +04:00
|
|
|
nsIMsgWindow *msgWindow,
|
1999-07-14 00:13:41 +04:00
|
|
|
nsIMsgCopyServiceListener* listener);
|
1999-07-16 22:03:55 +04:00
|
|
|
nsresult CopyStreamMessage(nsIMessage* message, nsIMsgFolder* dstFolder,
|
|
|
|
PRBool isMove);
|
1999-07-07 08:01:05 +04:00
|
|
|
nsresult InitCopyState(nsISupports* srcSupport,
|
|
|
|
nsISupportsArray* messages,
|
1999-07-16 22:03:55 +04:00
|
|
|
PRBool isMove,
|
|
|
|
PRBool selectedState,
|
1999-07-14 00:13:41 +04:00
|
|
|
nsIMsgCopyServiceListener* listener);
|
1999-07-07 10:37:55 +04:00
|
|
|
void ClearCopyState(nsresult exitCode);
|
1999-07-07 08:01:05 +04:00
|
|
|
nsresult SetTransactionManager(nsITransactionManager* txnMgr);
|
|
|
|
nsresult BuildIdsAndKeyArray(nsISupportsArray* messages,
|
1999-07-29 04:42:25 +04:00
|
|
|
nsCString& msgIds, nsMsgKeyArray& keyArray);
|
1999-07-07 08:01:05 +04:00
|
|
|
|
1999-04-22 23:02:45 +04:00
|
|
|
PRBool m_initialized;
|
1999-08-25 05:18:42 +04:00
|
|
|
PRBool m_haveDiscoveredAllFolders;
|
1999-04-22 23:02:45 +04:00
|
|
|
PRBool m_haveReadNameFromDB;
|
1999-05-28 02:13:57 +04:00
|
|
|
nsCOMPtr<nsIMsgParseMailMsgState> m_msgParser;
|
1999-06-11 11:07:04 +04:00
|
|
|
nsCOMPtr<nsIMsgFilterList> m_filterList;
|
|
|
|
PRBool m_msgMovedByFilter;
|
1999-06-16 03:17:49 +04:00
|
|
|
nsImapMoveCoalescer *m_moveCoalescer;
|
1999-04-22 23:02:45 +04:00
|
|
|
nsMsgKey m_curMsgUid;
|
|
|
|
PRInt32 m_nextMessageByteLength;
|
1999-05-07 04:47:33 +04:00
|
|
|
nsCOMPtr<nsIEventQueue> m_eventQueue;
|
1999-04-22 23:02:45 +04:00
|
|
|
PRBool m_urlRunning;
|
1999-04-26 09:08:49 +04:00
|
|
|
|
|
|
|
// part of temporary libmime converstion trick......these should go away once MIME uses a new stream
|
|
|
|
// converter interface...
|
1999-05-27 02:53:03 +04:00
|
|
|
nsCOMPtr<nsIOutputStream> m_tempMessageStream;
|
1999-06-15 17:16:51 +04:00
|
|
|
|
|
|
|
// *** jt - undo move/copy trasaction support
|
|
|
|
nsCOMPtr<nsITransactionManager> m_transactionManager;
|
|
|
|
nsCOMPtr<nsMsgTxn> m_pendingUndoTxn;
|
1999-07-19 02:33:25 +04:00
|
|
|
nsCOMPtr<nsImapMailCopyState> m_copyState;
|
1999-07-16 22:03:55 +04:00
|
|
|
PRMonitor *m_appendMsgMonitor;
|
1999-08-25 05:18:42 +04:00
|
|
|
PRBool m_verifiedAsOnlineFolder;
|
|
|
|
PRBool m_explicitlyVerify; // whether or not we need to explicitly verify this through LIST
|
1999-12-17 06:06:42 +03:00
|
|
|
PRUnichar m_hierarchyDelimiter;
|
|
|
|
PRInt32 m_boxFlags;
|
1999-08-25 05:18:42 +04:00
|
|
|
|
1999-04-21 09:20:11 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|