clean up nsIMsgFolder API in preparation for fixing a number of bugs, most importantly #14437

r=scottip
This commit is contained in:
alecf%netscape.com 1999-10-20 21:58:21 +00:00
Родитель 256e94b850
Коммит 0881139c13
13 изменённых файлов: 238 добавлений и 264 удалений

Просмотреть файл

@ -49,17 +49,22 @@ interface nsIMsgFolder : nsIFolder {
void AddUnique(in nsISupports element);
void ReplaceElement(in nsISupports element, in nsISupports newElement);
nsISimpleEnumerator GetMessages();
nsISimpleEnumerator GetThreads();
void StartFolderLoading();
void EndFolderLoading();
nsISimpleEnumerator getMessages();
nsISimpleEnumerator getThreads();
void startFolderLoading();
void endFolderLoading();
/* get new headers for db */
void UpdateFolder();
nsIMsgThread GetThreadForMessage(in nsIMessage message);
boolean HasMessage(in nsIMessage message);
nsIEnumerator GetVisibleSubFolders();
void updateFolder();
nsIMsgThread getThreadForMessage(in nsIMessage message);
boolean hasMessage(in nsIMessage message);
nsIEnumerator getVisibleSubFolders();
readonly attribute wstring prettiestName;
string BuildFolderURL();
readonly attribute string folderURL;
readonly attribute boolean deleteIsMoveToTrash;
readonly attribute boolean showDeletedMessages;
@ -70,27 +75,28 @@ interface nsIMsgFolder : nsIFolder {
void OnCloseFolder ();
void Delete ();
void DeleteSubFolders(in nsISupportsArray folders);
void PropagateDelete(in nsIMsgFolder folder, in boolean deleteStorage);
void RecursiveDelete(in boolean deleteStorage);
void deleteSubFolders(in nsISupportsArray folders);
void propagateDelete(in nsIMsgFolder folder, in boolean deleteStorage);
void recursiveDelete(in boolean deleteStorage);
void CreateSubfolder(in string folderName);
void createSubfolder(in string folderName);
void Compact();
void EmptyTrash();
void compact();
void emptyTrash();
void Rename(in string name);
void Adopt(in nsIMsgFolder srcFolder, out unsigned long outPos);
void rename(in string name);
void adopt(in nsIMsgFolder srcFolder, out unsigned long outPos);
boolean ContainsChildNamed(in string name);
boolean IsAncestorOf(in nsIMsgFolder folder);
boolean containsChildNamed(in string name);
boolean isAncestorOf(in nsIMsgFolder folder);
string GenerateUniqueSubfolderName(in string prefix, in nsIMsgFolder otherFolder);
string generateUniqueSubfolderName(in string prefix,
in nsIMsgFolder otherFolder);
void UpdateSummaryTotals(in boolean force);
void SummaryChanged();
long GetNumUnread(in boolean deep);
long GetTotalMessages(in boolean deep);
void updateSummaryTotals(in boolean force);
void summaryChanged();
long getNumUnread(in boolean deep);
long getTotalMessages(in boolean deep);
readonly attribute unsigned long expungedBytesCount;
readonly attribute boolean deletable;
@ -98,73 +104,74 @@ interface nsIMsgFolder : nsIFolder {
readonly attribute boolean canBeRenamed;
readonly attribute boolean requiresCleanup;
void ClearRequiresCleanup();
void clearRequiresCleanup();
boolean ManyHeadersToDownload();
boolean manyHeadersToDownload();
readonly attribute boolean knowsSearchNntpExtension;
readonly attribute boolean allowsPosting;
boolean DisplayRecipients();
readonly attribute boolean displayRecipients;
readonly attribute string relativePathName;
readonly attribute unsigned long sizeOnDisk;
void RememberPassword(in string password);
string GetRememberedPassword();
boolean UserNeedsToAuthenticateForFolder(in boolean displayOnly);
string GetUsername();
string GetHostname();
void rememberPassword(in string password);
readonly attribute string rememberedPassword;
boolean userNeedsToAuthenticateForFolder(in boolean displayOnly);
readonly attribute string username;
readonly attribute string hostname;
void SetFlag(in unsigned long flag);
void ClearFlag(in unsigned long flag);
boolean GetFlag(in unsigned long flag);
void setFlag(in unsigned long flag);
void clearFlag(in unsigned long flag);
boolean getFlag(in unsigned long flag);
void ToggleFlag (in unsigned long flag);
void OnFlagChange (in unsigned long flag);
unsigned long GetFlags();
void toggleFlag (in unsigned long flag);
void onFlagChange (in unsigned long flag);
readonly attribute unsigned long flags;
void GetFoldersWithFlag(in unsigned long flags, out nsIMsgFolder result,
void getFoldersWithFlag(in unsigned long flags, out nsIMsgFolder result,
in unsigned long resultsize, out unsigned long numFolders);
void GetExpansionArray(in nsISupportsArray expansionArray);
void getExpansionArray(in nsISupportsArray expansionArray);
void DeleteMessages(in nsISupportsArray message, in nsITransactionManager
txnMgr,in boolean deleteStorage);
void deleteMessages(in nsISupportsArray message,
in nsITransactionManager txnMgr,
in boolean deleteStorage);
void CopyMessages(in nsIMsgFolder srcFolder, in nsISupportsArray messages,
void copyMessages(in nsIMsgFolder srcFolder, in nsISupportsArray messages,
in boolean isMove, in nsITransactionManager txnMgr,
in nsIMsgCopyServiceListener listener);
void CopyFileMessage(in nsIFileSpec fileSpec, in nsIMessage msgToReplace,
void copyFileMessage(in nsIFileSpec fileSpec, in nsIMessage msgToReplace,
in boolean isDraft, in nsITransactionManager txnMgr,
in nsIMsgCopyServiceListener listener);
void AcquireSemaphore (in nsISupports semHolder);
void ReleaseSemaphore (in nsISupports semHolder);
boolean TestSemaphore (in nsISupports semHolder);
boolean IsLocked();
void acquireSemaphore (in nsISupports semHolder);
void releaseSemaphore (in nsISupports semHolder);
boolean testSemaphore (in nsISupports semHolder);
readonly attribute boolean locked;
nsIMessage CreateMessageFromMsgDBHdr(in nsIMsgDBHdr msgDBHdr);
void GetNewMessages();
nsIMessage createMessageFromMsgDBHdr(in nsIMsgDBHdr msgDBHdr);
void getNewMessages();
void WriteToFolderCache(in nsIMsgFolderCache folderCache);
void writeToFolderCache(in nsIMsgFolderCache folderCache);
attribute wstring charset;
attribute unsigned long BiffState;
attribute long NumNewMessages;
attribute unsigned long biffState;
attribute long numNewMessages;
readonly attribute wstring NewMessagesNotificationDescription;
readonly attribute nsIMsgFolder RootFolder;
readonly attribute wstring newMessagesNotificationDescription;
readonly attribute nsIMsgFolder rootFolder;
readonly attribute nsIMsgDatabase msgDatabase;
readonly attribute nsIFileSpec Path;
readonly attribute nsIFileSpec path;
void MarkMessagesRead(in nsISupportsArray messages, in boolean markRead);
void MarkAllMessagesRead();
void MarkMessagesFlagged(in nsISupportsArray messages, in boolean markFlagged);
void markMessagesRead(in nsISupportsArray messages, in boolean markRead);
void markAllMessagesRead();
void markMessagesFlagged(in nsISupportsArray messages, in boolean markFlagged);
nsIMsgFolder GetChildWithURI(in string uri, in boolean deep);
nsIMsgFolder getChildWithURI(in string uri, in boolean deep);
};

Просмотреть файл

@ -207,13 +207,13 @@ function ChangeFolderByURI(uri)
gBeforeFolderLoadTime = new Date();
if(msgfolder.ManyHeadersToDownload())
if(msgfolder.manyHeadersToDownload())
{
try
{
gCurrentLoadingFolderURI = uri;
msgfolder.StartFolderLoading();
msgfolder.UpdateFolder();
msgfolder.startFolderLoading();
msgfolder.updateFolder();
}
catch(ex)
{

Просмотреть файл

@ -76,7 +76,7 @@ var folderListener = {
gCurrentLoadingFolderURI="";
var msgFolder = folder.QueryInterface(Components.interfaces.nsIMsgFolder);
if(msgFolder)
msgFolder.EndFolderLoading();
msgFolder.endFolderLoading();
RerootFolder(uri);
}
}

Просмотреть файл

@ -34,7 +34,9 @@ class nsIMsgFolderCacheElement;
* class derived from nsMsgFolder for those folders that use an nsIMsgDatabase
*/
class NS_MSG_BASE nsMsgDBFolder: public nsMsgFolder, public nsIDBChangeListener, public nsIUrlListener
class NS_MSG_BASE nsMsgDBFolder: public nsMsgFolder,
public nsIDBChangeListener,
public nsIUrlListener
{
public:
nsMsgDBFolder(void);

Просмотреть файл

@ -139,6 +139,55 @@ nsMsgFolder::Init(const char* aURI)
return nsRDFResource::Init(aURI);
}
// nsICollection methods:
NS_IMETHODIMP
nsMsgFolder::Count(PRUint32 *result) {
return mSubFolders->Count(result);
}
NS_IMETHODIMP
nsMsgFolder::GetElementAt(PRUint32 i, nsISupports* *result) {
return mSubFolders->GetElementAt(i, result);
}
NS_IMETHODIMP
nsMsgFolder::QueryElementAt(PRUint32 i, const nsIID & iid, void * *result) {
return mSubFolders->QueryElementAt(i, iid, result);
}
NS_IMETHODIMP
nsMsgFolder::SetElementAt(PRUint32 i, nsISupports* value) {
return mSubFolders->SetElementAt(i, value);
}
NS_IMETHODIMP
nsMsgFolder::AppendElement(nsISupports *aElement) {
return mSubFolders->AppendElement(aElement);
}
NS_IMETHODIMP
nsMsgFolder::RemoveElement(nsISupports *aElement) {
return mSubFolders->RemoveElement(aElement);
}
NS_IMETHODIMP
nsMsgFolder::Enumerate(nsIEnumerator* *result) {
// nsMsgFolders only have subfolders, no message elements
return mSubFolders->Enumerate(result);
}
NS_IMETHODIMP
nsMsgFolder::Clear(void) {
return mSubFolders->Clear();
}
NS_IMETHODIMP
nsMsgFolder::GetURI(char* *name) {
return nsRDFResource::GetValue(name);
}
////////////////////////////////////////////////////////////////////////////////
typedef PRBool
@ -314,7 +363,7 @@ nsMsgFolder::HasMessage(nsIMessage *message, PRBool *hasMessage)
////////////////////////////////////////////////////////////////////////////////
NS_IMETHODIMP nsMsgFolder::BuildFolderURL(char **url)
NS_IMETHODIMP nsMsgFolder::GetFolderURL(char **url)
{
if(*url)
{
@ -1190,7 +1239,7 @@ NS_IMETHODIMP nsMsgFolder::GetAllowsPosting(PRBool *allowsPosting)
return NS_OK;
}
NS_IMETHODIMP nsMsgFolder::DisplayRecipients(PRBool *displayRecipients)
NS_IMETHODIMP nsMsgFolder::GetDisplayRecipients(PRBool *displayRecipients)
{
nsresult rv;
@ -1261,7 +1310,7 @@ NS_IMETHODIMP nsMsgFolder::TestSemaphore(nsISupports *semHolder, PRBool *result)
return NS_OK;
}
NS_IMETHODIMP nsMsgFolder::IsLocked(PRBool *isLocked)
NS_IMETHODIMP nsMsgFolder::GetLocked(PRBool *isLocked)
{
*isLocked = mSemaphoreHolder != NULL;
return NS_OK;

Просмотреть файл

@ -45,70 +45,104 @@ public:
NS_DECL_ISUPPORTS_INHERITED
// nsIRDFResource
NS_IMETHOD Init(const char *aURI);
NS_DECL_NSICOLLECTION
NS_DECL_NSIFOLDER
// eventually this will be an instantiable class, and we should
// use this macro:
// NS_DECL_NSIMSGFOLDER
// nsICollection methods:
NS_IMETHOD Count(PRUint32 *result) {
return mSubFolders->Count(result);
}
NS_IMETHOD GetElementAt(PRUint32 i, nsISupports* *result) {
return mSubFolders->GetElementAt(i, result);
}
NS_IMETHOD QueryElementAt(PRUint32 i, const nsIID & iid, void * *result) {
return mSubFolders->QueryElementAt(i, iid, result);
}
NS_IMETHOD SetElementAt(PRUint32 i, nsISupports* value) {
return mSubFolders->SetElementAt(i, value);
}
NS_IMETHOD AppendElement(nsISupports *aElement) {
return mSubFolders->AppendElement(aElement);
}
NS_IMETHOD RemoveElement(nsISupports *aElement) {
return mSubFolders->RemoveElement(aElement);
}
NS_IMETHOD Enumerate(nsIEnumerator* *result) {
// nsMsgFolders only have subfolders, no message elements
return mSubFolders->Enumerate(result);
}
NS_IMETHOD Clear(void) {
return mSubFolders->Clear();
}
// 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);
NS_IMETHOD GetMessages(nsISimpleEnumerator **_retval);
NS_IMETHOD GetThreads(nsISimpleEnumerator **_retval);
NS_IMETHOD StartFolderLoading(void);
NS_IMETHOD EndFolderLoading(void);
NS_IMETHOD UpdateFolder(void);
NS_IMETHOD GetThreadForMessage(nsIMessage *message, nsIMsgThread **_retval);
NS_IMETHOD HasMessage(nsIMessage *message, PRBool *_retval);
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);
NS_IMETHOD OnCloseFolder(void);
NS_IMETHOD Delete(void);
NS_IMETHOD DeleteSubFolders(nsISupportsArray *folders);
NS_IMETHOD PropagateDelete(nsIMsgFolder *folder, PRBool deleteStorage);
NS_IMETHOD RecursiveDelete(PRBool deleteStorage);
NS_IMETHOD CreateSubfolder(const char *folderName);
NS_IMETHOD Compact(void);
NS_IMETHOD EmptyTrash(void);
NS_IMETHOD Rename(const char *name);
NS_IMETHOD Adopt(nsIMsgFolder *srcFolder, PRUint32 *outPos);
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);
NS_IMETHOD GetExpungedBytesCount(PRUint32 *aExpungedBytesCount);
NS_IMETHOD GetDeletable(PRBool *aDeletable);
NS_IMETHOD GetCanCreateChildren(PRBool *aCanCreateChildren);
NS_IMETHOD GetCanBeRenamed(PRBool *aCanBeRenamed);
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);
NS_IMETHOD GetRelativePathName(char * *aRelativePathName);
NS_IMETHOD GetSizeOnDisk(PRUint32 *aSizeOnDisk);
NS_IMETHOD RememberPassword(const char *password);
NS_IMETHOD GetRememberedPassword(char * *aRememberedPassword);
NS_IMETHOD UserNeedsToAuthenticateForFolder(PRBool displayOnly, PRBool *_retval);
// NS_IMETHOD GetUsername(char * *aUsername);
// NS_IMETHOD GetHostname(char * *aHostname);
NS_IMETHOD SetFlag(PRUint32 flag);
NS_IMETHOD ClearFlag(PRUint32 flag);
NS_IMETHOD GetFlag(PRUint32 flag, PRBool *_retval);
NS_IMETHOD ToggleFlag(PRUint32 flag);
NS_IMETHOD OnFlagChange(PRUint32 flag);
NS_IMETHOD GetFlags(PRUint32 *aFlags);
NS_IMETHOD GetFoldersWithFlag(PRUint32 flags, nsIMsgFolder **result, PRUint32 resultsize, PRUint32 *numFolders);
NS_IMETHOD GetExpansionArray(nsISupportsArray *expansionArray);
// NS_IMETHOD DeleteMessages(nsISupportsArray *message, nsITransactionManager *txnMgr, PRBool deleteStorage);
NS_IMETHOD CopyMessages(nsIMsgFolder *srcFolder, nsISupportsArray *messages, PRBool isMove, nsITransactionManager *txnMgr, nsIMsgCopyServiceListener *listener);
NS_IMETHOD CopyFileMessage(nsIFileSpec *fileSpec, nsIMessage *msgToReplace, PRBool isDraft, nsITransactionManager *txnMgr, nsIMsgCopyServiceListener *listener);
NS_IMETHOD AcquireSemaphore(nsISupports *semHolder);
NS_IMETHOD ReleaseSemaphore(nsISupports *semHolder);
NS_IMETHOD TestSemaphore(nsISupports *semHolder, PRBool *_retval);
NS_IMETHOD GetLocked(PRBool *aLocked);
// NS_IMETHOD CreateMessageFromMsgDBHdr(nsIMsgDBHdr *msgDBHdr, nsIMessage **_retval);
NS_IMETHOD GetNewMessages(void);
// 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);
NS_IMETHOD GetMsgDatabase(nsIMsgDatabase * *aMsgDatabase);
NS_IMETHOD GetPath(nsIFileSpec * *aPath);
NS_IMETHOD MarkMessagesRead(nsISupportsArray *messages, PRBool markRead);
NS_IMETHOD MarkAllMessagesRead(void);
NS_IMETHOD MarkMessagesFlagged(nsISupportsArray *messages, PRBool markFlagged);
NS_IMETHOD GetChildWithURI(const char *uri, PRBool deep, nsIMsgFolder **_retval);
// nsIFolder methods:
NS_IMETHOD GetURI(char* *name) { return nsRDFResource::GetValue(name); }
NS_IMETHOD GetName(PRUnichar **name);
NS_IMETHOD SetName(const PRUnichar *name);
NS_IMETHOD GetChildNamed(const char *name, nsISupports* *result);
NS_IMETHOD GetSubFolders(nsIEnumerator* *result);
NS_IMETHOD GetHasSubFolders(PRBool *_retval);
NS_IMETHOD AddFolderListener(nsIFolderListener * listener);
NS_IMETHOD RemoveFolderListener(nsIFolderListener * listener);
NS_IMETHOD GetParent(nsIFolder * *aParent);
NS_IMETHOD SetParent(nsIFolder * aParent);
NS_IMETHOD FindSubFolder(const char *subFolderName, nsIFolder **folder);
// nsIMsgFolder methods:
NS_IMETHOD AddUnique(nsISupports* element);
NS_IMETHOD ReplaceElement(nsISupports* element, nsISupports* newElement);
NS_IMETHOD GetVisibleSubFolders(nsIEnumerator* *result);
NS_IMETHOD GetMessages(nsISimpleEnumerator* *result);
NS_IMETHOD StartFolderLoading(void);
NS_IMETHOD EndFolderLoading(void);
NS_IMETHOD UpdateFolder();
NS_IMETHOD GetThreads(nsISimpleEnumerator ** threadEnumerator);
NS_IMETHOD GetThreadForMessage(nsIMessage *message, nsIMsgThread **thread);
NS_IMETHOD HasMessage(nsIMessage *message, PRBool *hasMessage);
NS_IMETHOD GetServer(nsIMsgIncomingServer ** aServer);
NS_IMETHOD GetIsServer(PRBool *aResult);
NS_IMETHOD GetPrettyName(PRUnichar ** name);
NS_IMETHOD SetPrettyName(const PRUnichar * name);
// end NS_DECL_NSIMSGFOLDER
// nsRDFResource overrides
NS_IMETHOD Init(const char* aURI);
#if 0
static nsresult GetRoot(nsIMsgFolder* *result);
#endif
@ -118,58 +152,10 @@ public:
// folder as a whole.
#ifdef HAVE_DB
NS_IMETHOD BuildUrl(nsMsgDatabase *db, nsMsgKey key, char ** url);
#endif
NS_IMETHOD BuildFolderURL(char ** url);
NS_IMETHOD GetPrettiestName(PRUnichar ** name);
#ifdef HAVE_ADMINURL
NS_IMETHOD GetAdminUrl(MWContext *context, MSG_AdminURLType type);
NS_IMETHOD HaveAdminUrl(MSG_AdminURLType type, PRBool *hadAdminUrl);
#endif
NS_IMETHOD GetDeleteIsMoveToTrash(PRBool *aIsDeleteIsMoveToTrash);
NS_IMETHOD GetShowDeletedMessages(PRBool *aIsShowDeletedMessages);
NS_IMETHOD OnCloseFolder();
NS_IMETHOD Delete();
NS_IMETHOD DeleteSubFolders(nsISupportsArray *folders);
NS_IMETHOD PropagateDelete(nsIMsgFolder *folder, PRBool deleteStorage);
NS_IMETHOD RecursiveDelete(PRBool deleteStorage); // called by PropagateDelete
NS_IMETHOD CreateSubfolder(const char *folderName);
NS_IMETHOD Compact();
NS_IMETHOD EmptyTrash();
NS_IMETHOD Rename(const char *name);
NS_IMETHOD Adopt(nsIMsgFolder *srcFolder, PRUint32*);
NS_IMETHOD ContainsChildNamed(const char *name, PRBool *containsChild);
NS_IMETHOD IsAncestorOf(nsIMsgFolder * folder, PRBool *isParent);
NS_IMETHOD GenerateUniqueSubfolderName(const char *prefix, nsIMsgFolder *otherFolder,
char **name);
// updates num messages and num unread - should be pure virtual
// when I get around to implementing in all subclasses?
NS_IMETHOD UpdateSummaryTotals(PRBool force);
NS_IMETHOD SummaryChanged();
NS_IMETHOD GetNumUnread(PRBool deep, PRInt32 *numUnread); // How many unread messages in this folder.
NS_IMETHOD GetTotalMessages(PRBool deep, PRInt32 *totalMessages); // Total number of messages in this folder.
#ifdef HAVE_DB
NS_IMETHOD GetTotalMessagesInDB(PRUint32 *totalMessages) const; // How many messages in database.
#endif
#ifdef HAVE_PANE
NS_IMETHOD MarkAllRead(MSG_Pane *pane, PRBool deep);
#endif
#ifdef HAVE_DB
// 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
@ -190,50 +176,23 @@ public:
NS_IMETHOD GetLastMessageLoaded();
#endif
NS_IMETHOD SetFlag(PRUint32 which);
NS_IMETHOD ClearFlag(PRUint32 which);
NS_IMETHOD GetFlag(PRUint32 flag, PRBool *_retval);
NS_IMETHOD ToggleFlag(PRUint32 which);
NS_IMETHOD OnFlagChange(PRUint32 which);
NS_IMETHOD GetFlags(PRUint32 *flags);
#ifdef HAVE_ADMINURL
NS_IMETHOD GetAdminUrl(MWContext *context, MSG_AdminURLType type);
NS_IMETHOD HaveAdminUrl(MSG_AdminURLType type, PRBool *hadAdminUrl);
#endif
#ifdef HAVE_PANE
NS_IMETHOD MarkAllRead(MSG_Pane *pane, PRBool deep);
NS_IMETHOD SetFlagInAllFolderPanes(PRUint32 which);
#endif
NS_IMETHOD GetFoldersWithFlag(PRUint32 flags, nsIMsgFolder** result,
PRUint32 resultsize, PRUint32 *numFolders);
NS_IMETHOD GetExpansionArray(nsISupportsArray *expansionArray);
#ifdef HAVE_NET
NS_IMETHOD EscapeMessageId(const char *messageId, const char **escapeMessageID);
NS_IMETHOD ShouldPerformOperationOffline(PRBool *performOffline);
#endif
NS_IMETHOD GetExpungedBytesCount(PRUint32 *count);
NS_IMETHOD GetDeletable(PRBool *deletable);
NS_IMETHOD GetCanCreateChildren(PRBool *canCreateChildren);
NS_IMETHOD GetCanBeRenamed(PRBool *canBeRenamed);
NS_IMETHOD GetRequiresCleanup(PRBool *requiredCleanup);
NS_IMETHOD ClearRequiresCleanup() ;
NS_IMETHOD ManyHeadersToDownload(PRBool *_retval);
NS_IMETHOD GetKnowsSearchNntpExtension(PRBool *knowsExtension);
NS_IMETHOD GetAllowsPosting(PRBool *allowsPosting);
NS_IMETHOD DisplayRecipients(PRBool *displayRecipients);
//For file contention
NS_IMETHOD AcquireSemaphore (nsISupports *semHolder);
NS_IMETHOD ReleaseSemaphore (nsISupports *semHolder);
NS_IMETHOD TestSemaphore (nsISupports *semHolder, PRBool *isSemaphoreHolder);
NS_IMETHOD IsLocked(PRBool *isLocked);
NS_IMETHOD CreateMessageFromMsgDBHdr(nsIMsgDBHdr *msgDBHdr, nsIMessage **message) = 0;
#ifdef HAVE_CACHE
virtual nsresult WriteToCache(XP_File);
virtual nsresult ReadFromCache(char *);
@ -241,66 +200,26 @@ public:
void SkipCacheTokens(char **ppBuf, int numTokens);
#endif
NS_IMETHOD GetRelativePathName(char **pathName);
NS_IMETHOD GetSizeOnDisk(PRUint32 *size);
#ifdef HAVE_NET
NS_IMETHOD ShouldPerformOperationOffline(PRBool *performOffline);
#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
NS_IMETHOD RememberPassword(const char *password);
NS_IMETHOD GetRememberedPassword(char ** password);
NS_IMETHOD UserNeedsToAuthenticateForFolder(PRBool displayOnly, PRBool *needsAuthenticate);
#if 0
NS_IMETHOD GetUsername(char **userName);
NS_IMETHOD GetHostname(char **hostName);
#endif
virtual nsresult GetDBFolderInfoAndDB(nsIDBFolderInfo **folderInfo, nsIMsgDatabase **db) = 0;
NS_IMETHOD DeleteMessages(nsISupportsArray *messages,
nsITransactionManager *txnMgr, PRBool
deleteStorage) = 0;
NS_IMETHOD CopyMessages(nsIMsgFolder* srcFolder,
nsISupportsArray *messages,
PRBool isMove,
nsITransactionManager* txnMgr,
nsIMsgCopyServiceListener* listener);
NS_IMETHOD CopyFileMessage(nsIFileSpec* fileSpec,
nsIMessage* messageToReplace,
PRBool isDraftOrTemplate,
nsITransactionManager* txnMgr,
nsIMsgCopyServiceListener* listener);
NS_IMETHOD GetNewMessages();
NS_IMETHOD GetCharset(PRUnichar * *aCharset) = 0;
NS_IMETHOD SetCharset(const PRUnichar * aCharset) = 0;
NS_IMETHOD GetBiffState(PRUint32 *aBiffState);
NS_IMETHOD SetBiffState(PRUint32 aBiffState);
NS_IMETHOD GetNumNewMessages(PRInt32 *aNumNewMessages);
NS_IMETHOD SetNumNewMessages(PRInt32 aNumNewMessages);
NS_IMETHOD GetNewMessagesNotificationDescription(PRUnichar * *adescription);
NS_IMETHOD GetRootFolder(nsIMsgFolder * *aRootFolder);
NS_IMETHOD GetMsgDatabase(nsIMsgDatabase** aMsgDatabase);
NS_IMETHOD GetPath(nsIFileSpec * *aPath);
NS_IMETHOD MatchName(nsString *name, PRBool *matches);
NS_IMETHOD MarkMessagesRead(nsISupportsArray *messages, PRBool markRead);
NS_IMETHOD MarkAllMessagesRead(void);
NS_IMETHOD MarkMessagesFlagged(nsISupportsArray *messages, PRBool markRead);
NS_IMETHOD GetChildWithURI(const char *uri, PRBool deep, nsIMsgFolder ** folder);
protected:
nsresult NotifyPropertyChanged(char *property, char* oldValue, char* newValue);

Просмотреть файл

@ -26,9 +26,6 @@
#include "nsEscape.h"
#include "nsCRT.h"
/* for the XP_TO_UPPER stuff */
#include "net.h"
// mscott: this is lame...I know....
#define MK_OUT_OF_MEMORY 1

Просмотреть файл

@ -707,7 +707,7 @@ NS_IMETHODIMP nsImapMailFolder::GetPrettyName(PRUnichar ** prettyName)
return GetName(prettyName);
}
NS_IMETHODIMP nsImapMailFolder::BuildFolderURL(char **url)
NS_IMETHODIMP nsImapMailFolder::GetFolderURL(char **url)
{
nsresult rv = NS_ERROR_FAILURE;
return rv;

Просмотреть файл

@ -117,7 +117,7 @@ public:
NS_IMETHOD GetPrettyName(PRUnichar ** prettyName); // Override of the base, for top-level mail folder
NS_IMETHOD BuildFolderURL(char **url);
NS_IMETHOD GetFolderURL(char **url);
NS_IMETHOD UpdateSummaryTotals(PRBool force) ;

Просмотреть файл

@ -538,7 +538,7 @@ nsMsgLocalMailFolder::GetMessages(nsISimpleEnumerator* *result)
NS_IMETHODIMP nsMsgLocalMailFolder::BuildFolderURL(char **url)
NS_IMETHODIMP nsMsgLocalMailFolder::GetFolderURL(char **url)
{
const char *urlScheme = "mailbox:";
@ -1264,7 +1264,7 @@ nsMsgLocalMailFolder::InitCopyState(nsISupports* aSupport,
PRBool isLocked;
IsLocked(&isLocked);
GetLocked(&isLocked);
if(!isLocked)
AcquireSemaphore(NS_STATIC_CAST(nsIMsgLocalMailFolder*, this));
else

Просмотреть файл

@ -95,7 +95,7 @@ public:
NS_IMETHOD GetPrettyName(PRUnichar** prettyName); // Override of the base, for top-level mail folder
NS_IMETHOD BuildFolderURL(char **url);
NS_IMETHOD GetFolderURL(char **url);
NS_IMETHOD UpdateSummaryTotals(PRBool force) ;

Просмотреть файл

@ -412,7 +412,7 @@ nsMsgNewsFolder::GetMessages(nsISimpleEnumerator* *result)
return rv;
}
NS_IMETHODIMP nsMsgNewsFolder::BuildFolderURL(char **url)
NS_IMETHODIMP nsMsgNewsFolder::GetFolderURL(char **url)
{
const char *urlScheme = "news:";

Просмотреть файл

@ -67,7 +67,7 @@ public:
NS_IMETHOD GetPrettyName(PRUnichar ** prettyName); // Override of the base, for top-level news folder
NS_IMETHOD BuildFolderURL(char **url);
NS_IMETHOD GetFolderURL(char **url);
NS_IMETHOD UpdateSummaryTotals(PRBool force) ;