GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/net/mail2handler.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) 2011-2017  The ManaPlus Developers
4
 *
5
 *  This file is part of The ManaPlus Client.
6
 *
7
 *  This program is free software; you can redistribute it and/or modify
8
 *  it under the terms of the GNU General Public License as published by
9
 *  the Free Software Foundation; either version 2 of the License, or
10
 *  any later version.
11
 *
12
 *  This program is distributed in the hope that it will be useful,
13
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *  GNU General Public License for more details.
16
 *
17
 *  You should have received a copy of the GNU General Public License
18
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
 */
20
21
#ifndef NET_MAIL2HANDLER_H
22
#define NET_MAIL2HANDLER_H
23
24
#include "enums/net/mailopentype.h"
25
26
#include "enums/resources/mailqueuetype.h"
27
28
#include <string>
29
30
#include "localconsts.h"
31
32
class Item;
33
34
namespace Net
35
{
36
37
class Mail2Handler notfinal
38
{
39
    public:
40
        Mail2Handler()
41
        { }
42
43
        A_DELETE_COPY(Mail2Handler)
44
45
        virtual ~Mail2Handler()
46
        { }
47
48
        virtual void openWriteMail(const std::string &receiver) const = 0;
49
50
        virtual void addItem(const Item *const item,
51
                             const int amount) const = 0;
52
53
        virtual void removeItem(const int index,
54
                                const int amount) const = 0;
55
56
        virtual void sendMail(const std::string &to,
57
                              const std::string &title,
58
                              const std::string &body,
59
                              const int64_t &money) const = 0;
60
61
        virtual void queueCheckName(const MailQueueTypeT type,
62
                                    const std::string &to,
63
                                    const std::string &title,
64
                                    const std::string &body,
65
                                    const int64_t &money) const = 0;
66
67
        virtual void nextPage(const MailOpenTypeT openType,
68
                              const int64_t mailId) const = 0;
69
70
        virtual void readMail(const MailOpenTypeT openType,
71
                              const int64_t mailId) const = 0;
72
73
        virtual void deleteMail(const MailOpenTypeT openType,
74
                                const int64_t mailId) const = 0;
75
76
        virtual void requestMoney(const MailOpenTypeT openType,
77
                                  const int64_t mailId) const = 0;
78
79
        virtual void requestItems(const MailOpenTypeT openType,
80
                                  const int64_t mailId) const = 0;
81
82
        virtual void refreshMailList(const MailOpenTypeT openType,
83
                                     const int64_t mailId) const = 0;
84
85
        virtual void openMailBox(const MailOpenTypeT openType) const = 0;
86
87
        virtual void closeMailBox() const = 0;
88
89
        virtual void cancelWriteMail() const = 0;
90
91
        virtual void requestCheckName(const std::string &name) const = 0;
92
93
        virtual std::string getCheckedName() const = 0;
94
};
95
96
}  // namespace Net
97
98
extern Net::Mail2Handler *mail2Handler;
99
100
#endif  // NET_MAIL2HANDLER_H