add ability to stop pop3 download, r=putterm an 18060

This commit is contained in:
bienvenu%netscape.com 2000-01-28 23:20:00 +00:00
parent 994358ad34
commit 6933364300
4 changed files with 10 additions and 5 deletions

View File

@ -27,7 +27,7 @@
interface nsIURI; interface nsIURI;
interface nsIStreamListener; interface nsIStreamListener;
interface nsIMsgWindow;
/* /*
* The Pop3 Service is an interface designed to make building and running * The Pop3 Service is an interface designed to make building and running
@ -53,7 +53,7 @@ interface nsIPop3Service : nsISupports {
* mail on different pop3 accounts.... * mail on different pop3 accounts....
*/ */
nsIURI GetNewMail(in nsIUrlListener aUrlListener, nsIURI GetNewMail(in nsIMsgWindow aMsgWindow, in nsIUrlListener aUrlListener,
in nsIPop3IncomingServer popServer); in nsIPop3IncomingServer popServer);
nsIURI CheckForNewMail(in nsIUrlListener aUrlListener, nsIURI CheckForNewMail(in nsIUrlListener aUrlListener,

View File

@ -1486,7 +1486,7 @@ NS_IMETHODIMP nsMsgLocalMailFolder::GetNewMessages(nsIMsgWindow *aWindow)
rv = server->QueryInterface(nsIPop3IncomingServer::GetIID(), rv = server->QueryInterface(nsIPop3IncomingServer::GetIID(),
(void **)&popServer); (void **)&popServer);
if (NS_SUCCEEDED(rv)) { if (NS_SUCCEEDED(rv)) {
rv = pop3Service->GetNewMail(nsnull,popServer,nsnull); rv = pop3Service->GetNewMail(aWindow, nsnull,popServer,nsnull);
} }
} }
else if (PL_strcmp(type, "none") == 0) { else if (PL_strcmp(type, "none") == 0) {

View File

@ -102,7 +102,7 @@ NS_IMETHODIMP nsPop3Service::CheckForNewMail(nsIUrlListener * aUrlListener,
} }
nsresult nsPop3Service::GetNewMail(nsIUrlListener * aUrlListener, nsresult nsPop3Service::GetNewMail(nsIMsgWindow *aMsgWindow, nsIUrlListener * aUrlListener,
nsIPop3IncomingServer *popServer, nsIPop3IncomingServer *popServer,
nsIURI ** aURL) nsIURI ** aURL)
{ {
@ -127,7 +127,12 @@ nsresult nsPop3Service::GetNewMail(nsIUrlListener * aUrlListener,
} }
if (NS_SUCCEEDED(rv) && url) if (NS_SUCCEEDED(rv) && url)
{
nsCOMPtr <nsIMsgMailNewsUrl> mailNewsUrl = do_QueryInterface(url);
if (mailNewsUrl)
mailNewsUrl->SetMsgWindow(aMsgWindow);
rv = RunPopUrl(server, url); rv = RunPopUrl(server, url);
}
if (popHost) PL_strfree(popHost); if (popHost) PL_strfree(popHost);

View File

@ -470,7 +470,7 @@ nsresult nsPop3TestDriver::OnGet()
if (pop3Service) if (pop3Service)
{ {
pop3Service->GetNewMail(this, popServer, nsnull); pop3Service->GetNewMail(nsnull, this, popServer, nsnull);
m_runningURL = PR_TRUE; m_runningURL = PR_TRUE;
} }
return rv; return rv;