GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/net/tmwa/charserverhandler.h Lines: 0 4 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_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();
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
                             A_CONST;
61
62
        void switchCharacter() const override final;
63
64
        void connect() const override final;
65
66
        bool isNeedCreatePin() const override final
67
        { return false; }
68
69
        void setNewPincode(const std::string &pin A_UNUSED) const
70
                           override final
71
        { }
72
73
        /**
74
         * Sets the character create dialog. The handler will clean up this
75
         * dialog when a new character is successfully created, and will unlock
76
         * the dialog when a new character failed to be created.
77
         */
78
        void setCharCreateDialog(CharCreateDialog *const window) const
79
                                 override final;
80
81
        void changeSlot(const int oldSlot,
82
                        const int newSlot) const override final A_CONST;
83
84
        void ping() const override final A_CONST;
85
86
        unsigned int hatSprite() const override final A_CONST A_WARN_UNUSED;
87
};
88
89
}  // namespace TmwAthena
90
91
#endif  // NET_TMWA_CHARSERVERHANDLER_H