fix 20176 (no new msgs msg for imap) 23590 27379 45799 r=mscott

This commit is contained in:
bienvenu%netscape.com 2000-07-26 21:27:39 +00:00
Родитель 2d14bafab2
Коммит f07deaf265
13 изменённых файлов: 164 добавлений и 88 удалений

Просмотреть файл

@ -34,7 +34,7 @@ interface nsIImapMessageSink : nsISupports {
void ParseAdoptedMsgLine(in string adoptedMsgLine, in nsMsgKey uidOfMsg);
void NormalEndMsgWriteStream(in nsMsgKey uidOfMessage);
void NormalEndMsgWriteStream(in nsMsgKey uidOfMessage, in boolean markMsgRead);
void AbortMsgWriteStream();

Просмотреть файл

@ -62,7 +62,7 @@ public:
uid_validity_info* aInfo) = 0;
NS_IMETHOD LiteSelectUIDValidity(nsIImapProtocol* aProtocol,
PRUint32 uidValidity) = 0;
NS_IMETHOD ProgressStatus(nsIImapProtocol* aProtocol, PRUint32 aMsgId, const char *extraInfo) = 0;
NS_IMETHOD ProgressStatus(nsIImapProtocol* aProtocol, PRUint32 aMsgId, const PRUnichar *extraInfo) = 0;
NS_IMETHOD PercentProgress(nsIImapProtocol* aProtocol,
ProgressInfo* aInfo) = 0;
NS_IMETHOD TunnelOutStream(nsIImapProtocol* aProtocol,

Просмотреть файл

@ -158,7 +158,8 @@ interface nsIImapService : nsISupports
in boolean aIsMove,
in nsIUrlListener aUrlListener,
out nsIURI aURL,
in nsISupports aCopyState);
in nsISupports aCopyState,
in nsIMsgWindow aWindow);
void appendMessageFromFile(in nsIEventQueue aClientEventQueue,

Просмотреть файл

@ -40,11 +40,11 @@
# Status - deleting a folder
## @name IMAP_STATUS_DELETING_MAILBOX
## @loc None
# LOCALIZATION NOTE (Error 5002): The "%s" below should not be translated.
# LOCALIZATION NOTE (Error 5002): The "%S" below should not be translated.
# Instead, insert "%s" in your translation where you wish to display the name
# of the folder being deleted.
5002=Deleting folder %s...
5002=Deleting folder %S...
# Status - renaming mailbox
## @name IMAP_STATUS_RENAMING_MAILBOX
@ -52,7 +52,7 @@
# LOCALIZATION NOTE (Error 5003): The "%s" below should not be translated.
# Instead, insert "%s" in your translation where you wish to display the name
# of the folder being renamed.
5003=Renaming folder %s...
5003=Renaming folder %S...
# Status - looking for mailboxes
## @name IMAP_STATUS_LOOKING_FOR_MAILBOX
@ -65,7 +65,7 @@
# LOCALIZATION NOTE (Error 5005): The "%s" below should not be translated.
# Instead, insert "%s" in your translation where you wish to display the name
# of the folder being subscribed to.
5005=Subscribing to folder %s...
5005=Subscribing to folder %S...
# Status - unsubscribing from mailbox
## @name IMAP_STATUS_UNSUBSCRIBE_MAILBOX
@ -73,7 +73,7 @@
# LOCALIZATION NOTE (Error 5005): The "%s" below should not be translated.
# Instead, insert "%s" in your translation where you wish to display the name
# of the folder being unsubscribed from.
5006=Unsubscribing from folder %s...
5006=Unsubscribing from folder %S...
# Status - searching imap folder
## @name IMAP_STATUS_SEARCH_MAILBOX
@ -237,13 +237,13 @@
# LOCALIZATION NOTE (Error 5040): Do not translate the word "%s" below.
# Place the word %s in your translation where the name of the folder should appear.
5040=Moving messages to %s...
5040=Moving messages to %S...
## @name IMAP_MOVING_MESSAGE_TO
## @loc None
# LOCALIZATION NOTE (Error 5041): Do not translate the word "%s" below.
# Place the word %s in your translation where the name of the folder should appear.
5041=Moving message to %s...
5041=Moving message to %S...
## @name IMAP_COPYING_MESSAGES_TO
## @loc None
@ -261,7 +261,7 @@
## @loc None
# LOCALIZATION NOTE (Error 5044): Do not translate the word "%s" below.
# Place the word %s in your translation where the name of the folder should appear.
5044=Opening folder %s...
5044=Opening folder %S...
## @name IMAP_FOLDER_RECEIVING_MESSAGE_OF
## @loc None
@ -275,7 +275,7 @@
# LOCALIZATION NOTE (Error 5046): Do not translate the word "%s" below.
# Place the word %s in your translation where the name of the folder should appear.
5046=Found folder: %s
5046=Found folder: %S
## @name IMAP_ENTER_PASSWORD_PROMPT
## @loc None
@ -318,3 +318,8 @@
## @loc None
5055=Are you sure you want to move the selected folders into the Trash?
# Status - no messages to download
## @name IMAP_NO_NEW_MESSAGES
## @loc None
5056=There are no new messages on the server.

Просмотреть файл

@ -601,9 +601,16 @@ NS_IMETHODIMP nsImapMailFolder::CreateClientSubfolderInfo(const char *folderName
nsCOMPtr <nsIFileSpec> dbFileSpec;
nsXPIDLCString uniqueLeafName;
nsCAutoString proposedDBName(folderName);
proposedDBName += ".msf";
rv = CreatePlatformLeafNameForDisk(folderName, path, getter_Copies(uniqueLeafName));
path.SetLeafName(uniqueLeafName);
rv = CreatePlatformLeafNameForDisk(proposedDBName, path, getter_Copies(uniqueLeafName));
// take off the ".msf" on the end.
proposedDBName = uniqueLeafName;
proposedDBName.Truncate(proposedDBName.Length() - 4);
path.SetLeafName(proposedDBName);
NS_NewFileSpecWithSpec(path, getter_AddRefs(dbFileSpec));
rv = mailDBFactory->Open(dbFileSpec, PR_TRUE, PR_TRUE, (nsIMsgDatabase **) getter_AddRefs(unusedDB));
@ -1012,6 +1019,7 @@ NS_IMETHODIMP nsImapMailFolder::UpdateSummaryTotals(PRBool force)
NotifyIntPropertyChanged(kTotalUnreadMessagesAtom, oldUnreadMessages, newUnreadMessages);
}
FlushToFolderCache();
return rv;
}
@ -1373,6 +1381,18 @@ nsImapMailFolder::AllocateUidStringFromKeyArray(nsMsgKeyArray &keyArray, nsCStri
return rv;
}
nsresult nsImapMailFolder::MarkMessagesImapDeleted(nsMsgKeyArray *keyArray, nsIMsgDatabase *db)
{
PRBool allKeysImapDeleted;
db->AllMsgKeysImapDeleted(keyArray, &allKeysImapDeleted);
for (PRUint32 kindex = 0; kindex < keyArray->GetSize(); kindex++)
{
nsMsgKey key = keyArray->ElementAt(kindex);
db->MarkImapDeleted(key, !allKeysImapDeleted, nsnull);
}
return NS_OK;
}
NS_IMETHODIMP nsImapMailFolder::DeleteMessages(nsISupportsArray *messages,
nsIMsgWindow *msgWindow,
PRBool deleteStorage, PRBool isMove)
@ -1434,13 +1454,7 @@ NS_IMETHODIMP nsImapMailFolder::DeleteMessages(nsISupportsArray *messages,
{
if (deleteModel == nsMsgImapDeleteModels::IMAPDelete)
{
PRBool allKeysImapDeleted;
mDatabase->AllMsgKeysImapDeleted(&srcKeyArray, &allKeysImapDeleted);
for (PRUint32 kindex = 0; kindex < srcKeyArray.GetSize(); kindex++)
{
nsMsgKey key = srcKeyArray.ElementAt(kindex);
mDatabase->MarkImapDeleted(key, !allKeysImapDeleted, nsnull);
}
MarkMessagesImapDeleted(&srcKeyArray, mDatabase);
}
else
{
@ -1584,7 +1598,9 @@ NS_IMETHODIMP nsImapMailFolder::GetNewMessages(nsIMsgWindow *aWindow)
if (NS_SUCCEEDED(rv) && pEventQService)
pEventQService->GetThreadEventQueue(NS_CURRENT_THREAD,
getter_AddRefs(eventQ));
inbox->SetGettingNewMessages(PR_TRUE);
rv = imapService->SelectFolder(eventQ, inbox, this, aWindow, nsnull);
return rv;
}
@ -1765,17 +1781,24 @@ NS_IMETHODIMP nsImapMailFolder::UpdateImapMailboxInfo(
}
else
{
// let the imap libnet module know that we don't need headers
if (aProtocol)
aProtocol->NotifyHdrsToDownload(NULL, 0);
// wait until we can get body id monitor before continuing.
// IMAP_BodyIdMonitor(adoptedBoxSpec->connection, PR_TRUE);
// I think the real fix for this is to seperate the header ids from body id's.
// this is for fetching bodies for offline use
if (aProtocol)
aProtocol->NotifyBodysToDownload(NULL, 0/*keysToFetch.GetSize() */);
// NotifyFetchAnyNeededBodies(aSpec->connection, mailDB);
// IMAP_BodyIdMonitor(adoptedBoxSpec->connection, PR_FALSE);
// let the imap libnet module know that we don't need headers
if (aProtocol)
aProtocol->NotifyHdrsToDownload(NULL, 0);
// wait until we can get body id monitor before continuing.
// IMAP_BodyIdMonitor(adoptedBoxSpec->connection, PR_TRUE);
// I think the real fix for this is to seperate the header ids from body id's.
// this is for fetching bodies for offline use
if (aProtocol)
aProtocol->NotifyBodysToDownload(NULL, 0/*keysToFetch.GetSize() */);
PRBool gettingNewMessages;
GetGettingNewMessages(&gettingNewMessages);
if (gettingNewMessages)
{
ProgressStatus(aProtocol,IMAP_NO_NEW_MESSAGES, nsnull);
}
// NotifyFetchAnyNeededBodies(aSpec->connection, mailDB);
// IMAP_BodyIdMonitor(adoptedBoxSpec->connection, PR_FALSE);
}
}
@ -1913,8 +1936,26 @@ NS_IMETHODIMP nsImapMailFolder::NormalEndHeaderParseStream(nsIImapProtocol*
if (NS_SUCCEEDED(rv) && headers)
{
if (m_filterList)
{
nsCOMPtr <nsIMsgWindow> msgWindow;
if (aProtocol)
{
nsCOMPtr <nsIImapUrl> aImapUrl;
nsCOMPtr <nsIMsgMailNewsUrl> msgUrl;
rv = aProtocol->GetRunningImapURL(getter_AddRefs(aImapUrl));
if (NS_SUCCEEDED(rv) && aImapUrl)
{
msgUrl = do_QueryInterface(aImapUrl);
if (msgUrl)
msgUrl->GetMsgWindow(getter_AddRefs(msgWindow));
}
}
if (!m_moveCoalescer)
m_moveCoalescer = new nsImapMoveCoalescer(this, msgWindow);
m_filterList->ApplyFiltersToHdr(nsMsgFilterType::InboxRule, newMsgHdr, this, mDatabase,
headers, headersSize, this);
}
}
}
}
@ -2184,10 +2225,7 @@ NS_IMETHODIMP nsImapMailFolder::ApplyFilterHit(nsIMsgFilter *filter, PRBool *app
keysToFlag.Add(msgKey);
StoreImapFlags(kImapMsgSeenFlag | kImapMsgDeletedFlag, PR_TRUE, keysToFlag);
m_msgMovedByFilter = PR_TRUE;
// if (!showDeletedMessages)
// msgMoved = PR_TRUE; // this will prevent us from adding the header to the db.
m_msgMovedByFilter = PR_TRUE; // this will prevent us from adding the header to the db.
}
}
// note that delete falls through to move.
@ -2243,13 +2281,11 @@ NS_IMETHODIMP nsImapMailFolder::ApplyFilterHit(nsIMsgFilter *filter, PRBool *app
}
nsresult err = MoveIncorporatedMessage(msgHdr, mDatabase, actionTargetFolderUri, filter);
if (NS_SUCCEEDED(err))
{
m_msgMovedByFilter = PR_TRUE;
*applyMore = PR_FALSE;
}
}
}
// don't apply any more filters, even if it was a move to the same folder
*applyMore = PR_FALSE;
break;
case nsMsgFilterAction::MarkRead:
{
@ -2378,8 +2414,6 @@ nsresult nsImapMailFolder::MoveIncorporatedMessage(nsIMsgDBHdr *mailHdr,
{
nsresult err = NS_OK;
if (!m_moveCoalescer)
m_moveCoalescer = new nsImapMoveCoalescer(this);
if (m_moveCoalescer)
{
@ -2439,7 +2473,7 @@ nsresult nsImapMailFolder::MoveIncorporatedMessage(nsIMsgDBHdr *mailHdr,
// both of these algorithms assume that key arrays and flag states are sorted by increasing key.
void nsImapMailFolder::FindKeysToDelete(const nsMsgKeyArray &existingKeys, nsMsgKeyArray &keysToDelete, nsIImapFlagAndUidState *flagState)
{
PRBool imapDeleteIsMoveToTrash = DeleteIsMoveToTrash();
PRBool showDeletedMessages = ShowDeletedMessages();
PRUint32 total = existingKeys.GetSize();
PRInt32 messageIndex;
@ -2461,7 +2495,7 @@ void nsImapMailFolder::FindKeysToDelete(const nsMsgKeyArray &existingKeys, nsMsg
// delete this key if it is not there or marked deleted
if ( (onlineIndex >= messageIndex ) ||
(existingKeys[keyIndex] != uidOfMessage) ||
((flags & kImapMsgDeletedFlag) && imapDeleteIsMoveToTrash) )
((flags & kImapMsgDeletedFlag) && !showDeletedMessages) )
{
nsMsgKey doomedKey = existingKeys[keyIndex];
if ((PRInt32) doomedKey < 0 && doomedKey != nsMsgKey_None)
@ -2683,19 +2717,21 @@ nsImapMailFolder::ParseAdoptedMsgLine(const char *adoptedMessageLine, nsMsgKey u
}
NS_IMETHODIMP
nsImapMailFolder::NormalEndMsgWriteStream(nsMsgKey uidOfMessage)
nsImapMailFolder::NormalEndMsgWriteStream(nsMsgKey uidOfMessage, PRBool markRead)
{
nsresult res = NS_OK;
if (m_tempMessageStream)
m_tempMessageStream->Close();
nsCOMPtr<nsIMsgDBHdr> msgHdr;
m_curMsgUid = uidOfMessage;
res = GetMessageHeader(m_curMsgUid, getter_AddRefs(msgHdr));
if (NS_SUCCEEDED(res))
msgHdr->MarkRead(PR_TRUE);
if (markRead)
{
nsCOMPtr<nsIMsgDBHdr> msgHdr;
m_curMsgUid = uidOfMessage;
res = GetMessageHeader(m_curMsgUid, getter_AddRefs(msgHdr));
if (NS_SUCCEEDED(res))
msgHdr->MarkRead(PR_TRUE);
}
return res;
}
@ -3097,9 +3133,14 @@ nsImapMailFolder::OnStopRunningUrl(nsIURI *aUrl, nsresult aExitCode)
do_QueryInterface(m_copyState->m_undoMsgTxn);
if (msgTxn)
msgTxn->GetSrcKeyArray(srcKeyArray);
if (!ShowDeletedMessages())
srcDB->DeleteMessages(&srcKeyArray, nsnull);
srcFolder->NotifyFolderEvent(mDeleteOrMoveMsgCompletedAtom);
else
MarkMessagesImapDeleted(&srcKeyArray, srcDB);
}
// even if we're showing deleted messages,
// we still need to notify FE so it will show the imap deleted flag
srcFolder->NotifyFolderEvent(mDeleteOrMoveMsgCompletedAtom);
}
if (m_transactionManager)
m_transactionManager->Do(m_copyState->m_undoMsgTxn);
@ -3180,6 +3221,7 @@ nsImapMailFolder::OnStopRunningUrl(nsIURI *aUrl, nsresult aExitCode)
if (mailUrl)
rv = mailUrl->UnRegisterListener(this);
}
SetGettingNewMessages(PR_FALSE); // if we're not running a url, we must not be getting new mail :-)
return rv;
}
@ -3541,10 +3583,26 @@ NS_IMETHODIMP nsImapMailFolder::SetPath(nsIFileSpec * aPathName)
return aPathName->GetFileSpec(m_pathName);
}
nsresult nsImapMailFolder::DisplayStatusMsg(nsIImapUrl *aImapUrl, const PRUnichar *msg)
{
nsCOMPtr<nsIImapMockChannel> mockChannel;
aImapUrl->GetMockChannel(getter_AddRefs(mockChannel));
if (mockChannel)
{
nsCOMPtr<nsIProgressEventSink> progressSink;
mockChannel->GetProgressEventSink(getter_AddRefs(progressSink));
if (progressSink)
{
progressSink->OnStatus(mockChannel, nsnull, NS_OK, msg); // XXX i18n message
}
}
return NS_OK;
}
NS_IMETHODIMP
nsImapMailFolder::ProgressStatus(nsIImapProtocol* aProtocol,
PRUint32 aMsgId, const char *extraInfo)
PRUint32 aMsgId, const PRUnichar *extraInfo)
{
PRUnichar *progressMsg = nsnull;
@ -3565,26 +3623,16 @@ nsImapMailFolder::ProgressStatus(nsIImapProtocol* aProtocol,
aProtocol->GetRunningImapURL(getter_AddRefs(imapUrl));
if (imapUrl)
{
nsCOMPtr<nsIImapMockChannel> mockChannel;
imapUrl->GetMockChannel(getter_AddRefs(mockChannel));
if (mockChannel)
if (extraInfo)
{
nsCOMPtr<nsIProgressEventSink> progressSink;
mockChannel->GetProgressEventSink(getter_AddRefs(progressSink));
if (progressSink)
PRUnichar *printfString = nsTextFormatter::smprintf(progressMsg, extraInfo);
if (printfString)
{
if (extraInfo)
{
PRUnichar *printfString = nsTextFormatter::smprintf(progressMsg, extraInfo);
if (printfString)
{
progressMsg = nsCRT::strdup(printfString);
nsTextFormatter::smprintf_free(printfString);
}
}
progressSink->OnStatus(mockChannel, nsnull, NS_OK, progressMsg); // XXX i18n message
progressMsg = nsCRT::strdup(printfString);
nsTextFormatter::smprintf_free(printfString);
}
}
DisplayStatusMsg(imapUrl, progressMsg);
}
}
PR_FREEIF(progressMsg);
@ -3856,7 +3904,7 @@ nsImapMailFolder::CopyMessages(nsIMsgFolder* srcFolder,
srcFolder, messageIds.GetBuffer(),
this, PR_TRUE, isMove,
urlListener, nsnull,
copySupport);
copySupport, msgWindow);
if (NS_SUCCEEDED(rv))
{
nsImapMoveCopyMsgTxn* undoMsgTxn = new nsImapMoveCopyMsgTxn(

Просмотреть файл

@ -229,7 +229,7 @@ public:
NS_IMETHOD LiteSelectUIDValidity(nsIImapProtocol* aProtocol,
PRUint32 uidValidity);
NS_IMETHOD ProgressStatus(nsIImapProtocol* aProtocol,
PRUint32 aMsgId, const char *extraInfo);
PRUint32 aMsgId, const PRUnichar *extraInfo);
NS_IMETHOD PercentProgress(nsIImapProtocol* aProtocol,
ProgressInfo* aInfo);
NS_IMETHOD TunnelOutStream(nsIImapProtocol* aProtocol,
@ -270,6 +270,8 @@ protected:
nsresult SyncFlags(nsIImapFlagAndUidState *flagState);
nsresult MarkMessagesImapDeleted(nsMsgKeyArray *keyArray, nsIMsgDatabase *db);
void UpdatePendingCounts(PRBool countUnread, PRBool missingAreRead);
void SetIMAPDeletedFlag(nsIMsgDatabase *mailDB, const nsMsgKeyArray &msgids, PRBool markDeleted);
virtual PRBool ShowDeletedMessages();
@ -280,6 +282,8 @@ protected:
PRBool InTrash(nsIMsgFolder* folder);
nsresult GetServerKey(char **serverKey);
nsresult DisplayStatusMsg(nsIImapUrl *aImapUrl, const PRUnichar *msg);
//nsresult RenameLocal(const char *newName);
nsresult AddDirectorySeparator(nsFileSpec &path);
nsresult CreateDirectoryForFolder(nsFileSpec &path);

Просмотреть файл

@ -30,9 +30,11 @@
static NS_DEFINE_CID(kCImapService, NS_IMAPSERVICE_CID);
nsImapMoveCoalescer::nsImapMoveCoalescer(nsImapMailFolder *sourceFolder)
nsImapMoveCoalescer::nsImapMoveCoalescer(nsImapMailFolder *sourceFolder, nsIMsgWindow *msgWindow)
{
m_sourceFolder = sourceFolder;
m_msgWindow = msgWindow;
NS_IF_ADDREF(msgWindow);
if (sourceFolder)
NS_ADDREF(sourceFolder);
}
@ -129,7 +131,7 @@ nsresult nsImapMoveCoalescer::PlaybackMoves(nsIEventQueue *eventQueue)
}
}
rv = destFolder->CopyMessages(m_sourceFolder,
messages, PR_TRUE, nsnull,
messages, PR_TRUE, m_msgWindow,
/*nsIMsgCopyServiceListener* listener*/ nsnull);
// rv = imapService->OnlineMessageCopy(eventQueue,
// m_sourceFolder, messageIds.GetBuffer(),

Просмотреть файл

@ -40,7 +40,7 @@ class nsImapMailFolder;
class nsImapMoveCoalescer
{
public:
nsImapMoveCoalescer(nsImapMailFolder *sourceFolder);
nsImapMoveCoalescer(nsImapMailFolder *sourceFolder, nsIMsgWindow *msgWindow);
virtual ~nsImapMoveCoalescer();
nsresult AddMove(nsIMsgFolder *folder, nsMsgKey key);
@ -49,6 +49,7 @@ protected:
// m_sourceKeySets and m_destFolders are parallel arrays.
nsVoidArray m_sourceKeyArrays;
nsCOMPtr <nsISupportsArray> m_destFolders;
nsCOMPtr <nsIMsgWindow> m_msgWindow;
nsImapMailFolder *m_sourceFolder;
};

Просмотреть файл

@ -2742,9 +2742,12 @@ nsImapProtocol::PostLineDownLoadEvent(msg_line_info *downloadLineDontDelete)
{
PRUint32 count = 0;
char * line = downloadLineDontDelete->adoptedMessageLine;
nsresult rv = m_channelOutputStream->Write(line, PL_strlen(line), &count);
if (NS_SUCCEEDED(rv))
m_channelListener->OnDataAvailable(m_mockChannel, m_channelContext, m_channelInputStream, 0, count);
if (m_channelOutputStream)
{
nsresult rv = m_channelOutputStream->Write(line, PL_strlen(line), &count);
if (NS_SUCCEEDED(rv))
m_channelListener->OnDataAvailable(m_mockChannel, m_channelContext, m_channelInputStream, 0, count);
}
}
else if (m_imapMessageSink && downloadLineDontDelete)
{
@ -2907,9 +2910,13 @@ void nsImapProtocol::NormalMessageEndDownload()
// m_channelListener->OnDataAvailable(m_mockChannel, m_channelContext, m_channelInputStream, 0, inlength);
}
// need to know if we're downloading for display or not.
// need to know if we're downloading for display or not. We'll use action == nsImapMsgFetch for now
nsImapAction imapAction = nsIImapUrl::nsImapSelectFolder; // just set it to some legal value
if (m_runningUrl)
m_runningUrl->GetImapAction(&imapAction);
if (m_imapMessageSink)
m_imapMessageSink->NormalEndMsgWriteStream(m_downloadLineCache.CurrentUID());
m_imapMessageSink->NormalEndMsgWriteStream(m_downloadLineCache.CurrentUID(), imapAction == nsIImapUrl::nsImapMsgFetch);
if (m_runningUrl && m_imapMailFolderSink)
{
@ -4013,8 +4020,11 @@ nsImapProtocol::ProgressEventFunctionUsingIdWithString(PRUint32 aMsgId, const
if (m_imapMiscellaneousSink)
{
// ### FIXME - need to format this string, and pass it status. Or, invent a new interface
m_imapMiscellaneousSink->ProgressStatus(this, aMsgId, aExtraInfo);
nsXPIDLString unicodeStr;
nsresult rv = CreateUnicodeStringFromUtf7(aExtraInfo, getter_Copies(unicodeStr));
if (NS_SUCCEEDED(rv))
m_imapMiscellaneousSink->ProgressStatus(this, aMsgId, unicodeStr);
}
}

Просмотреть файл

@ -548,7 +548,7 @@ nsImapMiscellaneousSinkProxy::LiteSelectUIDValidity(nsIImapProtocol* aProtocol,
NS_IMETHODIMP
nsImapMiscellaneousSinkProxy::ProgressStatus(nsIImapProtocol* aProtocol,
PRUint32 aMsgId, const char *extraInfo)
PRUint32 aMsgId, const PRUnichar *extraInfo)
{
nsresult res = NS_OK;
NS_ASSERTION (m_protocol == aProtocol, "Ooh ooh, wrong protocol");
@ -1145,7 +1145,7 @@ LiteSelectUIDValidityProxyEvent::HandleEvent()
}
ProgressStatusProxyEvent::ProgressStatusProxyEvent(
nsImapMiscellaneousSinkProxy* aProxy, PRUint32 aMsgId, const char *extraInfo) :
nsImapMiscellaneousSinkProxy* aProxy, PRUint32 aMsgId, const PRUnichar *extraInfo) :
nsImapMiscellaneousSinkProxyEvent(aProxy)
{
m_statusMsgId = aMsgId;

Просмотреть файл

@ -112,7 +112,7 @@ public:
NS_IMETHOD LiteSelectUIDValidity(nsIImapProtocol* aProtocol,
PRUint32 uidValidity);
NS_IMETHOD ProgressStatus(nsIImapProtocol* aProtocol,
PRUint32 statusMsgId, const char *extraInfo);
PRUint32 statusMsgId, const PRUnichar *extraInfo);
NS_IMETHOD PercentProgress(nsIImapProtocol* aProtocol,
ProgressInfo* aInfo);
NS_IMETHOD TunnelOutStream(nsIImapProtocol* aProtocol,
@ -293,11 +293,11 @@ struct LiteSelectUIDValidityProxyEvent : public nsImapMiscellaneousSinkProxyEven
struct ProgressStatusProxyEvent : public nsImapMiscellaneousSinkProxyEvent
{
ProgressStatusProxyEvent(nsImapMiscellaneousSinkProxy* aProxy,
PRUint32 statusMsgId, const char *extraInfo);
PRUint32 statusMsgId, const PRUnichar *extraInfo);
virtual ~ProgressStatusProxyEvent();
NS_IMETHOD HandleEvent();
PRUint32 m_statusMsgId;
char *m_extraInfo;
PRUnichar *m_extraInfo;
};
struct PercentProgressProxyEvent : public nsImapMiscellaneousSinkProxyEvent

Просмотреть файл

@ -1701,7 +1701,8 @@ nsImapService::OnlineMessageCopy(nsIEventQueue* aClientEventQueue,
PRBool isMove,
nsIUrlListener* aUrlListener,
nsIURI** aURL,
nsISupports* copyState)
nsISupports* copyState,
nsIMsgWindow *aMsgWindow)
{
NS_ASSERTION(aSrcFolder && aDstFolder && messageIds && aClientEventQueue,
"Fatal ... missing key parameters");
@ -1739,6 +1740,9 @@ nsImapService::OnlineMessageCopy(nsIEventQueue* aClientEventQueue,
SetImapUrlSink(aSrcFolder, imapUrl);
imapUrl->SetCopyState(copyState);
nsCOMPtr<nsIMsgMailNewsUrl> msgurl (do_QueryInterface(imapUrl));
msgurl->SetMsgWindow(aMsgWindow);
nsCOMPtr<nsIURI> uri = do_QueryInterface(imapUrl);
if (isMove)

Просмотреть файл

@ -87,5 +87,6 @@ NS_END_EXTERN_C
#define IMAP_CONNECTION_REFUSED_ERROR 5053
#define IMAP_NET_TIMEOUT_ERROR 5054
#define IMAP_MOVE_FOLDER_TO_TRASH 5055
#define IMAP_NO_NEW_MESSAGES 5056
#endif /* _nsImapStringBundle_H__ */