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

Line Branch Exec Source
1
/*
2
 *  The ManaPlus Client
3
 *  Copyright (C) 2008  Lloyd Bryant <[email protected]>
4
 *  Copyright (C) 2011-2017  The ManaPlus Developers
5
 *
6
 *  This file is part of The ManaPlus Client.
7
 *
8
 *  This program is free software; you can redistribute it and/or modify
9
 *  it under the terms of the GNU General Public License as published by
10
 *  the Free Software Foundation; either version 2 of the License, or
11
 *  any later version.
12
 *
13
 *  This program is distributed in the hope that it will be useful,
14
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 *  GNU General Public License for more details.
17
 *
18
 *  You should have received a copy of the GNU General Public License
19
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
 */
21
22
#include "net/ea/partyhandler.h"
23
24
#include "party.h"
25
26
#include "net/ea/partyrecv.h"
27
28
#include "gui/widgets/tabs/chat/partytab.h"
29
30
#include "utils/delete2.h"
31
32
#include "debug.h"
33
34
namespace Ea
35
{
36
37
PartyHandler::PartyHandler() :
38
    Net::PartyHandler()
39
{
40
    PartyRecv::mShareExp = PartyShare::UNKNOWN;
41
    PartyRecv::mShareItems = PartyShare::UNKNOWN;
42
    taParty = Party::getParty(1);
43
}
44
45
PartyHandler::~PartyHandler()
46
{
47
    delete2(partyTab);
48
    taParty = nullptr;
49
}
50
51
void PartyHandler::join(const int partyId A_UNUSED) const
52
{
53
}
54
55
void PartyHandler::reload()
56
{
57
    taParty = Party::getParty(1);
58
}
59
60
void PartyHandler::clear() const
61
{
62
    taParty = nullptr;
63
}
64
65
ChatTab *PartyHandler::getTab() const
66
{
67
    return partyTab;
68
}
69
70
PartyShareT PartyHandler::getShareExperience() const
71
{
72
    return PartyRecv::mShareExp;
73
}
74
75
PartyShareT PartyHandler::getShareItems() const
76
{
77
    return PartyRecv::mShareItems;
78
}
79
80
}  // namespace Ea