mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-15 14:30:47 +00:00
HasMessage implemented.
This commit is contained in:
parent
d2cc181656
commit
4208175d48
@ -574,6 +574,32 @@ nsMsgNewsFolder::GetThreadForMessage(nsIMessage *message, nsIMsgThread **thread)
|
||||
|
||||
}
|
||||
|
||||
//This needs to be moved up into common base class.
|
||||
NS_IMETHODIMP
|
||||
nsMsgNewsFolder::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 = mNewsDatabase->ContainsKey(key, hasMessage);
|
||||
|
||||
}
|
||||
return rv;
|
||||
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMsgNewsFolder::BuildFolderURL(char **url)
|
||||
{
|
||||
const char *urlScheme = "news:";
|
||||
|
@ -74,6 +74,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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user