зеркало из https://github.com/mozilla/pjs.git
HasMessage added.
This commit is contained in:
Родитель
7354a7f1d7
Коммит
91c5a4bef6
|
@ -539,6 +539,32 @@ NS_IMETHODIMP nsImapMailFolder::GetThreadForMessage(nsIMessage *message,
|
|||
return rv;
|
||||
}
|
||||
|
||||
//This needs to be moved up into common base class.
|
||||
NS_IMETHODIMP
|
||||
nsImapMailFolder::HasMessage(nsIMessage *message, PRBool *hasMessage)
|
||||
{
|
||||
if(!hasMessage)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
nsresult rv = GetDatabase();
|
||||
|
||||
if(NS_SUCCEEDED(rv))
|
||||
{
|
||||
nsCOMPtr<nsIMsgDBHdr> msgDBHdr, msgDBHdrForKey;
|
||||
nsCOMPtr<nsIDBMessage> dbMessage(do_QueryInterface(message, &rv));
|
||||
nsMsgKey key;
|
||||
if(NS_SUCCEEDED(rv))
|
||||
rv = dbMessage->GetMsgDBHdr(getter_AddRefs(msgDBHdr));
|
||||
if(NS_SUCCEEDED(rv))
|
||||
rv = msgDBHdr->GetMessageKey(&key);
|
||||
if(NS_SUCCEEDED(rv))
|
||||
rv = m_mailDatabase->ContainsKey(key, hasMessage);
|
||||
|
||||
}
|
||||
return rv;
|
||||
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsImapMailFolder::CreateSubfolder(const char *folderName)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
|
|
@ -66,6 +66,7 @@ public:
|
|||
NS_IMETHOD GetMessages(nsIEnumerator* *result);
|
||||
NS_IMETHOD GetThreads(nsIEnumerator** threadEnumerator);
|
||||
NS_IMETHOD GetThreadForMessage(nsIMessage *message, nsIMsgThread **thread);
|
||||
NS_IMETHOD HasMessage(nsIMessage *message, PRBool *hasMessage);
|
||||
|
||||
|
||||
NS_IMETHOD CreateSubfolder(const char *folderName);
|
||||
|
|
Загрузка…
Ссылка в новой задаче