use correct db class, nsMsgKeyArray, and PRBool

git-svn-id: svn://10.0.0.236/trunk@19874 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bienvenu%netscape.com
1999-02-05 21:15:18 +00:00
parent 5bbb86970a
commit 5dd3e36558
2 changed files with 40 additions and 36 deletions

View File

@@ -22,7 +22,11 @@
#include "nsIRDFResourceFactory.h"
#include "nsMsgFolderFlags.h"
#include "prprf.h"
#include "nsMsgKeyArray.h"
#ifdef HAVE_DB
#include "nsMsgDatabase.h"
#endif
/* use these macros to define a class IID for our component. */
static NS_DEFINE_IID(kIMsgFolderIID, NS_IMSGFOLDER_IID);
static NS_DEFINE_IID(kIMsgMailFolderIID, NS_IMSGMAILFOLDER_IID);
@@ -124,7 +128,7 @@ NS_IMETHODIMP nsMsgFolder::BuildFolderURL(char **url)
#ifdef HAVE_DB
// this class doesn't have a url
NS_IMETHODIMP nsMsgFolder::BuildUrl (MessageDB *db, MessageKey key, char ** url)
NS_IMETHODIMP nsMsgFolder::BuildUrl (nsMsgDatabase *db, MessageKey key, char ** url)
{
if(*url)
{
@@ -147,12 +151,12 @@ NS_IMETHODIMP nsMsgFolder::SetMaster(MSG_Master *master)
#ifdef DOES_FOLDEROPERATIONS
NS_IMETHODIMP nsMsgFolder::StartAsyncCopyMessagesInto (MSG_FolderInfo *dstFolder,
MSG_Pane* sourcePane,
MessageDB *sourceDB,
IDArray *srcArray,
nsMsgDatabase *sourceDB,
nsMsgKeyArray *srcArray,
int32 srcCount,
MWContext *currentContext,
MSG_UrlQueue *urlQueue,
XP_Bool deleteAfterCopy,
PRBool deleteAfterCopy,
MessageKey nextKey = MSG_MESSAGEKEYNONE)
{
// General note: If either the source or destination folder is an IMAP folder then we add the copy info struct
@@ -239,8 +243,8 @@ NS_IMETHODIMP nsMsgFolder::StartAsyncCopyMessagesInto (MSG_FolderInfo *dstFolder
NS_IMETHODIMP nsMsgFolder::BeginCopyingMessages (MSG_FolderInfo *dstFolder,
MessageDB *sourceDB,
IDArray *srcArray,
nsMsgDatabase *sourceDB,
nsMsgKeyArray *srcArray,
MSG_UrlQueue *urlQueue,
int32 srcCount,
MessageCopyInfo *copyInfo)
@@ -253,8 +257,8 @@ NS_IMETHODIMP nsMsgFolder::BeginCopyingMessages (MSG_FolderInfo *dstFolder,
NS_IMETHODIMP nsMsgFolder::FinishCopyingMessages (MWContext *context,
MSG_FolderInfo * srcFolder,
MSG_FolderInfo *dstFolder,
MessageDB *sourceDB,
IDArray **ppSrcArray,
nsMsgDatabase *sourceDB,
nsMsgKeyArray **ppSrcArray,
int32 srcCount,
msg_move_state *state)
{
@@ -313,8 +317,8 @@ NS_IMETHODIMP nsMsgFolder::CleanupCopyMessagesInto (MessageCopyInfo **info)
return NS_OK;
}
NS_IMETHODIMP nsMsgFolder::SaveMessages(IDArray *, const char *fileName,
MSG_Pane *pane, MessageDB *msgDB,
NS_IMETHODIMP nsMsgFolder::SaveMessages(nsMsgKeyArray *, const char *fileName,
MSG_Pane *pane, nsMsgDatabase *msgDB,
int (*doneCB)(void *, int status) = NULL, void *state = NULL,
XP_Bool addMozillaStatus = TRUE)
{
@@ -1347,7 +1351,7 @@ NS_IMETHODIMP nsMsgFolder::ShouldPerformOperationOffline(PRBool *performOffline)
#ifdef DOES_FOLDEROPERATIONS
NS_IMETHODIMP nsMsgFolder::DownloadToTempFileAndUpload(MessageCopyInfo *copyInfo, IDArray &keysToSave, MSG_FolderInfo *dstFolder, MessageDB *sourceDB)
NS_IMETHODIMP nsMsgFolder::DownloadToTempFileAndUpload(MessageCopyInfo *copyInfo, nsMsgKeyArray &keysToSave, MSG_FolderInfo *dstFolder, nsMsgDatabase *sourceDB)
{
}
@@ -1573,7 +1577,7 @@ NS_IMETHODIMP nsMsgMailFolder::RemoveSubFolder (const nsIMsgFolder *which)
NS_IMETHODIMP nsMsgMailFolder::Delete ()
{
#ifdef HAVE_PORT
MessageDB *db;
nsMsgDatabase *db;
// remove the summary file
MsgERR status = CloseDatabase (m_pathName, &db);
if (0 == status)
@@ -1635,7 +1639,7 @@ NS_IMETHODIMP nsMsgMailFolder::Rename (const char *newName)
XP_STRCPY (slash + 1, leafNameForDisk);
// rename the mail summary file, if there is one
MessageDB *db = NULL;
nsMsgDatabase *db = NULL;
status = CloseDatabase (m_pathName, &db);
XP_StatStruct fileStat;

View File

@@ -49,7 +49,7 @@ public:
// If the db is NULL, then returns a URL that represents the entire
// folder as a whole.
#ifdef HAVE_DB
NS_IMETHOD BuildUrl (MessageDB *db, MessageKey key, char ** url);
NS_IMETHOD BuildUrl (nsMsgDatabase *db, MessageKey key, char ** url);
#endif
#ifdef HAVE_MASTER
@@ -59,18 +59,18 @@ public:
#ifdef DOES_FOLDEROPERATIONS
NS_IMETHOD StartAsyncCopyMessagesInto (MSG_FolderInfo *dstFolder,
MSG_Pane* sourcePane,
MessageDB *sourceDB,
IDArray *srcArray,
nsMsgDatabase *sourceDB,
nsMsgKeyArray *srcArray,
int32 srcCount,
MWContext *currentContext,
MSG_UrlQueue *urlQueue,
XP_Bool deleteAfterCopy,
PRBool deleteAfterCopy,
MessageKey nextKey = MSG_MESSAGEKEYNONE);
NS_IMETHOD BeginCopyingMessages (MSG_FolderInfo *dstFolder,
MessageDB *sourceDB,
IDArray *srcArray,
nsMsgDatabase *sourceDB,
nsMsgKeyArray *srcArray,
MSG_UrlQueue *urlQueue,
int32 srcCount,
MessageCopyInfo *copyInfo);
@@ -79,18 +79,18 @@ public:
NS_IMETHOD FinishCopyingMessages (MWContext *context,
MSG_FolderInfo * srcFolder,
MSG_FolderInfo *dstFolder,
MessageDB *sourceDB,
IDArray **ppSrcArray,
nsMsgDatabase *sourceDB,
nsMsgKeyArray **ppSrcArray,
int32 srcCount,
msg_move_state *state);
NS_IMETHOD CleanupCopyMessagesInto (MessageCopyInfo **info);
NS_IMETHOD SaveMessages(IDArray *, const char *fileName,
MSG_Pane *pane, MessageDB *msgDB,
NS_IMETHOD SaveMessages(nsMsgKeyArray *, const char *fileName,
MSG_Pane *pane, nsMsgDatabase *msgDB,
int (*doneCB)(void *, int status) = NULL, void *state = NULL,
XP_Bool addMozillaStatus = TRUE);
PRBool addMozillaStatus = TRUE);
#endif
NS_IMETHOD GetPrettyName(char * *aPrettyName);
@@ -175,8 +175,8 @@ public:
// 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
int32 GetNumPendingUnread(XP_Bool deep = FALSE);
int32 GetNumPendingTotalMessages(XP_Bool deep = FALSE);
int32 GetNumPendingUnread(PRBool deep = FALSE);
int32 GetNumPendingTotalMessages(PRBool deep = FALSE);
void ChangeNumPendingUnread(int32 delta);
void ChangeNumPendingTotalMessages(int32 delta);
@@ -221,7 +221,7 @@ public:
NS_IMETHOD GetRequiresCleanup(PRBool *requiredCleanup);
NS_IMETHOD ClearRequiresCleanup() ;
#ifdef HAVE_PANE
virtual XP_Bool CanBeInFolderPane ();
virtual PRBool CanBeInFolderPane ();
#endif
NS_IMETHOD GetKnowsSearchNntpExtension(PRBool *knowsExtension);
@@ -232,8 +232,8 @@ public:
#ifdef HAVE_SEMAPHORE
MsgERR AcquireSemaphore (void *semHolder);
void ReleaseSemaphore (void *semHolder);
XP_Bool TestSemaphore (void *semHolder);
XP_Bool IsLocked () { return m_semaphoreHolder != NULL; }
PRBool TestSemaphore (void *semHolder);
PRBool IsLocked () { return m_semaphoreHolder != NULL; }
#endif
#ifdef HAVE_PANE
@@ -247,7 +247,7 @@ public:
#ifdef HAVE_CACHE
virtual MsgERR WriteToCache (XP_File);
virtual MsgERR ReadFromCache (char *);
virtual XP_Bool IsCachable ();
virtual PRBool IsCachable ();
void SkipCacheTokens (char **ppBuf, int numTokens);
#endif
@@ -261,8 +261,8 @@ public:
#endif
#ifdef DOES_FOLDEROPERATIONS
int DownloadToTempFileAndUpload(MessageCopyInfo *copyInfo, IDArray &keysToSave, MSG_FolderInfo *dstFolder, MessageDB *sourceDB);
void UpdateMoveCopyStatus(MWContext *context, XP_Bool isMove, int32 curMsgCount, int32 totMessages);
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);
@@ -320,8 +320,8 @@ public:
#ifdef HAVE_DB
virtual MsgERR BeginCopyingMessages (MSG_FolderInfo *dstFolder,
MessageDB *sourceDB,
IDArray *srcArray,
nsMsgDatabase *sourceDB,
nsMsgKeyArray *srcArray,
MSG_UrlQueue *urlQueue,
int32 srcCount,
MessageCopyInfo *copyInfo);
@@ -330,8 +330,8 @@ public:
virtual int FinishCopyingMessages (MWContext *context,
MSG_FolderInfo * srcFolder,
MSG_FolderInfo *dstFolder,
MessageDB *sourceDB,
IDArray **ppSrcArray,
nsMsgDatabase *sourceDB,
nsMsgKeyArray **ppSrcArray,
int32 srcCount,
msg_move_state *state);
#endif