Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Attributes
nsPop3GetMailChainer Class Reference
Inheritance diagram for nsPop3GetMailChainer:
Inheritance graph
Collaboration diagram for nsPop3GetMailChainer:
Collaboration graph

List of all members.

Public Member Functions

nsPop3GetMailChainer ()
 ~nsPop3GetMailChainer ()
nsresult GetNewMailForServers (nsISupportsArray *servers, nsIMsgWindow *msgWindow, nsIMsgFolder *folderToDownloadTo, nsIUrlListener *listener)
nsresult RunNextGetNewMail ()
void OnStartRunningUrl (in nsIURI url)
void OnStopRunningUrl (in nsIURI url, in nsresult aExitCode)

Protected Attributes

nsCOMPtr< nsIMsgFolderm_folderToDownloadTo
nsCOMPtr< nsIMsgWindowm_downloadingMsgWindow
nsCOMPtr< nsISupportsArraym_serversToGetNewMailFor
nsCOMPtr< nsIUrlListenerm_listener

Detailed Description

Definition at line 64 of file nsPop3IncomingServer.cpp.

Constructor & Destructor Documentation

Definition at line 613 of file nsPop3IncomingServer.cpp.


Definition at line 616 of file nsPop3IncomingServer.cpp.


Member Function Documentation

nsresult nsPop3GetMailChainer::GetNewMailForServers ( nsISupportsArray servers,
nsIMsgWindow msgWindow,
nsIMsgFolder folderToDownloadTo,
nsIUrlListener listener 

Definition at line 620 of file nsPop3IncomingServer.cpp.


  m_serversToGetNewMailFor = servers;
  m_folderToDownloadTo = folderToDownloadTo;
  m_downloadingMsgWindow = msgWindow;
  m_listener = listener;
  nsCOMPtr <nsIMsgDatabase> destFolderDB;

  nsresult rv = folderToDownloadTo->GetMsgDatabase(msgWindow, getter_AddRefs(destFolderDB));
  if (NS_FAILED(rv) || !destFolderDB)
    nsCOMPtr <nsIMsgLocalMailFolder> localFolder = do_QueryInterface(folderToDownloadTo);
    if (localFolder)
      localFolder->GetDatabaseWithReparse(this, msgWindow, getter_AddRefs(destFolderDB));
      return NS_OK;
  return RunNextGetNewMail();

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

void nsIUrlListener::OnStopRunningUrl ( in nsIURI  url,
in nsresult  aExitCode 
) [inherited]

Here is the caller graph for this function:

Definition at line 656 of file nsPop3IncomingServer.cpp.

  nsresult rv;
  PRUint32 numServersLeft;

  for (; numServersLeft > 0;)
    nsCOMPtr <nsIPop3IncomingServer> popServer (do_QueryElementAt(m_serversToGetNewMailFor, 0));
    if (popServer)
      PRBool deferGetNewMail = PR_FALSE;
      nsCOMPtr <nsIMsgIncomingServer> downloadingToServer;
      nsCOMPtr <nsIMsgIncomingServer> server = do_QueryInterface(popServer);
      if (deferGetNewMail || downloadingToServer == server)
        // have to call routine that just gets mail for one server,
        // and ignores deferred servers...
        if (server)
          nsCOMPtr <nsIURI> url;
          nsCOMPtr<nsIPop3Service> pop3Service = do_GetService(kCPop3ServiceCID, &rv);
          return pop3Service->GetNewMail(m_downloadingMsgWindow, this, m_folderToDownloadTo, popServer, getter_AddRefs(url));
  rv = (m_listener) ? m_listener->OnStopRunningUrl(nsnull, NS_OK) 
                         : NS_OK;
  Release(); // release ref to ourself.
  return rv;

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

Definition at line 77 of file nsPop3IncomingServer.cpp.

Definition at line 76 of file nsPop3IncomingServer.cpp.

Definition at line 79 of file nsPop3IncomingServer.cpp.

Definition at line 78 of file nsPop3IncomingServer.cpp.

The documentation for this class was generated from the following file: