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

Line Branch Exec Source
1
/*
2
 *  The ManaPlus Client
3
 *  Copyright (C) 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_PARTYHANDLER_H
24
#define NET_PARTYHANDLER_H
25
26
#include "localconsts.h"
27
28
#include "enums/net/partyshare.h"
29
30
#include "gui/widgets/tabs/chat/chattab.h"
31
32
class Being;
33
34
namespace Net
35
{
36
37
class PartyHandler notfinal
38
{
39
    public:
40
        PartyHandler()
41
        { }
42
43
        A_DELETE_COPY(PartyHandler)
44
45
        virtual ~PartyHandler()
46
        { }
47
48
        virtual void create(const std::string &name) const = 0;
49
50
        virtual void join(const int partyId) const = 0;
51
52
        virtual void invite(const std::string &name) const = 0;
53
54
        virtual void leave() const = 0;
55
56
        virtual void kick(const Being *const player) const = 0;
57
58
        virtual void kick(const std::string &name) const = 0;
59
60
        virtual void chat(const std::string &text) const = 0;
61
62
        virtual PartyShareT getShareExperience() const A_WARN_UNUSED = 0;
63
64
        virtual void setShareExperience(const PartyShareT share) const = 0;
65
66
        virtual PartyShareT getShareItems() const A_WARN_UNUSED = 0;
67
68
        virtual void setShareItems(const PartyShareT share) const = 0;
69
70
        virtual PartyShareT getShareAutoItems() const A_WARN_UNUSED = 0;
71
72
        virtual void setShareAutoItems(const PartyShareT share) const = 0;
73
74
        virtual void changeLeader(const std::string &name) const = 0;
75
76
        virtual void allowInvite(const bool allow) const = 0;
77
78
        virtual void clear() const = 0;
79
80
        virtual void inviteResponse(const int partyId,
81
                                    const bool accept) const = 0;
82
83
        virtual ChatTab *getTab() const = 0;
84
};
85
86
}  // namespace Net
87
88
extern Net::PartyHandler *partyHandler;
89
90
#endif  // NET_PARTYHANDLER_H