ManaPlus
src
net
logindata.h
Go to the documentation of this file.
1
/*
2
* The ManaPlus Client
3
* Copyright (C) 2004-2009 The Mana World Development Team
4
* Copyright (C) 2009-2010 The Mana Developers
5
* Copyright (C) 2011-2019 The ManaPlus Developers
6
* Copyright (C) 2019-2021 Andrei Karas
7
*
8
* This file is part of The ManaPlus Client.
9
*
10
* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* any later version.
14
*
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
19
*
20
* You should have received a copy of the GNU General Public License
21
* along with this program. If not, see <http://www.gnu.org/licenses/>.
22
*/
23
24
#ifndef NET_LOGINDATA_H
25
#define NET_LOGINDATA_H
26
27
#include "
enums/being/gender.h
"
28
29
#include "
enums/net/updatetype.h
"
30
31
#include "
utils/stringvector.h
"
32
33
#include "
localconsts.h
"
34
35
class
LoginData
final
36
{
37
public
:
38
LoginData
() :
39
username
(),
40
password
(),
41
newPassword
(),
42
updateHost
(),
43
updateHosts
(),
44
lastLogin
(),
45
updateType
(
UpdateType
::
Normal
),
46
email
(),
47
captchaResponse
(),
48
registerUrl
(),
49
gender
(
Gender
::
UNSPECIFIED
),
50
packetVersion
(0),
51
remember
(false),
52
registerLogin
(false),
53
characterSlots
(9)
54
{
55
}
56
57
A_DELETE_COPY
(
LoginData
)
58
59
std
::
string
username
;
60
std
::
string
password
;
61
std
::
string
newPassword
;
62
std
::
string
updateHost
;
63
StringVect
updateHosts
;
64
std
::
string
lastLogin
;
65
UpdateTypeT
updateType
;
66
67
std
::
string
email
;
68
std
::
string
captchaResponse
;
69
std
::
string
registerUrl
;
70
71
GenderT
gender
;
72
73
int
packetVersion
;
74
bool
remember
;
// Whether to store the username.
75
bool
registerLogin
;
// Whether an account is being registered.
76
77
uint16_t
characterSlots
;
// The number of character slots
78
79
void
clear
()
80
{
81
username
.clear();
82
password
.clear();
83
newPassword
.clear();
84
updateHost
.clear();
85
updateHosts
.clear();
86
updateType
=
UpdateType::Normal
;
87
email
.clear();
88
captchaResponse
.clear();
89
registerUrl
.clear();
90
gender
=
Gender::UNSPECIFIED
;
91
packetVersion
= 0;
92
lastLogin
.clear();
93
resetCharacterSlots
();
94
}
95
96
void
clearUpdateHost
()
97
{
98
updateHost
.clear();
99
updateHosts
.clear();
100
}
101
105
void
resetCharacterSlots
()
106
{
107
characterSlots
= 9;
// Default value, used for TmwAthena.
108
}
109
};
110
111
#endif
// NET_LOGINDATA_H
LoginData
Definition:
logindata.h:36
LoginData::gender
GenderT gender
Definition:
logindata.h:71
LoginData::registerUrl
std::string registerUrl
Definition:
logindata.h:69
LoginData::email
std::string email
Definition:
logindata.h:67
LoginData::updateHost
std::string updateHost
Definition:
logindata.h:62
LoginData::lastLogin
std::string lastLogin
Definition:
logindata.h:64
LoginData::updateHosts
StringVect updateHosts
Definition:
logindata.h:63
LoginData::packetVersion
int packetVersion
Definition:
logindata.h:73
LoginData::username
std::string username
Definition:
logindata.h:59
LoginData::clear
void clear()
Definition:
logindata.h:79
LoginData::password
std::string password
Definition:
logindata.h:60
LoginData::characterSlots
uint16_t characterSlots
Definition:
logindata.h:77
LoginData::newPassword
std::string newPassword
Definition:
logindata.h:61
LoginData::updateType
UpdateTypeT updateType
Definition:
logindata.h:65
LoginData::captchaResponse
std::string captchaResponse
Definition:
logindata.h:68
LoginData::resetCharacterSlots
void resetCharacterSlots()
Definition:
logindata.h:105
LoginData::remember
bool remember
Definition:
logindata.h:74
LoginData::LoginData
LoginData()
Definition:
logindata.h:38
LoginData::clearUpdateHost
void clearUpdateHost()
Definition:
logindata.h:96
LoginData::registerLogin
bool registerLogin
Definition:
logindata.h:75
gender.h
GenderT
Gender ::T GenderT
Definition:
gender.h:35
localconsts.h
final
#define final
Definition:
localconsts.h:46
A_DELETE_COPY
#define A_DELETE_COPY(func)
Definition:
localconsts.h:53
DeleteItemReason::Normal
@ Normal
Definition:
deleteitemreason.h:29
Gender
Definition:
gender.h:29
Gender::UNSPECIFIED
@ UNSPECIFIED
Definition:
gender.h:33
UpdateType
Definition:
updatetype.h:29
UpdateType::Normal
@ Normal
Definition:
updatetype.h:31
std
Definition:
mseprimitives.h:398
stringvector.h
StringVect
std::vector< std::string > StringVect
Definition:
stringvector.h:29
updatetype.h
UpdateTypeT
UpdateType ::T UpdateTypeT
Definition:
updatetype.h:36
Generated on Wed Mar 17 2021 19:19:09 for ManaPlus by
1.9.1