ManaPlus
mail2handler.h
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2011-2019 The ManaPlus Developers
4  * Copyright (C) 2019-2021 Andrei Karas
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 #ifndef NET_MAIL2HANDLER_H
23 #define NET_MAIL2HANDLER_H
24 
25 #include "enums/net/mailopentype.h"
26 
28 
29 #include <string>
30 
31 #include "localconsts.h"
32 
33 class Item;
34 
35 namespace Net
36 {
37 
39 {
40  public:
42  { }
43 
45 
46  virtual ~Mail2Handler()
47  { }
48 
49  virtual void openWriteMail(const std::string &receiver) const = 0;
50 
51  virtual void addItem(const Item *const item,
52  const int amount) const = 0;
53 
54  virtual void removeItem(const int index,
55  const int amount) const = 0;
56 
57  virtual void sendMail(const std::string &to,
58  const std::string &title,
59  const std::string &body,
60  const int64_t &money) const = 0;
61 
62  virtual void queueCheckName(const MailQueueTypeT type,
63  const std::string &to,
64  const std::string &title,
65  const std::string &body,
66  const int64_t &money) const = 0;
67 
68  virtual void nextPage(const MailOpenTypeT openType,
69  const int64_t mailId) const = 0;
70 
71  virtual void readMail(const MailOpenTypeT openType,
72  const int64_t mailId) const = 0;
73 
74  virtual void deleteMail(const MailOpenTypeT openType,
75  const int64_t mailId) const = 0;
76 
77  virtual void requestMoney(const MailOpenTypeT openType,
78  const int64_t mailId) const = 0;
79 
80  virtual void requestItems(const MailOpenTypeT openType,
81  const int64_t mailId) const = 0;
82 
83  virtual void refreshMailList(const MailOpenTypeT openType,
84  const int64_t mailId) const = 0;
85 
86  virtual void openMailBox(const MailOpenTypeT openType) const = 0;
87 
88  virtual void closeMailBox() const = 0;
89 
90  virtual void cancelWriteMail() const = 0;
91 
92  virtual void requestCheckName(const std::string &name) const = 0;
93 
94  virtual std::string getCheckedName() const = 0;
95 };
96 
97 } // namespace Net
98 
100 
101 #endif // NET_MAIL2HANDLER_H
Definition: item.h:50
virtual void closeMailBox() const =0
virtual void requestItems(const MailOpenTypeT openType, const int64_t mailId) const =0
virtual void addItem(const Item *const item, const int amount) const =0
virtual void requestMoney(const MailOpenTypeT openType, const int64_t mailId) const =0
virtual void openMailBox(const MailOpenTypeT openType) const =0
virtual void refreshMailList(const MailOpenTypeT openType, const int64_t mailId) const =0
virtual void openWriteMail(const std::string &receiver) const =0
virtual std::string getCheckedName() const =0
virtual void queueCheckName(const MailQueueTypeT type, const std::string &to, const std::string &title, const std::string &body, const int64_t &money) const =0
virtual void deleteMail(const MailOpenTypeT openType, const int64_t mailId) const =0
virtual void sendMail(const std::string &to, const std::string &title, const std::string &body, const int64_t &money) const =0
virtual void removeItem(const int index, const int amount) const =0
virtual void requestCheckName(const std::string &name) const =0
virtual void readMail(const MailOpenTypeT openType, const int64_t mailId) const =0
virtual void cancelWriteMail() const =0
virtual void nextPage(const MailOpenTypeT openType, const int64_t mailId) const =0
#define notfinal
Definition: localconsts.h:261
#define A_DELETE_COPY(func)
Definition: localconsts.h:53
Net::Mail2Handler * mail2Handler
Definition: net.cpp:113
MailOpenType ::T MailOpenTypeT
Definition: mailopentype.h:33
MailQueueType ::T MailQueueTypeT
Definition: mailqueuetype.h:34