source: filezilla/trunk/fuentes/src/interface/loginmanager.h @ 130

Last change on this file since 130 was 130, checked in by jrpelegrina, 3 years ago

First release to xenial

File size: 1.2 KB
Line 
1#ifndef __LOGINMANAGER_H__
2#define __LOGINMANAGER_H__
3
4// The purpose of this class is to manage some aspects of the login
5// behaviour. These are:
6// - Password dialog for servers with ASK or INTERACTIVE logontype
7// - Storage of passwords for ASK servers for duration of current session
8
9class CLoginManager
10{
11public:
12        static CLoginManager& Get() { return m_theLoginManager; }
13
14        bool GetPassword(CServer& server, bool silent, wxString const& name = wxString(), wxString const& challenge = wxString(), bool canRemember = true);
15
16        void CachedPasswordFailed(const CServer& server, wxString const& challenge = wxString());
17
18        void RememberPassword(CServer & server, wxString const& challenge = wxString());
19
20protected:
21        bool DisplayDialog(CServer& server, wxString const& name, wxString challenge, bool canRemember);
22
23        static CLoginManager m_theLoginManager;
24
25        // Session password cache for Ask-type servers
26        struct t_passwordcache
27        {
28                wxString host;
29                unsigned int port;
30                wxString user;
31                wxString password;
32                wxString challenge;
33        };
34       
35        std::list<t_passwordcache>::iterator FindItem(CServer const& server, wxString const& challenge);
36       
37        std::list<t_passwordcache> m_passwordCache;
38};
39
40#endif //__LOGINMANAGER_H__
Note: See TracBrowser for help on using the repository browser.