Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
nsSmtpServer Class Reference

#include <nsSmtpServer.h>

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

List of all members.

Public Member Functions

 nsSmtpServer ()
virtual ~nsSmtpServer ()
string getPasswordWithUI (in wstring promptString, in wstring promptTitle, in nsIAuthPrompt netPrompt)
void getUsernamePasswordWithUI (in wstring promptString, in wstring promptTitle, in nsIAuthPrompt netPrompt, out string userid, out string password)
void forgetPassword ()
void clearAllValues ()

Public Attributes

attribute string key
attribute AUTF8String description
attribute string hostname
attribute PRInt32 port
attribute string username
attribute string password
readonly attribute string displayname
attribute string redirectorType
attribute long authMethod
readonly attribute boolean trySecAuth
attribute long trySSL
readonly attribute string helloArgument
readonly attribute string serverURI

Private Member Functions

nsresult getPrefs ()
nsresult getIntPrefWithDefault (const char *prefName, PRInt32 *val, PRInt32 defval)

Private Attributes

nsCString mKey
nsCOMPtr< nsIPrefBranchmPrefBranch
nsCOMPtr< nsIPrefBranchmDefPrefBranch
nsCString m_password
PRBool m_logonFailed

Detailed Description

Definition at line 47 of file nsSmtpServer.h.


Constructor & Destructor Documentation

Definition at line 63 of file nsSmtpServer.cpp.

Definition at line 70 of file nsSmtpServer.cpp.

{
}

Member Function Documentation

nsresult nsSmtpServer::getIntPrefWithDefault ( const char *  prefName,
PRInt32 val,
PRInt32  defval 
) [private]

Definition at line 254 of file nsSmtpServer.cpp.

{
    nsresult rv = mPrefBranch->GetIntPref(prefName, val);
    if (NS_SUCCEEDED(rv))
        return NS_OK;

    rv = mDefPrefBranch->GetIntPref(prefName, val);

    if (NS_FAILED(rv))
    { // last resort
        *val = defVal;
    }

    return NS_OK;
}
string nsISmtpServer::getPasswordWithUI ( in wstring  promptString,
in wstring  promptTitle,
in nsIAuthPrompt  netPrompt 
) [inherited]

Definition at line 93 of file nsSmtpServer.cpp.

{
    nsresult rv;
    nsCOMPtr<nsIPrefService> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
    if (NS_FAILED(rv))
        return rv;

    nsCAutoString branchName;
    branchName.AssignLiteral("mail.smtpserver.");
    branchName += mKey;
    branchName.Append('.');
    rv = prefs->GetBranch(branchName.get(), getter_AddRefs(mPrefBranch));
    if (NS_FAILED(rv))
        return rv;

    if(!mDefPrefBranch) {
        branchName.AssignLiteral("mail.smtpserver.default.");
        rv = prefs->GetBranch(branchName.get(), getter_AddRefs(mDefPrefBranch));
        if (NS_FAILED(rv))
            return rv;
    }

    return NS_OK;
}

Here is the call graph for this function:

void nsISmtpServer::getUsernamePasswordWithUI ( in wstring  promptString,
in wstring  promptTitle,
in nsIAuthPrompt  netPrompt,
out string  userid,
out string  password 
) [inherited]

Member Data Documentation

Definition at line 58 of file nsISmtpServer.idl.

attribute AUTF8String nsISmtpServer::description [inherited]

Definition at line 48 of file nsISmtpServer.idl.

Definition at line 53 of file nsISmtpServer.idl.

Definition at line 61 of file nsISmtpServer.idl.

Definition at line 49 of file nsISmtpServer.idl.

Definition at line 46 of file nsISmtpServer.idl.

Definition at line 65 of file nsSmtpServer.h.

Definition at line 64 of file nsSmtpServer.h.

Definition at line 60 of file nsSmtpServer.h.

Definition at line 58 of file nsSmtpServer.h.

Definition at line 59 of file nsSmtpServer.h.

Definition at line 52 of file nsISmtpServer.idl.

Definition at line 50 of file nsISmtpServer.idl.

Definition at line 56 of file nsISmtpServer.idl.

Definition at line 63 of file nsISmtpServer.idl.

Definition at line 59 of file nsISmtpServer.idl.

Definition at line 60 of file nsISmtpServer.idl.

Definition at line 51 of file nsISmtpServer.idl.


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