This commit is contained in:
pollmann%netscape.com 2001-04-27 07:33:25 +00:00
Родитель 20d36922b5
Коммит d8ca4bf931
2 изменённых файлов: 1 добавлений и 32 удалений

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

@ -30,7 +30,6 @@
#include "nsRDFCID.h" #include "nsRDFCID.h"
#include "nsIMsgAccountManager.h" #include "nsIMsgAccountManager.h"
#include "nsINntpIncomingServer.h" #include "nsINntpIncomingServer.h"
#include "nsIStreamObserver.h"
static NS_DEFINE_CID(kMsgAccountManagerCID, NS_MSGACCOUNTMANAGER_CID); static NS_DEFINE_CID(kMsgAccountManagerCID, NS_MSGACCOUNTMANAGER_CID);
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID); static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
@ -42,10 +41,6 @@ nsImapOfflineSync::nsImapOfflineSync(nsIMsgWindow *window, nsIUrlListener *liste
NS_INIT_REFCNT(); NS_INIT_REFCNT();
m_singleFolderToUpdate = singleFolderOnly; m_singleFolderToUpdate = singleFolderOnly;
m_window = window; m_window = window;
// not the perfect place for this, but I think it will work.
if (m_window)
m_window->SetStopped(PR_FALSE);
mCurrentPlaybackOpType = nsIMsgOfflineImapOperation::kFlagsChanged; mCurrentPlaybackOpType = nsIMsgOfflineImapOperation::kFlagsChanged;
m_mailboxupdatesStarted = PR_FALSE; m_mailboxupdatesStarted = PR_FALSE;
m_createdOfflineFolders = PR_FALSE; m_createdOfflineFolders = PR_FALSE;
@ -73,14 +68,6 @@ NS_IMETHODIMP
nsImapOfflineSync::OnStopRunningUrl(nsIURI* url, nsresult exitCode) nsImapOfflineSync::OnStopRunningUrl(nsIURI* url, nsresult exitCode)
{ {
nsresult rv = exitCode; nsresult rv = exitCode;
// where do we make sure this gets cleared when we start running urls?
PRBool stopped = PR_FALSE;
if (m_window)
m_window->GetStopped(&stopped);
if (stopped)
exitCode = NS_BINDING_ABORTED;
if (NS_SUCCEEDED(exitCode)) if (NS_SUCCEEDED(exitCode))
rv = ProcessNextOperation(); rv = ProcessNextOperation();
else if (m_listener) // notify main observer. else if (m_listener) // notify main observer.
@ -489,24 +476,6 @@ PRBool nsImapOfflineSync::CreateOfflineFolder(nsIMsgFolder *folder)
return NS_SUCCEEDED(rv) ? PR_TRUE : PR_FALSE; // this is asynch, we have to return and be called again by the OfflineOpExitFunction return NS_SUCCEEDED(rv) ? PR_TRUE : PR_FALSE; // this is asynch, we have to return and be called again by the OfflineOpExitFunction
} }
PRInt32 nsImapOfflineSync::GetCurrentUIDValidity()
{
PRUint32 uidValidity;
uid_validity_info uidStruct;
if (m_currentFolder)
{
nsCOMPtr <nsIImapMiscellaneousSink> miscellaneousSink = do_QueryInterface(m_currentFolder);
if (miscellaneousSink)
{
uidStruct.returnValidity = kUidUnknown;
miscellaneousSink->GetStoredUIDValidity(nsnull, &uidStruct);
mCurrentUIDValidity = uidStruct.returnValidity;
}
}
return mCurrentUIDValidity;
}
// Playing back offline operations is one giant state machine that runs through ProcessNextOperation. // Playing back offline operations is one giant state machine that runs through ProcessNextOperation.
// The first state is creating online any folders created offline (we do this first, so we can play back // The first state is creating online any folders created offline (we do this first, so we can play back
// any operations in them in the next pass) // any operations in them in the next pass)

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

@ -39,7 +39,7 @@ public: // set to one folder to playback one folder only
NS_DECL_NSIURLLISTENER NS_DECL_NSIURLLISTENER
virtual nsresult ProcessNextOperation(); // this kicks off playback virtual nsresult ProcessNextOperation(); // this kicks off playback
PRInt32 GetCurrentUIDValidity(); PRInt32 GetCurrentUIDValidity() { return mCurrentUIDValidity; }
void SetCurrentUIDValidity(PRInt32 uidvalidity) { mCurrentUIDValidity = uidvalidity; } void SetCurrentUIDValidity(PRInt32 uidvalidity) { mCurrentUIDValidity = uidvalidity; }
void SetPseudoOffline(PRBool pseudoOffline) {m_pseudoOffline = pseudoOffline;} void SetPseudoOffline(PRBool pseudoOffline) {m_pseudoOffline = pseudoOffline;}