2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
1999-03-20 01:55:08 +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/
|
1999-03-20 01:55:08 +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.
|
1999-03-20 01:55:08 +03:00
|
|
|
*
|
1999-11-06 06:43:54 +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) 1998
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
1999-11-06 06:43:54 +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 ***** */
|
1999-03-20 01:55:08 +03:00
|
|
|
|
|
|
|
/********************************************************************************************************
|
|
|
|
|
|
|
|
Interface for representing Messenger folders.
|
|
|
|
|
|
|
|
*********************************************************************************************************/
|
|
|
|
|
|
|
|
#ifndef nsMsgFolder_h__
|
|
|
|
#define nsMsgFolder_h__
|
|
|
|
|
|
|
|
#include "msgCore.h"
|
|
|
|
#include "nsIMsgFolder.h" /* include the interface we are going to support */
|
|
|
|
#include "nsRDFResource.h"
|
1999-03-24 03:17:23 +03:00
|
|
|
#include "nsIDBFolderInfo.h"
|
1999-04-16 01:12:10 +04:00
|
|
|
#include "nsIMsgDatabase.h"
|
1999-05-16 01:03:02 +04:00
|
|
|
#include "nsIMsgIncomingServer.h"
|
1999-05-05 02:34:35 +04:00
|
|
|
#include "nsCOMPtr.h"
|
1999-10-22 05:02:08 +04:00
|
|
|
#include "nsIURL.h"
|
2000-01-05 01:41:21 +03:00
|
|
|
#include "nsWeakReference.h"
|
2000-03-28 08:58:05 +04:00
|
|
|
#include "nsIMsgFilterList.h"
|
2000-05-15 18:55:22 +04:00
|
|
|
#include "nsIUrlListener.h"
|
2001-07-16 06:40:48 +04:00
|
|
|
#include "nsIFileSpec.h"
|
2001-09-27 06:47:03 +04:00
|
|
|
class nsIStringBundle;
|
2000-01-05 01:41:21 +03:00
|
|
|
|
1999-03-20 01:55:08 +03:00
|
|
|
/*
|
|
|
|
* MsgFolder
|
|
|
|
*/
|
|
|
|
|
1999-12-04 06:00:22 +03:00
|
|
|
class NS_MSG_BASE nsMsgFolder : public nsRDFResource,
|
2000-01-05 01:41:21 +03:00
|
|
|
public nsSupportsWeakReference,
|
1999-12-04 06:00:22 +03:00
|
|
|
public nsIMsgFolder
|
1999-03-20 01:55:08 +03:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsMsgFolder(void);
|
|
|
|
virtual ~nsMsgFolder(void);
|
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
|
2001-07-31 23:05:34 +04:00
|
|
|
NS_DECL_NSISERIALIZABLE // XXXbe temporary NOT_IMPLEMENTED stubs
|
|
|
|
|
1999-10-21 01:58:21 +04:00
|
|
|
NS_DECL_NSICOLLECTION
|
|
|
|
NS_DECL_NSIFOLDER
|
|
|
|
// eventually this will be an instantiable class, and we should
|
|
|
|
// use this macro:
|
|
|
|
// NS_DECL_NSIMSGFOLDER
|
|
|
|
|
|
|
|
// right now a few of these methods are left abstract, and
|
|
|
|
// are commented out below
|
|
|
|
|
|
|
|
// begin NS_DECL_NSIMSGFOLDER
|
|
|
|
NS_IMETHOD AddUnique(nsISupports *element);
|
|
|
|
NS_IMETHOD ReplaceElement(nsISupports *element, nsISupports *newElement);
|
2000-01-28 04:22:33 +03:00
|
|
|
NS_IMETHOD GetMessages(nsIMsgWindow *aMsgWindow, nsISimpleEnumerator **_retval);
|
1999-10-21 01:58:21 +04:00
|
|
|
NS_IMETHOD StartFolderLoading(void);
|
|
|
|
NS_IMETHOD EndFolderLoading(void);
|
1999-11-03 06:16:26 +03:00
|
|
|
NS_IMETHOD UpdateFolder(nsIMsgWindow *window);
|
2001-03-17 04:59:34 +03:00
|
|
|
NS_IMETHOD GetFirstNewMessage(nsIMsgDBHdr **firstNewMessage);
|
1999-10-21 01:58:21 +04:00
|
|
|
NS_IMETHOD GetVisibleSubFolders(nsIEnumerator **_retval);
|
|
|
|
NS_IMETHOD GetPrettiestName(PRUnichar * *aPrettiestName);
|
|
|
|
NS_IMETHOD GetFolderURL(char * *aFolderURL);
|
|
|
|
NS_IMETHOD GetDeleteIsMoveToTrash(PRBool *aDeleteIsMoveToTrash);
|
|
|
|
NS_IMETHOD GetShowDeletedMessages(PRBool *aShowDeletedMessages);
|
|
|
|
NS_IMETHOD GetServer(nsIMsgIncomingServer * *aServer);
|
|
|
|
NS_IMETHOD GetIsServer(PRBool *aIsServer);
|
2000-03-14 16:37:54 +03:00
|
|
|
NS_IMETHOD GetNoSelect(PRBool *aNoSelect);
|
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 GetCanSubscribe(PRBool *aCanSubscribe);
|
|
|
|
NS_IMETHOD GetCanFileMessages(PRBool *aCanFileMessages);
|
2001-08-02 07:09:33 +04:00
|
|
|
NS_IMETHOD GetFilterList(nsIMsgFilterList **aFilterList);
|
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 *aCanCreateSubfolders);
|
|
|
|
NS_IMETHOD GetCanRename(PRBool *aCanRename);
|
2001-02-16 05:05:41 +03:00
|
|
|
NS_IMETHOD GetCanCompact(PRBool *aCanCompact);
|
2000-01-28 18:34:13 +03:00
|
|
|
NS_IMETHOD ForceDBClosed(void);
|
1999-10-21 01:58:21 +04:00
|
|
|
NS_IMETHOD Delete(void);
|
2000-03-24 17:58:32 +03:00
|
|
|
NS_IMETHOD DeleteSubFolders(nsISupportsArray *folders, nsIMsgWindow *msgWindow);
|
2000-08-05 18:28:47 +04:00
|
|
|
NS_IMETHOD CreateStorageIfMissing(nsIUrlListener* urlListener);
|
2001-07-25 08:21:01 +04:00
|
|
|
NS_IMETHOD PropagateDelete(nsIMsgFolder *folder, PRBool deleteStorage, nsIMsgWindow *msgWindow);
|
|
|
|
NS_IMETHOD RecursiveDelete(PRBool deleteStorage, nsIMsgWindow *msgWindow);
|
2000-12-05 05:48:44 +03:00
|
|
|
NS_IMETHOD CreateSubfolder(const PRUnichar *folderName, nsIMsgWindow *msgWindow);
|
1999-11-19 17:35:31 +03:00
|
|
|
NS_IMETHOD AddSubfolder(nsAutoString *folderName, nsIMsgFolder **newFolder);
|
2001-03-29 01:14:18 +04:00
|
|
|
NS_IMETHOD Compact(nsIUrlListener *aListener, nsIMsgWindow *msgWindow);
|
2001-07-10 02:15:30 +04:00
|
|
|
NS_IMETHOD CompactAll(nsIUrlListener *aListener, nsIMsgWindow *msgWindow, nsISupportsArray *aFolderArray, PRBool aCompactOfflineAlso, nsISupportsArray *aOfflineFolderArray);
|
2000-05-15 18:55:22 +04:00
|
|
|
NS_IMETHOD EmptyTrash(nsIMsgWindow *msgWindow, nsIUrlListener *aListener);
|
2000-12-05 05:48:44 +03:00
|
|
|
NS_IMETHOD Rename(const PRUnichar *name, nsIMsgWindow *msgWindow);
|
2001-09-27 06:47:03 +04:00
|
|
|
NS_IMETHOD RenameSubFolders(nsIMsgWindow *msgWindow, nsIMsgFolder *msgFolder);
|
1999-10-21 01:58:21 +04:00
|
|
|
NS_IMETHOD ContainsChildNamed(const char *name, PRBool *_retval);
|
|
|
|
NS_IMETHOD IsAncestorOf(nsIMsgFolder *folder, PRBool *_retval);
|
|
|
|
NS_IMETHOD GenerateUniqueSubfolderName(const char *prefix, nsIMsgFolder *otherFolder, char **_retval);
|
|
|
|
NS_IMETHOD UpdateSummaryTotals(PRBool force);
|
|
|
|
NS_IMETHOD SummaryChanged(void);
|
|
|
|
NS_IMETHOD GetNumUnread(PRBool deep, PRInt32 *_retval);
|
|
|
|
NS_IMETHOD GetTotalMessages(PRBool deep, PRInt32 *_retval);
|
2000-06-23 07:19:17 +04:00
|
|
|
NS_IMETHOD GetHasNewMessages(PRBool *hasNewMessages);
|
|
|
|
NS_IMETHOD SetHasNewMessages(PRBool hasNewMessages);
|
2000-01-29 02:25:17 +03:00
|
|
|
NS_IMETHOD ClearNewMessages();
|
2000-05-15 18:55:22 +04:00
|
|
|
NS_IMETHOD GetExpungedBytes(PRUint32 *aExpungedBytesCount);
|
1999-10-21 01:58:21 +04:00
|
|
|
NS_IMETHOD GetDeletable(PRBool *aDeletable);
|
|
|
|
NS_IMETHOD GetRequiresCleanup(PRBool *aRequiresCleanup);
|
|
|
|
NS_IMETHOD ClearRequiresCleanup(void);
|
|
|
|
NS_IMETHOD ManyHeadersToDownload(PRBool *_retval);
|
|
|
|
NS_IMETHOD GetKnowsSearchNntpExtension(PRBool *aKnowsSearchNntpExtension);
|
|
|
|
NS_IMETHOD GetAllowsPosting(PRBool *aAllowsPosting);
|
|
|
|
NS_IMETHOD GetDisplayRecipients(PRBool *aDisplayRecipients);
|
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 GetRelativePathName(char * *aRelativePathName);
|
1999-10-21 01:58:21 +04:00
|
|
|
NS_IMETHOD GetSizeOnDisk(PRUint32 *aSizeOnDisk);
|
|
|
|
NS_IMETHOD RememberPassword(const char *password);
|
|
|
|
NS_IMETHOD GetRememberedPassword(char * *aRememberedPassword);
|
|
|
|
NS_IMETHOD UserNeedsToAuthenticateForFolder(PRBool displayOnly, PRBool *_retval);
|
1999-10-22 05:02:08 +04:00
|
|
|
NS_IMETHOD GetUsername(char * *aUsername);
|
|
|
|
NS_IMETHOD GetHostname(char * *aHostname);
|
2000-03-24 17:58:32 +03:00
|
|
|
NS_IMETHOD SetDeleteIsMoveToTrash(PRBool bVal);
|
|
|
|
NS_IMETHOD RecursiveSetDeleteIsMoveToTrash(PRBool bVal);
|
1999-10-21 01:58:21 +04:00
|
|
|
NS_IMETHOD SetFlag(PRUint32 flag);
|
2000-03-14 16:37:54 +03:00
|
|
|
NS_IMETHOD SetPrefFlag();
|
1999-10-21 01:58:21 +04:00
|
|
|
NS_IMETHOD ClearFlag(PRUint32 flag);
|
|
|
|
NS_IMETHOD GetFlag(PRUint32 flag, PRBool *_retval);
|
|
|
|
NS_IMETHOD ToggleFlag(PRUint32 flag);
|
|
|
|
NS_IMETHOD OnFlagChange(PRUint32 flag);
|
2000-03-14 16:37:54 +03:00
|
|
|
NS_IMETHOD SetFlags(PRUint32 aFlags);
|
2000-01-11 11:01:37 +03:00
|
|
|
NS_IMETHOD GetFoldersWithFlag(PRUint32 flags, PRUint32 resultsize, PRUint32 *numFolders, nsIMsgFolder **result);
|
1999-10-21 01:58:21 +04:00
|
|
|
NS_IMETHOD GetExpansionArray(nsISupportsArray *expansionArray);
|
|
|
|
// NS_IMETHOD DeleteMessages(nsISupportsArray *message, nsITransactionManager *txnMgr, PRBool deleteStorage);
|
2001-05-09 07:14:19 +04:00
|
|
|
NS_IMETHOD CopyMessages(nsIMsgFolder *srcFolder, nsISupportsArray *messages, PRBool isMove, nsIMsgWindow *window, nsIMsgCopyServiceListener *listener, PRBool isFolder, PRBool allowUndo);
|
2001-02-02 23:21:52 +03:00
|
|
|
NS_IMETHOD CopyFolder(nsIMsgFolder *srcFolder,PRBool isMoveFolder, nsIMsgWindow *window, nsIMsgCopyServiceListener *listener);
|
2001-03-17 04:59:34 +03:00
|
|
|
NS_IMETHOD CopyFileMessage(nsIFileSpec *fileSpec, nsIMsgDBHdr *msgToReplace, PRBool isDraft, nsIMsgWindow *window, nsIMsgCopyServiceListener *listener);
|
1999-10-21 01:58:21 +04:00
|
|
|
NS_IMETHOD AcquireSemaphore(nsISupports *semHolder);
|
|
|
|
NS_IMETHOD ReleaseSemaphore(nsISupports *semHolder);
|
|
|
|
NS_IMETHOD TestSemaphore(nsISupports *semHolder, PRBool *_retval);
|
|
|
|
NS_IMETHOD GetLocked(PRBool *aLocked);
|
2001-07-12 17:46:46 +04:00
|
|
|
NS_IMETHOD GetNewMessages(nsIMsgWindow *window, nsIUrlListener *aListener);
|
1999-10-21 01:58:21 +04:00
|
|
|
// NS_IMETHOD WriteToFolderCache(nsIMsgFolderCache *folderCache);
|
|
|
|
// NS_IMETHOD GetCharset(PRUnichar * *aCharset);
|
|
|
|
// NS_IMETHOD SetCharset(const PRUnichar * aCharset);
|
|
|
|
NS_IMETHOD GetBiffState(PRUint32 *aBiffState);
|
|
|
|
NS_IMETHOD SetBiffState(PRUint32 aBiffState);
|
|
|
|
NS_IMETHOD GetNumNewMessages(PRInt32 *aNumNewMessages);
|
|
|
|
NS_IMETHOD SetNumNewMessages(PRInt32 aNumNewMessages);
|
|
|
|
NS_IMETHOD GetNewMessagesNotificationDescription(PRUnichar * *aNewMessagesNotificationDescription);
|
|
|
|
NS_IMETHOD GetRootFolder(nsIMsgFolder * *aRootFolder);
|
2000-02-04 02:40:09 +03:00
|
|
|
NS_IMETHOD GetMsgDatabase(nsIMsgWindow *aMsgWindow,
|
|
|
|
nsIMsgDatabase * *aMsgDatabase);
|
2000-12-22 05:05:48 +03:00
|
|
|
NS_IMETHOD GetMessageHeader(nsMsgKey msgKey, nsIMsgDBHdr **aMsgHdr);
|
2000-03-14 16:37:54 +03:00
|
|
|
NS_IMETHOD GetDBFolderInfoAndDB(nsIDBFolderInfo **folderInfo,
|
|
|
|
nsIMsgDatabase **db) = 0;
|
|
|
|
|
1999-10-21 01:58:21 +04:00
|
|
|
NS_IMETHOD GetPath(nsIFileSpec * *aPath);
|
1999-12-07 08:51:53 +03:00
|
|
|
NS_IMETHOD SetPath(nsIFileSpec * aPath);
|
2001-02-16 05:05:41 +03:00
|
|
|
NS_IMETHOD GetBaseMessageURI (char ** baseMessageURI);
|
2001-03-17 04:59:34 +03:00
|
|
|
NS_IMETHOD GetUriForMsg(nsIMsgDBHdr *msgHdr, char **aResult);
|
|
|
|
|
1999-10-21 01:58:21 +04:00
|
|
|
NS_IMETHOD MarkMessagesRead(nsISupportsArray *messages, PRBool markRead);
|
2001-03-17 04:59:34 +03:00
|
|
|
NS_IMETHOD AddMessageDispositionState(nsIMsgDBHdr *aMessage, nsMsgDispositionState aDispositionFlag);
|
1999-10-21 01:58:21 +04:00
|
|
|
NS_IMETHOD MarkAllMessagesRead(void);
|
|
|
|
NS_IMETHOD MarkMessagesFlagged(nsISupportsArray *messages, PRBool markFlagged);
|
2000-03-14 08:34:42 +03:00
|
|
|
NS_IMETHOD MarkThreadRead(nsIMsgThread *thread);
|
|
|
|
|
2001-06-14 01:33:26 +04:00
|
|
|
NS_IMETHOD GetChildWithURI(const char *uri, PRBool deep, PRBool caseInsensitive, nsIMsgFolder **_retval);
|
2000-09-01 07:26:52 +04:00
|
|
|
NS_IMETHOD EnableNotifications(PRInt32 notificationType, PRBool enable);
|
2001-08-02 07:09:33 +04:00
|
|
|
NS_IMETHOD NotifyCompactCompleted();
|
2001-09-27 06:47:03 +04:00
|
|
|
NS_IMETHOD ConfirmFolderDeletionForFilter(nsIMsgWindow *msgWindow, PRBool *confirmed);
|
|
|
|
NS_IMETHOD AlertFilterChanged(nsIMsgWindow *msgWindow);
|
2001-09-29 03:02:05 +04:00
|
|
|
NS_IMETHOD ThrowAlertMsg(const char* msgName, nsIMsgWindow *msgWindow);
|
|
|
|
NS_IMETHOD GetStringWithFolderNameFromBundle(const char* msgName, PRUnichar **aResult);
|
1999-10-21 01:58:21 +04:00
|
|
|
|
|
|
|
// end NS_DECL_NSIMSGFOLDER
|
|
|
|
|
|
|
|
// nsRDFResource overrides
|
|
|
|
NS_IMETHOD Init(const char* aURI);
|
1999-08-21 02:41:38 +04:00
|
|
|
|
1999-03-20 01:55:08 +03:00
|
|
|
// Gets the URL that represents the given message. Returns a newly
|
|
|
|
// created string that must be free'd using XP_FREE().
|
|
|
|
// If the db is NULL, then returns a URL that represents the entire
|
|
|
|
// folder as a whole.
|
|
|
|
// These functions are used for tricking the front end into thinking that we have more
|
|
|
|
// messages than are really in the DB. This is usually after and IMAP message copy where
|
|
|
|
// we don't want to do an expensive select until the user actually opens that folder
|
|
|
|
// These functions are called when MSG_Master::GetFolderLineById is populating a MSG_FolderLine
|
|
|
|
// struct used by the FE
|
1999-11-01 04:06:29 +03:00
|
|
|
PRInt32 GetNumPendingUnread();
|
|
|
|
PRInt32 GetNumPendingTotalMessages();
|
1999-03-20 01:55:08 +03:00
|
|
|
|
1999-11-01 04:06:29 +03:00
|
|
|
void ChangeNumPendingUnread(PRInt32 delta);
|
|
|
|
void ChangeNumPendingTotalMessages(PRInt32 delta);
|
1999-03-20 01:55:08 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1999-10-21 01:58:21 +04:00
|
|
|
#ifdef HAVE_ADMINURL
|
|
|
|
NS_IMETHOD GetAdminUrl(MWContext *context, MSG_AdminURLType type);
|
|
|
|
NS_IMETHOD HaveAdminUrl(MSG_AdminURLType type, PRBool *hadAdminUrl);
|
|
|
|
#endif
|
|
|
|
|
1999-03-20 01:55:08 +03:00
|
|
|
|
|
|
|
#ifdef HAVE_NET
|
|
|
|
NS_IMETHOD EscapeMessageId(const char *messageId, const char **escapeMessageID);
|
1999-10-21 01:58:21 +04:00
|
|
|
NS_IMETHOD ShouldPerformOperationOffline(PRBool *performOffline);
|
1999-03-20 01:55:08 +03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef DOES_FOLDEROPERATIONS
|
|
|
|
int DownloadToTempFileAndUpload(MessageCopyInfo *copyInfo, nsMsgKeyArray &keysToSave, MSG_FolderInfo *dstFolder, nsMsgDatabase *sourceDB);
|
|
|
|
void UpdateMoveCopyStatus(MWContext *context, PRBool isMove, int32 curMsgCount, int32 totMessages);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
1999-07-27 09:15:44 +04:00
|
|
|
NS_IMETHOD MatchName(nsString *name, PRBool *matches);
|
1999-07-23 08:33:20 +04:00
|
|
|
|
2001-05-01 07:17:47 +04:00
|
|
|
NS_IMETHOD GenerateMessageURI(nsMsgKey msgKey, char **aURI);
|
2001-08-23 05:10:05 +04:00
|
|
|
NS_IMETHOD GetSortOrder(PRInt32 *order);
|
|
|
|
NS_IMETHOD SetSortOrder(PRInt32 order);
|
2001-05-01 07:17:47 +04:00
|
|
|
|
1999-07-23 08:33:20 +04:00
|
|
|
|
1999-04-21 02:24:21 +04:00
|
|
|
protected:
|
2000-01-14 12:01:39 +03:00
|
|
|
|
1999-05-16 01:03:02 +04:00
|
|
|
// this is a little helper function that is not part of the public interface.
|
|
|
|
// we use it to get the IID of the incoming server for the derived folder.
|
|
|
|
// w/out a function like this we would have to implement GetServer in each
|
|
|
|
// derived folder class.
|
1999-06-22 07:03:48 +04:00
|
|
|
virtual const char* GetIncomingServerType() = 0;
|
1999-05-08 00:21:47 +04:00
|
|
|
|
2000-02-16 03:39:23 +03:00
|
|
|
virtual nsresult CreateBaseMessageURI(const char *aURI);
|
|
|
|
|
|
|
|
|
1999-12-04 06:00:22 +03:00
|
|
|
// helper routine to parse the URI and update member variables
|
|
|
|
nsresult parseURI(PRBool needServer=PR_FALSE);
|
2001-09-27 06:47:03 +04:00
|
|
|
nsresult GetBaseStringBundle(nsIStringBundle **aBundle);
|
|
|
|
nsresult GetStringFromBundle(const char* msgName, PRUnichar **aResult);
|
|
|
|
nsresult ThrowConfirmationPrompt(nsIMsgWindow *msgWindow, const PRUnichar *confirmString, PRBool *confirmed);
|
|
|
|
nsresult GetWarnFilterChanged(PRBool *aVal);
|
|
|
|
nsresult SetWarnFilterChanged(PRBool aVal);
|
1999-03-20 01:55:08 +03:00
|
|
|
protected:
|
|
|
|
PRUint32 mFlags;
|
2000-01-27 01:53:55 +03:00
|
|
|
nsWeakPtr mParent; //This won't be refcounted for ownership reasons.
|
1999-03-20 01:55:08 +03:00
|
|
|
PRInt32 mNumUnreadMessages; /* count of unread messages (-1 means
|
|
|
|
unknown; -2 means unknown but we already
|
|
|
|
tried to find out.) */
|
|
|
|
PRInt32 mNumTotalMessages; /* count of existing messages. */
|
2000-09-01 07:26:52 +04:00
|
|
|
PRBool mNotifyCountChanges;
|
2000-05-15 18:55:22 +04:00
|
|
|
PRUint32 mExpungedBytes;
|
1999-05-05 02:34:35 +04:00
|
|
|
nsCOMPtr<nsISupportsArray> mSubFolders;
|
1999-05-16 01:03:02 +04:00
|
|
|
nsVoidArray *mListeners; //This can't be an nsISupportsArray because due to
|
1999-05-05 02:34:35 +04:00
|
|
|
//ownership issues, listeners can't be AddRef'd
|
1999-03-20 01:55:08 +03:00
|
|
|
|
2000-03-15 09:26:31 +03:00
|
|
|
PRBool mInitializedFromCache;
|
1999-03-24 02:19:58 +03:00
|
|
|
nsISupports *mSemaphoreHolder; // set when the folder is being written to
|
1999-05-08 00:21:47 +04:00
|
|
|
//Due to ownership issues, this won't be AddRef'd.
|
1999-03-20 01:55:08 +03:00
|
|
|
|
2000-01-27 01:53:55 +03:00
|
|
|
nsWeakPtr mServer;
|
1999-05-16 01:03:02 +04:00
|
|
|
|
1999-03-20 01:55:08 +03:00
|
|
|
// These values are used for tricking the front end into thinking that we have more
|
|
|
|
// messages than are really in the DB. This is usually after and IMAP message copy where
|
|
|
|
// we don't want to do an expensive select until the user actually opens that folder
|
1999-03-24 03:17:23 +03:00
|
|
|
PRInt32 mNumPendingUnreadMessages;
|
|
|
|
PRInt32 mNumPendingTotalMessages;
|
1999-03-20 01:55:08 +03:00
|
|
|
|
1999-06-12 02:10:42 +04:00
|
|
|
PRUint32 mBiffState;
|
|
|
|
PRInt32 mNumNewBiffMessages;
|
|
|
|
|
1999-05-16 01:03:02 +04:00
|
|
|
PRBool mIsCachable;
|
1999-10-22 05:02:08 +04:00
|
|
|
//
|
|
|
|
// stuff from the uri
|
|
|
|
//
|
2000-01-26 04:21:24 +03:00
|
|
|
PRBool mHaveParsedURI; // is the URI completely parsed?
|
1999-12-04 06:00:22 +03:00
|
|
|
PRBool mIsServerIsValid;
|
1999-08-21 02:41:38 +04:00
|
|
|
PRBool mIsServer;
|
1999-10-22 05:02:08 +04:00
|
|
|
nsString mName;
|
1999-12-18 04:09:51 +03:00
|
|
|
nsCOMPtr<nsIFileSpec> mPath;
|
2000-03-24 17:58:32 +03:00
|
|
|
PRBool mDeleteIsMoveToTrash;
|
2000-03-28 08:58:05 +04:00
|
|
|
char * mBaseMessageURI; //The uri with the message scheme
|
2000-01-14 12:01:39 +03:00
|
|
|
|
|
|
|
// static stuff for cross-instance objects like atoms
|
2000-05-25 07:49:10 +04:00
|
|
|
static nsrefcnt gInstanceCount;
|
2000-01-14 12:01:39 +03:00
|
|
|
|
2000-05-25 07:49:10 +04:00
|
|
|
static nsresult initializeStrings();
|
|
|
|
|
|
|
|
static PRUnichar *kInboxName;
|
|
|
|
static PRUnichar *kTrashName;
|
|
|
|
static PRUnichar *kSentName;
|
|
|
|
static PRUnichar *kDraftsName;
|
|
|
|
static PRUnichar *kTemplatesName;
|
2000-05-25 08:53:24 +04:00
|
|
|
static PRUnichar *kUnsentName;
|
2000-05-25 07:49:10 +04:00
|
|
|
|
2000-01-26 04:21:24 +03:00
|
|
|
static nsIAtom* kTotalUnreadMessagesAtom;
|
2000-01-14 12:01:39 +03:00
|
|
|
static nsIAtom* kBiffStateAtom;
|
2000-06-23 07:19:17 +04:00
|
|
|
static nsIAtom* kNewMessagesAtom;
|
2000-01-14 12:01:39 +03:00
|
|
|
static nsIAtom* kNumNewBiffMessagesAtom;
|
|
|
|
static nsIAtom* kTotalMessagesAtom;
|
|
|
|
static nsIAtom* kStatusAtom;
|
|
|
|
static nsIAtom* kFlaggedAtom;
|
2000-01-26 04:21:24 +03:00
|
|
|
static nsIAtom* kNameAtom;
|
2001-08-15 09:07:48 +04:00
|
|
|
static nsIAtom* kSynchronizeAtom;
|
2001-08-21 10:18:58 +04:00
|
|
|
static nsIAtom* kOpenAtom;
|
2000-01-26 04:21:24 +03:00
|
|
|
|
2000-05-25 07:49:10 +04:00
|
|
|
#ifdef MSG_FASTER_URI_PARSING
|
|
|
|
// cached parsing URL object
|
|
|
|
static nsCOMPtr<nsIURL> mParsingURL;
|
|
|
|
static PRBool mParsingURLInUse;
|
|
|
|
#endif
|
|
|
|
|
1999-03-20 01:55:08 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|