GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/net/tmwa/charserverhandler.h Lines: 0 6 0.0 %
Date: 2018-05-19 03:07:18 Branches: 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-2018  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_TMWA_CHARSERVERHANDLER_H
24
#define NET_TMWA_CHARSERVERHANDLER_H
25
26
#include "net/ea/charserverhandler.h"
27
28
namespace TmwAthena
29
{
30
31
/**
32
 * Deals with incoming messages from the character server.
33
 */
34
class CharServerHandler final : public Ea::CharServerHandler
35
{
36
    public:
37
        CharServerHandler();
38
39
        A_DELETE_COPY(CharServerHandler)
40
41
        ~CharServerHandler() override final;
42
43
        void chooseCharacter(Net::Character *const character) const
44
                             override final;
45
46
        void newCharacter(const std::string &name,
47
                          const int slot,
48
                          const GenderT gender,
49
                          const int hairstyle,
50
                          const int hairColor,
51
                          const unsigned char race,
52
                          const uint16_t look,
53
                          const STD_VECTOR<int> &stats) const override final;
54
55
        void deleteCharacter(Net::Character *const character,
56
                             const std::string &email) const override final;
57
58
        void renameCharacter(const BeingId id,
59
                             const std::string &newName) const override final;
60
61
        void switchCharacter() const override final;
62
63
        void connect() const override final;
64
65
        void setNewPincode(const BeingId accountId A_UNUSED,
66
                           const std::string &pin A_UNUSED) const
67
                           override final
68
        { }
69
70
        void sendCheckPincode(const BeingId accountId A_UNUSED,
71
                              const std::string &pin A_UNUSED) const
72
                              override final
73
        { }
74
75
        void changePincode(const BeingId accountId A_UNUSED,
76
                           const std::string &oldPin A_UNUSED,
77
                           const std::string &newPin A_UNUSED) const
78
                           override final
79
        { }
80
81
        /**
82
         * Sets the character create dialog. The handler will clean up this
83
         * dialog when a new character is successfully created, and will unlock
84
         * the dialog when a new character failed to be created.
85
         */
86
        void setCharCreateDialog(CharCreateDialog *const window) const
87
                                 override final;
88
89
        void changeSlot(const int oldSlot,
90
                        const int newSlot) const override final;
91
92
        void ping() const override final;
93
94
        unsigned int hatSprite() const override final A_CONST A_WARN_UNUSED;
95
};
96
97
}  // namespace TmwAthena
98
99
#endif  // NET_TMWA_CHARSERVERHANDLER_H