changes for msgdb idl
This commit is contained in:
Родитель
e97c3974f1
Коммит
c62cfad36e
|
@ -159,7 +159,7 @@ NS_IMETHODIMP nsMsgDBFolder::SetCharset(PRUnichar * aCharset)
|
||||||
{
|
{
|
||||||
nsString charset(aCharset);
|
nsString charset(aCharset);
|
||||||
rv = folderInfo->SetCharacterSet(&charset);
|
rv = folderInfo->SetCharacterSet(&charset);
|
||||||
db->Commit(kLargeCommit);
|
db->Commit(nsMsgDBCommitType::kLargeCommit);
|
||||||
}
|
}
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
|
@ -403,12 +403,12 @@ nsresult nsMsgLocalMailFolder::GetDatabase()
|
||||||
rv = nsComponentManager::CreateInstance(kCMailDB, nsnull, nsIMsgDatabase::GetIID(), getter_AddRefs(mailDBFactory));
|
rv = nsComponentManager::CreateInstance(kCMailDB, nsnull, nsIMsgDatabase::GetIID(), getter_AddRefs(mailDBFactory));
|
||||||
if (NS_SUCCEEDED(rv) && mailDBFactory)
|
if (NS_SUCCEEDED(rv) && mailDBFactory)
|
||||||
{
|
{
|
||||||
folderOpen = mailDBFactory->Open(pathSpec, PR_TRUE, getter_AddRefs(mDatabase), PR_FALSE);
|
folderOpen = mailDBFactory->Open(pathSpec, PR_TRUE, PR_FALSE, getter_AddRefs(mDatabase));
|
||||||
if(!NS_SUCCEEDED(folderOpen) &&
|
if(!NS_SUCCEEDED(folderOpen) &&
|
||||||
folderOpen == NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE || folderOpen == NS_MSG_ERROR_FOLDER_SUMMARY_MISSING )
|
folderOpen == NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE || folderOpen == NS_MSG_ERROR_FOLDER_SUMMARY_MISSING )
|
||||||
{
|
{
|
||||||
// if it's out of date then reopen with upgrade.
|
// if it's out of date then reopen with upgrade.
|
||||||
if(!NS_SUCCEEDED(rv = mailDBFactory->Open(pathSpec, PR_TRUE, getter_AddRefs(mDatabase), PR_TRUE)))
|
if(!NS_SUCCEEDED(rv = mailDBFactory->Open(pathSpec, PR_TRUE, PR_TRUE, getter_AddRefs(mDatabase))))
|
||||||
{
|
{
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
@ -557,7 +557,7 @@ NS_IMETHODIMP nsMsgLocalMailFolder::CreateSubfolder(const char *folderName)
|
||||||
nsIMsgDatabase *unusedDB = NULL;
|
nsIMsgDatabase *unusedDB = NULL;
|
||||||
nsCOMPtr <nsIFileSpec> dbFileSpec;
|
nsCOMPtr <nsIFileSpec> dbFileSpec;
|
||||||
NS_NewFileSpecWithSpec(path, getter_AddRefs(dbFileSpec));
|
NS_NewFileSpecWithSpec(path, getter_AddRefs(dbFileSpec));
|
||||||
rv = mailDBFactory->Open(dbFileSpec, PR_TRUE, (nsIMsgDatabase **) &unusedDB, PR_TRUE);
|
rv = mailDBFactory->Open(dbFileSpec, PR_TRUE, PR_TRUE, (nsIMsgDatabase **) &unusedDB);
|
||||||
|
|
||||||
if (NS_SUCCEEDED(rv) && unusedDB)
|
if (NS_SUCCEEDED(rv) && unusedDB)
|
||||||
{
|
{
|
||||||
|
@ -824,7 +824,7 @@ nsresult nsMsgLocalMailFolder::GetDBFolderInfoAndDB(nsIDBFolderInfo **folderInf
|
||||||
{
|
{
|
||||||
nsCOMPtr <nsIFileSpec> dbFileSpec;
|
nsCOMPtr <nsIFileSpec> dbFileSpec;
|
||||||
NS_NewFileSpecWithSpec(*mPath, getter_AddRefs(dbFileSpec));
|
NS_NewFileSpecWithSpec(*mPath, getter_AddRefs(dbFileSpec));
|
||||||
openErr = mailDBFactory->Open(dbFileSpec, PR_FALSE, (nsIMsgDatabase **) &mailDB, PR_FALSE);
|
openErr = mailDBFactory->Open(dbFileSpec, PR_FALSE, PR_FALSE, (nsIMsgDatabase **) &mailDB);
|
||||||
}
|
}
|
||||||
|
|
||||||
*db = mailDB;
|
*db = mailDB;
|
||||||
|
|
|
@ -299,7 +299,7 @@ NS_IMETHODIMP nsMailboxUrl::GetMessageHeader(nsIMsgDBHdr ** aMsgHdr)
|
||||||
NS_NewFileSpecWithSpec(*m_filePath, getter_AddRefs(dbFileSpec));
|
NS_NewFileSpecWithSpec(*m_filePath, getter_AddRefs(dbFileSpec));
|
||||||
|
|
||||||
if (NS_SUCCEEDED(rv) && mailDBFactory)
|
if (NS_SUCCEEDED(rv) && mailDBFactory)
|
||||||
rv = mailDBFactory->Open(dbFileSpec, PR_FALSE, (nsIMsgDatabase **) getter_AddRefs(mailDB), PR_FALSE);
|
rv = mailDBFactory->Open(dbFileSpec, PR_FALSE, PR_FALSE, (nsIMsgDatabase **) getter_AddRefs(mailDB));
|
||||||
if (NS_SUCCEEDED(rv) && mailDB) // did we get a db back?
|
if (NS_SUCCEEDED(rv) && mailDB) // did we get a db back?
|
||||||
rv = mailDB->GetMsgHdrForKey(m_messageKey, aMsgHdr);
|
rv = mailDB->GetMsgHdrForKey(m_messageKey, aMsgHdr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,7 +180,7 @@ nsresult newsTestDriver::GetDatabase(const char *uri)
|
||||||
|
|
||||||
rv = nsComponentManager::CreateInstance(kCNewsDB, nsnull, nsIMsgDatabase::GetIID(), getter_AddRefs(newsDBFactory));
|
rv = nsComponentManager::CreateInstance(kCNewsDB, nsnull, nsIMsgDatabase::GetIID(), getter_AddRefs(newsDBFactory));
|
||||||
if (NS_SUCCEEDED(rv) && newsDBFactory) {
|
if (NS_SUCCEEDED(rv) && newsDBFactory) {
|
||||||
newsDBOpen = newsDBFactory->Open(path, PR_TRUE, getter_AddRefs(m_newsDB), PR_FALSE);
|
newsDBOpen = newsDBFactory->Open(path, PR_TRUE, PR_FALSE, getter_AddRefs(m_newsDB));
|
||||||
#ifdef DEBUG_sspitzer
|
#ifdef DEBUG_sspitzer
|
||||||
if (NS_SUCCEEDED(newsDBOpen)) {
|
if (NS_SUCCEEDED(newsDBOpen)) {
|
||||||
printf ("newsDBFactory->Open() succeeded\n");
|
printf ("newsDBFactory->Open() succeeded\n");
|
||||||
|
|
Загрузка…
Ссылка в новой задаче