GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/net/ea/loginhandler.h Lines: 0 2 0.0 %
Date: 2017-11-29 Branches: 0 0 0.0 %

Line Branch Exec Source
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-2017  The ManaPlus Developers
6
 *
7
 *  This file is part of The ManaPlus Client.
8
 *
9
 *  This program is free software; you can redistribute it and/or modify
10
 *  it under the terms of the GNU General Public License as published by
11
 *  the Free Software Foundation; either version 2 of the License, or
12
 *  any later version.
13
 *
14
 *  This program is distributed in the hope that it will be useful,
15
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 *  GNU General Public License for more details.
18
 *
19
 *  You should have received a copy of the GNU General Public License
20
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
 */
22
23
#ifndef NET_EA_LOGINHANDLER_H
24
#define NET_EA_LOGINHANDLER_H
25
26
#include "net/loginhandler.h"
27
28
class LoginData;
29
30
struct Token;
31
32
namespace Ea
33
{
34
35
class LoginHandler notfinal : public Net::LoginHandler
36
{
37
    public:
38
        A_DELETE_COPY(LoginHandler)
39
40
        virtual ~LoginHandler();
41
42
        bool isRegistrationEnabled() const override final A_WARN_UNUSED;
43
44
        void getRegistrationDetails() const override final;
45
46
        unsigned int getMaxPasswordLength() const override A_WARN_UNUSED
47
        { return 24; }
48
49
        void loginAccount(LoginData *const loginData) const override final;
50
51
        void chooseServer(const unsigned int server,
52
                          const bool persistentIp) const override;
53
54
        void registerAccount(const LoginData *const loginData)
55
                             const override final;
56
57
        const Worlds &getWorlds() const override final A_CONST A_WARN_UNUSED;
58
59
        void clearWorlds() const override final;
60
61
        virtual ServerInfo *getCharServer() const A_WARN_UNUSED = 0;
62
63
        const Token &getToken() const A_CONST A_WARN_UNUSED;
64
65
        void logout() const override final A_CONST;
66
67
        void changeEmail(const std::string &email) const
68
                         override final A_CONST;
69
70
        void unregisterAccount(const std::string &username,
71
                               const std::string &password)
72
                               const override final A_CONST;
73
74
        void loginOrRegister(LoginData *const data) const override final;
75
76
    protected:
77
        LoginHandler();
78
79
        virtual void sendLoginRegister(const std::string &username,
80
                                       const std::string &password,
81
                                       const std::string &email) const = 0;
82
};
83
84
}  // namespace Ea
85
86
#endif  // NET_EA_LOGINHANDLER_H