diff --git a/mailnews/imap/src/nsImapMailFolder.cpp b/mailnews/imap/src/nsImapMailFolder.cpp index d2a5b36f549..3ddbb0d8d49 100644 --- a/mailnews/imap/src/nsImapMailFolder.cpp +++ b/mailnews/imap/src/nsImapMailFolder.cpp @@ -402,7 +402,7 @@ nsresult nsImapMailFolder::GetDatabase() rv = nsComponentManager::CreateInstance(kCImapDB, nsnull, nsIMsgDatabase::GetIID(), (void **) getter_AddRefs(mailDBFactory)); if (NS_SUCCEEDED(rv) && mailDBFactory) - folderOpen = mailDBFactory->Open(pathSpec, PR_TRUE, getter_AddRefs(mDatabase), PR_TRUE); + folderOpen = mailDBFactory->Open(pathSpec, PR_TRUE, PR_TRUE, getter_AddRefs(mDatabase)); if(mDatabase) { @@ -531,7 +531,7 @@ NS_IMETHODIMP nsImapMailFolder::CreateSubfolder(const char *folderName) nsCOMPtr unusedDB; nsCOMPtr dbFileSpec; NS_NewFileSpecWithSpec(path, getter_AddRefs(dbFileSpec)); - rv = mailDBFactory->Open(dbFileSpec, PR_TRUE, (nsIMsgDatabase **) getter_AddRefs(unusedDB), PR_TRUE); + rv = mailDBFactory->Open(dbFileSpec, PR_TRUE, PR_TRUE, (nsIMsgDatabase **) getter_AddRefs(unusedDB)); if (NS_SUCCEEDED(rv) && unusedDB) { @@ -547,7 +547,7 @@ NS_IMETHODIMP nsImapMailFolder::CreateSubfolder(const char *folderName) //Now let's create the actual new folder rv = AddSubfolder(folderNameStr, getter_AddRefs(child)); unusedDB->SetSummaryValid(PR_TRUE); - unusedDB->Commit(kLargeCommit); + unusedDB->Commit(nsMsgDBCommitType::kLargeCommit); unusedDB->Close(PR_TRUE); } } @@ -865,7 +865,7 @@ nsresult nsImapMailFolder::GetDBFolderInfoAndDB( rv = GetPath(getter_AddRefs(pathSpec)); if (NS_FAILED(rv)) return rv; - openErr = mailDBFactory->Open(pathSpec, PR_FALSE, (nsIMsgDatabase **) &mailDB, PR_FALSE); + openErr = mailDBFactory->Open(pathSpec, PR_FALSE, PR_FALSE, (nsIMsgDatabase **) &mailDB); } *db = mailDB; @@ -1017,10 +1017,10 @@ NS_IMETHODIMP nsImapMailFolder::DeleteMessages(nsISupportsArray *messages, rv = undoMsgTxn->SetUndoString(&undoString); rv = undoMsgTxn->SetRedoString(&redoString); } - if (mDatabase) - { - mDatabase->DeleteMessages(&srcKeyArray, nsnull); - } +// if (mDatabase) +// { +// mDatabase->DeleteMessages(&srcKeyArray, nsnull); +// } } } return rv; @@ -1164,8 +1164,8 @@ NS_IMETHODIMP nsImapMailFolder::UpdateImapMailboxInfo( { // if we pass in PR_TRUE for upgrading, the db code will ignore the // summary out of date problem for now. - rv = mailDBFactory->Open(pathSpec, PR_TRUE, (nsIMsgDatabase **) - getter_AddRefs(mDatabase), PR_TRUE); + rv = mailDBFactory->Open(pathSpec, PR_TRUE, PR_TRUE, (nsIMsgDatabase **) + getter_AddRefs(mDatabase)); if (NS_FAILED(rv)) return rv; if (!mDatabase) @@ -1204,7 +1204,7 @@ NS_IMETHODIMP nsImapMailFolder::UpdateImapMailboxInfo( // Create a new summary file, update the folder message counts, and // Close the summary file db. - rv = mailDBFactory->Open(pathSpec, PR_TRUE, getter_AddRefs(mDatabase), PR_TRUE); + rv = mailDBFactory->Open(pathSpec, PR_TRUE, PR_TRUE, getter_AddRefs(mDatabase)); // ********** Important ************* // David, help me here I don't know this is right or wrong @@ -2497,7 +2497,7 @@ NS_IMETHODIMP nsImapMailFolder::HeaderFetchCompleted(nsIImapProtocol* aProtocol) { if (mDatabase) - mDatabase->Commit(kLargeCommit); + mDatabase->Commit(nsMsgDBCommitType::kLargeCommit); #ifdef DOING_FILTERS if (m_moveCoalescer) { diff --git a/mailnews/imap/tests/harness/imapProtocolTest.cpp b/mailnews/imap/tests/harness/imapProtocolTest.cpp index 376a0fc55b5..0d27239ef58 100644 --- a/mailnews/imap/tests/harness/imapProtocolTest.cpp +++ b/mailnews/imap/tests/harness/imapProtocolTest.cpp @@ -250,7 +250,7 @@ nsIMAP4TestDriver::~nsIMAP4TestDriver() NS_IF_RELEASE(m_eventQueue); NS_IF_RELEASE(m_url); if (m_mailDB) - m_mailDB->Commit(kLargeCommit); + m_mailDB->Commit(nsMsgDBCommitType::kLargeCommit); NS_IF_RELEASE(m_mailDB); NS_IF_RELEASE (m_inbox); } diff --git a/mailnews/local/src/nsParseMailbox.cpp b/mailnews/local/src/nsParseMailbox.cpp index 7b48d29bc99..811ff2970d5 100644 --- a/mailnews/local/src/nsParseMailbox.cpp +++ b/mailnews/local/src/nsParseMailbox.cpp @@ -85,7 +85,7 @@ NS_IMETHODIMP nsMsgMailboxParser::OnStartRequest(nsIURI* aURL, const char *aCont { nsCOMPtr dbFileSpec; NS_NewFileSpecWithSpec(dbName, getter_AddRefs(dbFileSpec)); - rv = mailDB->Open(dbFileSpec, PR_TRUE, (nsIMsgDatabase **) getter_AddRefs(m_mailDB), PR_TRUE); + rv = mailDB->Open(dbFileSpec, PR_TRUE, PR_TRUE, (nsIMsgDatabase **) getter_AddRefs(m_mailDB)); } NS_ASSERTION(m_mailDB, "failed to open mail db parsing folder"); printf("url file = %s\n", fileName); @@ -255,7 +255,7 @@ void nsMsgMailboxParser::UpdateDBFolderInfo(nsIMsgDatabase *mailDB, const char * { // ### wrong - use method on db. mailDB->SetSummaryValid(PR_TRUE); - mailDB->Commit(kLargeCommit); + mailDB->Commit(nsMsgDBCommitType::kLargeCommit); // m_mailDB->Close(); } @@ -1368,7 +1368,7 @@ nsParseNewMailState::Init(nsIFolder *rootFolder, nsFileSpec &folder, nsIOFileStr { nsCOMPtr dbFileSpec; NS_NewFileSpecWithSpec(folder, getter_AddRefs(dbFileSpec)); - rv = mailDB->Open(dbFileSpec, PR_TRUE, (nsIMsgDatabase **) getter_AddRefs(m_mailDB), PR_FALSE); + rv = mailDB->Open(dbFileSpec, PR_TRUE, PR_FALSE, (nsIMsgDatabase **) getter_AddRefs(m_mailDB)); } // rv = nsMailDatabase::Open(folder, PR_TRUE, &m_mailDB, PR_FALSE); if (NS_FAILED(rv)) @@ -1815,7 +1815,7 @@ nsresult nsParseNewMailState::MoveIncorporatedMessage(nsIMsgDBHdr *mailHdr, { nsCOMPtr dbFileSpec; NS_NewFileSpecWithSpec(destFolderSpec, getter_AddRefs(dbFileSpec)); - rv = mailDBFactory->Open(dbFileSpec, PR_TRUE, (nsIMsgDatabase **) getter_AddRefs(destMailDB), PR_TRUE); + rv = mailDBFactory->Open(dbFileSpec, PR_TRUE, PR_TRUE, (nsIMsgDatabase **) getter_AddRefs(destMailDB)); } NS_ASSERTION(destMailDB, "failed to open mail db parsing folder"); // don't force upgrade in place - open the db here before we start writing to the diff --git a/mailnews/news/src/nsNNTPNewsgroupList.cpp b/mailnews/news/src/nsNNTPNewsgroupList.cpp index 7b686d95128..0585c4dfe28 100644 --- a/mailnews/news/src/nsNNTPNewsgroupList.cpp +++ b/mailnews/news/src/nsNNTPNewsgroupList.cpp @@ -130,7 +130,7 @@ nsNNTPNewsgroupList::CleanUp() { PR_Free(m_groupName); if (m_newsDB) { - m_newsDB->Commit(kSessionCommit); + m_newsDB->Commit(nsMsgDBCommitType::kSessionCommit); m_newsDB->Close(PR_TRUE); } @@ -163,7 +163,7 @@ nsNNTPNewsgroupList::GetDatabase(const char *uri, nsIMsgDatabase **db) if (NS_SUCCEEDED(rv) && newsDBFactory) { nsCOMPtr dbFileSpec; NS_NewFileSpecWithSpec(path, getter_AddRefs(dbFileSpec)); - newsDBOpen = newsDBFactory->Open(dbFileSpec, PR_TRUE, (nsIMsgDatabase **) db, PR_FALSE); + newsDBOpen = newsDBFactory->Open(dbFileSpec, PR_TRUE, PR_FALSE, (nsIMsgDatabase **) db); #ifdef DEBUG_NEWS if (NS_SUCCEEDED(newsDBOpen)) { printf ("newsDBFactory->Open() succeeded\n"); @@ -825,7 +825,7 @@ nsNNTPNewsgroupList::FinishXOVERLINE(int status, int *newstatus) #ifdef DEBUG_NEWS printf("committing summary file changes\n"); #endif - m_newsDB->Commit(kSessionCommit); + m_newsDB->Commit(nsMsgDBCommitType::kSessionCommit); m_newsDB->Close(PR_TRUE); m_newsDB = nsnull; } diff --git a/mailnews/news/src/nsNewsFolder.cpp b/mailnews/news/src/nsNewsFolder.cpp index 2385925a77c..44b3c89325c 100644 --- a/mailnews/news/src/nsNewsFolder.cpp +++ b/mailnews/news/src/nsNewsFolder.cpp @@ -510,7 +510,7 @@ nsresult nsMsgNewsFolder::GetDatabase() rv = nsComponentManager::CreateInstance(kCNewsDB, nsnull, nsIMsgDatabase::GetIID(), getter_AddRefs(newsDBFactory)); if (NS_SUCCEEDED(rv) && newsDBFactory) { - folderOpen = newsDBFactory->Open(pathSpec, PR_TRUE, getter_AddRefs(mDatabase), PR_FALSE); + folderOpen = newsDBFactory->Open(pathSpec, PR_TRUE, PR_FALSE, getter_AddRefs(mDatabase)); #ifdef DEBUG_NEWS if (NS_SUCCEEDED(folderOpen)) { printf ("newsDBFactory->Open() succeeded\n"); @@ -728,7 +728,7 @@ NS_IMETHODIMP nsMsgNewsFolder::CreateSubfolder(const char *folderName) rv = nsComponentManager::CreateInstance(kCNewsDB, nsnull, nsIMsgDatabase::GetIID(), getter_AddRefs(newsDBFactory)); if (NS_SUCCEEDED(rv) && newsDBFactory) { nsIMsgDatabase *unusedDB = nsnull; - rv = newsDBFactory->Open(path, PR_TRUE, (nsIMsgDatabase **) &unusedDB, PR_TRUE); + rv = newsDBFactory->Open(path, PR_TRUE, PR_TRUE, (nsIMsgDatabase **) &unusedDB); if (NS_SUCCEEDED(rv) && unusedDB) { //need to set the folder name @@ -958,7 +958,7 @@ nsresult nsMsgNewsFolder::GetDBFolderInfoAndDB(nsIDBFolderInfo **folderInfo, ns if (NS_SUCCEEDED(rv) && newsDBFactory) { nsCOMPtr dbFileSpec; NS_NewFileSpecWithSpec(*mPath, getter_AddRefs(dbFileSpec)); - openErr = newsDBFactory->Open(dbFileSpec, PR_FALSE, (nsIMsgDatabase **) &newsDB, PR_FALSE); + openErr = newsDBFactory->Open(dbFileSpec, PR_FALSE, PR_FALSE, (nsIMsgDatabase **) &newsDB); } else { return rv; diff --git a/mailnews/news/src/nsNntpService.cpp b/mailnews/news/src/nsNntpService.cpp index 88af1c7a8be..3af127d5ee4 100644 --- a/mailnews/news/src/nsNntpService.cpp +++ b/mailnews/news/src/nsNntpService.cpp @@ -224,7 +224,7 @@ nsresult nsNntpService::ConvertNewsMessageURI2NewsURI(const char *messageURI, ns nsCOMPtr dbFileSpec; NS_NewFileSpecWithSpec(pathResult, getter_AddRefs(dbFileSpec)); - rv = newsDBFactory->Open(dbFileSpec, PR_TRUE, getter_AddRefs(newsDB), PR_FALSE); + rv = newsDBFactory->Open(dbFileSpec, PR_TRUE, PR_FALSE, getter_AddRefs(newsDB)); if (NS_FAILED(rv) || (!newsDB)) { return rv; diff --git a/mailnews/news/src/nsNntpUrl.cpp b/mailnews/news/src/nsNntpUrl.cpp index 58823d3c213..31ac2214dd2 100644 --- a/mailnews/news/src/nsNntpUrl.cpp +++ b/mailnews/news/src/nsNntpUrl.cpp @@ -542,7 +542,7 @@ NS_IMETHODIMP nsNntpUrl::GetMessageHeader(nsIMsgDBHdr ** aMsgHdr) nsCOMPtr dbFileSpec; NS_NewFileSpecWithSpec(pathResult, getter_AddRefs(dbFileSpec)); - rv = newsDBFactory->Open(dbFileSpec, PR_TRUE, getter_AddRefs(newsDB), PR_FALSE); + rv = newsDBFactory->Open(dbFileSpec, PR_TRUE, PR_FALSE, getter_AddRefs(newsDB)); if (NS_FAILED(rv) || (!newsDB)) { return rv;