зеркало из https://github.com/mozilla/gecko-dev.git
more work on purging of offline imap/news messages r=sspitzer, sr=mscott 15865
This commit is contained in:
Родитель
c8c915bd95
Коммит
53e9a2cb99
|
@ -61,7 +61,7 @@ public:
|
|||
virtual nsresult GetThreadForMsgKey(nsMsgKey msgKey, nsIMsgThread **result);
|
||||
virtual nsresult EnumerateUnreadMessages(nsISimpleEnumerator* *result);
|
||||
virtual nsresult EnumerateReadMessages(nsISimpleEnumerator* *result);
|
||||
virtual nsresult EnumerateMessagesWithFlag(nsISimpleEnumerator* *result, PRUint32 flag);
|
||||
virtual nsresult EnumerateMessagesWithFlag(nsISimpleEnumerator* *result, PRUint32 *pFlag);
|
||||
|
||||
// this might just be for debugging - we'll see.
|
||||
nsresult ListAllThreads(nsMsgKeyArray *threadIds);
|
||||
|
|
|
@ -2475,9 +2475,9 @@ nsMsgDatabase::EnumerateUnreadMessages(nsISimpleEnumerator* *result)
|
|||
}
|
||||
|
||||
nsresult
|
||||
nsMsgDatabase::EnumerateMessagesWithFlag(nsISimpleEnumerator* *result, PRUint32 flag)
|
||||
nsMsgDatabase::EnumerateMessagesWithFlag(nsISimpleEnumerator* *result, PRUint32 *pFlag)
|
||||
{
|
||||
nsMsgDBEnumerator* e = new nsMsgDBEnumerator(this, nsMsgFlagSetFilter, &flag);
|
||||
nsMsgDBEnumerator* e = new nsMsgDBEnumerator(this, nsMsgFlagSetFilter, pFlag);
|
||||
if (e == nsnull)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(e);
|
||||
|
@ -3308,7 +3308,11 @@ nsresult nsMsgDatabase::ListAllThreads(nsMsgKeyArray *threadIds)
|
|||
NS_IMETHODIMP nsMsgDatabase::ListAllOfflineMsgs(nsMsgKeyArray *outputKeys)
|
||||
{
|
||||
nsCOMPtr <nsISimpleEnumerator> enumerator;
|
||||
nsresult rv = EnumerateMessagesWithFlag(getter_AddRefs(enumerator), MSG_FLAG_OFFLINE);
|
||||
PRUint32 flag = MSG_FLAG_OFFLINE;
|
||||
// if we change this routine to return an enumerator that generates the keys
|
||||
// one by one, we'll need to somehow make a copy of flag for the enumerator
|
||||
// to own, since the enumerator will persist past the life of flag on the stack.
|
||||
nsresult rv = EnumerateMessagesWithFlag(getter_AddRefs(enumerator), &flag);
|
||||
if (NS_SUCCEEDED(rv) && enumerator)
|
||||
{
|
||||
PRBool hasMoreElements;
|
||||
|
|
|
@ -386,6 +386,8 @@ NS_IMETHODIMP nsMsgThread::GetChildHdrAt(PRInt32 aIndex, nsIMsgDBHdr **result)
|
|||
|
||||
nsIMdbTableRowCursor *rowCursor;
|
||||
ret = m_mdbTable->GetTableRowCursor(m_mdbDB->GetEnv(), pos, &rowCursor);
|
||||
if (ret != 0)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
ret = rowCursor->NextRow(m_mdbDB->GetEnv(), &resultRow, &pos);
|
||||
NS_RELEASE(rowCursor);
|
||||
|
|
Загрузка…
Ссылка в новой задаче