Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsMovemailIncomingServer Class Reference

#include <nsMovemailIncomingServer.h>

Inheritance diagram for nsMovemailIncomingServer:
Inheritance graph
[legend]
Collaboration diagram for nsMovemailIncomingServer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIMOVEMAILINCOMINGSERVER
NS_DECL_NSILOCALMAILINCOMINGSERVER 
nsMovemailIncomingServer ()
virtual ~nsMovemailIncomingServer ()
NS_IMETHOD GetIsSecureServer (PRBool *aIsSecureServer)
NS_IMETHOD GetLocalStoreType (char **type)
NS_IMETHOD PerformBiff (nsIMsgWindow *aMsgWindow)
NS_IMETHOD GetDownloadMessagesAtStartup (PRBool *getMessages)
NS_IMETHOD GetCanSearchMessages (PRBool *canSearchMessages)
NS_IMETHOD GetServerRequiresPasswordForBiff (PRBool *aServerRequiresPasswordForBiff)
NS_IMETHOD GetAccountManagerChrome (nsAString &aResult)
void createDefaultMailboxes (in nsIFileSpec path)
void setFlagsOnDefaultMailboxes ()
nsIURI getNewMail (in nsIMsgWindow aMsgWindow, in nsIUrlListener aUrlListener, in nsIMsgFolder aInbox)

Detailed Description

Definition at line 48 of file nsMovemailIncomingServer.h.


Constructor & Destructor Documentation

NS_DECL_ISUPPORTS_INHERITED NS_DECL_NSIMOVEMAILINCOMINGSERVER NS_DECL_NSILOCALMAILINCOMINGSERVER nsMovemailIncomingServer::nsMovemailIncomingServer ( )

Definition at line 63 of file nsMovemailIncomingServer.cpp.

{
}

Member Function Documentation

Definition at line 277 of file nsMovemailIncomingServer.cpp.

{
    aResult.AssignLiteral("am-main.xul");
    return NS_OK;
}

Definition at line 261 of file nsMovemailIncomingServer.cpp.

{
    NS_ENSURE_ARG_POINTER(canSearchMessages);
    *canSearchMessages = PR_TRUE;
    return NS_OK;
}

Definition at line 253 of file nsMovemailIncomingServer.cpp.

{
    NS_ENSURE_ARG_POINTER(getMessagesAtStartup);
    *getMessagesAtStartup = PR_TRUE;
    return NS_OK;
}

Definition at line 68 of file nsMovemailIncomingServer.cpp.

{
    NS_ENSURE_ARG_POINTER(aIsSecureServer);
    *aIsSecureServer = PR_FALSE;
    return NS_OK;
}

Definition at line 76 of file nsMovemailIncomingServer.cpp.

{
    NS_ENSURE_ARG_POINTER(type);
    *type = strdup("mailbox");
    return NS_OK;
}
nsIURI nsILocalMailIncomingServer::getNewMail ( in nsIMsgWindow  aMsgWindow,
in nsIUrlListener  aUrlListener,
in nsIMsgFolder  aInbox 
) [inherited]

Definition at line 269 of file nsMovemailIncomingServer.cpp.

{
    NS_ENSURE_ARG_POINTER(aServerRequiresPasswordForBiff);
    *aServerRequiresPasswordForBiff = PR_FALSE;
    return NS_OK;
}

Definition at line 84 of file nsMovemailIncomingServer.cpp.

{
    nsresult rv;
    nsCOMPtr<nsIMovemailService> movemailService(do_GetService(
                                                 kCMovemailServiceCID, &rv));
    if (NS_FAILED(rv)) return rv;
    nsCOMPtr<nsIMsgFolder> inbox;
    nsCOMPtr<nsIMsgFolder> rootMsgFolder;
    nsCOMPtr<nsIUrlListener> urlListener;
    rv = GetRootMsgFolder(getter_AddRefs(rootMsgFolder));
    if(NS_SUCCEEDED(rv) && rootMsgFolder)
    {
         PRUint32 numFolders;
         rv = rootMsgFolder->GetFoldersWithFlag(MSG_FOLDER_FLAG_INBOX, 1,
                                                &numFolders,
                                                getter_AddRefs(inbox));
         if (NS_FAILED(rv) || numFolders != 1) return rv;
    }

    SetPerformingBiff(PR_TRUE);
    urlListener = do_QueryInterface(inbox);

    PRBool downloadOnBiff = PR_FALSE;
    rv = GetDownloadOnBiff(&downloadOnBiff);
    if (downloadOnBiff)
    {
       nsCOMPtr <nsIMsgLocalMailFolder> localInbox = do_QueryInterface(inbox,
                                                                       &rv);
       if (localInbox && NS_SUCCEEDED(rv))
       {
           PRBool valid = PR_FALSE;
           nsCOMPtr <nsIMsgDatabase> db;
           rv = inbox->GetMsgDatabase(aMsgWindow, getter_AddRefs(db));
           if (NS_SUCCEEDED(rv) && db)
           {
               rv = db->GetSummaryValid(&valid);
           }
           if (NS_SUCCEEDED(rv) && valid)
           {
               rv = movemailService->GetNewMail(aMsgWindow, urlListener, inbox,
                                                this, nsnull);
           }
           else
           {
              PRBool isLocked;
              inbox->GetLocked(&isLocked);
              if (!isLocked)
              {
                 rv = localInbox->ParseFolder(aMsgWindow, urlListener);
              }
              if (NS_SUCCEEDED(rv))
              {
                 rv = localInbox->SetCheckForNewMessagesAfterParsing(PR_TRUE);
              }
           }
       }
    }
    else
    {
        movemailService->CheckForNewMail(urlListener, inbox, this, nsnull); 
    }

    return NS_OK;
}

Here is the call graph for this function:


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