Pass an nsIPrompt instance to the login redirector. r=jelwell, sr=mscott

git-svn-id: svn://10.0.0.236/trunk@83398 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
syd%netscape.com
2000-12-08 07:07:45 +00:00
parent c09cda8e4e
commit 34d41ad783
3 changed files with 9 additions and 3 deletions

View File

@@ -1660,7 +1660,10 @@ nsresult nsSmtpProtocol::RequestOverrideInfo(nsISmtpServer * aSmtpServer)
m_logonRedirector->RequiresPassword(userName, &requiresPassword);
if (requiresPassword)
GetPassword(getter_Copies(password));
rv = m_logonRedirector->Logon(userName, password, NS_STATIC_CAST(nsIMsgLogonRedirectionRequester *, this), nsMsgLogonRedirectionServiceIDs::Smtp);
nsCOMPtr<nsIPrompt> prompter;
m_runningURL->GetPrompt(getter_AddRefs(prompter));
rv = m_logonRedirector->Logon(userName, password, prompter, NS_STATIC_CAST(nsIMsgLogonRedirectionRequester *, this), nsMsgLogonRedirectionServiceIDs::Smtp);
}
// this protocol instance now needs to wait until

View File

@@ -1,6 +1,7 @@
#include "nsISupports.idl"
typedef long nsMsgLogonRedirectionState;
interface nsIPrompt;
[scriptable, uuid(e20261f6-df4f-11d3-b9f9-00108335942a)]
interface nsMsgLogonRedirectionStates
@@ -46,7 +47,7 @@ interface nsIMsgLogonRedirector : nsISupports
// wishes to log on.
// aUserName --> the user name we wish to log in under...
boolean requiresPassword(in string aUserName);
void logon(in string userName, in string password, in nsIMsgLogonRedirectionRequester listener, in nsMsgLogonRedirectionServiceID aServiceID);
void logon(in string userName, in string password, in nsIPrompt aPrompt, in nsIMsgLogonRedirectionRequester listener, in nsMsgLogonRedirectionServiceID aServiceID);
void logoff(in string userName); /* might not need this one */
};

View File

@@ -2002,7 +2002,9 @@ nsresult nsImapIncomingServer::RequestOverrideInfo(nsIMsgWindow *aMsgWindow)
return NS_OK;
}
rv = m_logonRedirector->Logon(userName, password, logonRedirectorRequester, nsMsgLogonRedirectionServiceIDs::Imap);
nsCOMPtr<nsIPrompt> dialogPrompter;
aMsgWindow->GetPromptDialog(getter_AddRefs(dialogPrompter));
rv = m_logonRedirector->Logon(userName, password, dialogPrompter, logonRedirectorRequester, nsMsgLogonRedirectionServiceIDs::Imap);
}
}