Back to index

lightning-sunbird  0.9+nobinonly
nsIMsgLogonRedirector.idl
Go to the documentation of this file.
00001 #include "nsISupports.idl"
00002 
00003 typedef long nsMsgLogonRedirectionState;
00004 interface nsIPrompt;
00005 
00006 [scriptable, uuid(e20261f6-df4f-11d3-b9f9-00108335942a)]
00007 interface nsMsgLogonRedirectionStates
00008 {
00009        const long Idle = 0;
00010        const long Connecting = 1;
00011        const long Negotiating = 2;
00012        const long Waiting = 3;
00013        const long Validating = 4;
00014 };
00015 
00016 typedef long nsMsgLogonRedirectionServiceID;
00017 
00018 [scriptable, uuid(182CB845-EB0D-11d3-98B7-001083010E9B)]
00019 interface nsMsgLogonRedirectionServiceIDs
00020 {
00021        const long Imap = 0;
00022        const long Smtp = 1;
00023        const long AbSync = 2;
00024 };
00025 
00026 [scriptable, uuid(3c882b66-df4f-11d3-b9f9-00108335942a)]
00027 interface nsIMsgLogonRedirectionRequester : nsISupports
00028 {
00029   /* Erron on processing the logon redirection */
00030   void OnLogonRedirectionError(in wstring pErrMsg, in boolean badPassword);
00031   
00032   /* Logon Redirection Progress */
00033   void OnLogonRedirectionProgress(in nsMsgLogonRedirectionState pState);
00034 
00035   /* reply with logon redirection data. */
00036   void OnLogonRedirectionReply(in wstring pHost, in unsigned short pPort, in string pCookieData, in unsigned short pCookieSize);
00037 }; 
00038 
00039 /* this is the service we use to request a logon redirection */ 
00040 [scriptable, uuid(0c2e96ac-e0ae-11d3-a560-0060b0fc04b7)] 
00041 interface nsIMsgLogonRedirector : nsISupports 
00042 { 
00043   // RequiresPassword --> if the subsequent logon call still requires a password to succeed, then the
00044   // redirector will return true for this. If the redirector already has a connection open and doesn't really
00045   // need a password again, then this will return false. This method gives us a poor man's version of password
00046   // caching so the redirection requestor doesn't have to prompt for a password every time the requestor
00047   // wishes to log on.
00048   // aUserName --> the user name we wish to log in under...
00049   boolean requiresPassword(in string aUserName, in string aRedirectorType);
00050   void logon(in string userName, in string password, in string redirectorType, in nsIPrompt aPrompt, in nsIMsgLogonRedirectionRequester listener, in nsMsgLogonRedirectionServiceID aServiceID); 
00051   void logoff(in string userName); /* might not need this one */ 
00052 }; 
00053