QtPdCom  1.3.3
LoginManager_p.h
Go to the documentation of this file.
1 /*****************************************************************************
2  *
3  * Copyright (C) 2009-2023 Bjarne von Horn <vh@igh.de>
4  *
5  * This file is part of the QtPdCom library.
6  *
7  * The QtPdCom library is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU Lesser General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or (at your
10  * option) any later version.
11  *
12  * The QtPdCom library is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15  * License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with the QtPdCom Library. If not, see <http://www.gnu.org/licenses/>.
19  *
20  ****************************************************************************/
21 
22 #ifndef QTPDCOM_LOGINMANAGERP_H
23 #define QTPDCOM_LOGINMANAGERP_H
24 
25 #include <pdcom5/SimpleLoginManager.h>
26 #include <string>
27 #include <QtCore/QtGlobal>
28 
29 
30 namespace QtPdCom {
31 
32 class LoginManager;
33 
34 class LoginManagerPrivate: public PdCom::SimpleLoginManager
35 {
36  std::string getAuthname() override;
37  std::string getPassword() override;
38  void completed(LoginResult success) override;
39  void clearCredentials();
40 
41  public:
42  LoginManagerPrivate(const char *server_name, LoginManager *q):
43  PdCom::SimpleLoginManager(server_name), q_ptr(q)
44  {}
45 
47  private:
49  std::string username, password;
50  bool username_set = false, password_set = false;
51  PdCom::SimpleLoginManager::LoginResult loginResult =
52  PdCom::SimpleLoginManager::LoginResult::Success;
53 };
54 
55 } // namespace QtPdCom
56 
57 #endif // QTPDCOM_LOGINMANAGERP_H
void clearCredentials()
Definition: LoginManager.cpp:129
std::string password
Definition: LoginManager_p.h:49
Definition: BroadcastModel.h:32
std::string getAuthname() override
Definition: LoginManager.cpp:83
LoginManagerPrivate(const char *server_name, LoginManager *q)
Definition: LoginManager_p.h:42
Definition: LoginManager.h:36
bool password_set
Definition: LoginManager_p.h:50
std::string username
Definition: LoginManager_p.h:49
std::string getPassword() override
Definition: LoginManager.cpp:97
void completed(LoginResult success) override
Definition: LoginManager.cpp:111
Definition: MessageManager.h:36
bool username_set
Definition: LoginManager_p.h:50
Definition: LoginManager_p.h:34
PdCom::SimpleLoginManager::LoginResult loginResult
Definition: LoginManager_p.h:51
LoginManager *const q_ptr
Definition: LoginManager_p.h:46