summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/CMakeLists.txt5
-rw-r--r--src/Makefile.am5
-rw-r--r--src/net/eathena/generalhandler.cpp3
-rw-r--r--src/net/eathena/generalhandler.h2
-rw-r--r--src/net/eathena/mail2handler.cpp38
-rw-r--r--src/net/eathena/mail2handler.h41
-rw-r--r--src/net/mail2handler.h47
-rw-r--r--src/net/net.cpp2
-rw-r--r--src/net/tmwa/generalhandler.cpp3
-rw-r--r--src/net/tmwa/generalhandler.h2
-rw-r--r--src/net/tmwa/mail2handler.cpp38
-rw-r--r--src/net/tmwa/mail2handler.h41
12 files changed, 227 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8eddf51e1..d4bfb4534 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1522,6 +1522,7 @@ SET(SRCS
net/homunculushandler.h
net/hostsgroup.h
net/mailhandler.h
+ net/mail2handler.h
net/maphandler.h
net/markethandler.h
net/mercenaryhandler.h
@@ -1612,6 +1613,8 @@ SET(SRCS
net/eathena/loginrecv.h
net/eathena/mailhandler.cpp
net/eathena/mailhandler.h
+ net/eathena/mail2handler.cpp
+ net/eathena/mail2handler.h
net/eathena/mailrecv.cpp
net/eathena/mailrecv.h
net/eathena/maphandler.cpp
@@ -2049,6 +2052,8 @@ SET(SRCS_TMWA
net/tmwa/homunculushandler.h
net/tmwa/mailhandler.cpp
net/tmwa/mailhandler.h
+ net/tmwa/mail2handler.cpp
+ net/tmwa/mail2handler.h
net/tmwa/maphandler.cpp
net/tmwa/maphandler.h
net/tmwa/markethandler.cpp
diff --git a/src/Makefile.am b/src/Makefile.am
index 88478e3c5..d52b6bac8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1750,6 +1750,8 @@ SRC += \
net/tmwa/homunculushandler.h \
net/tmwa/mailhandler.cpp \
net/tmwa/mailhandler.h \
+ net/tmwa/mail2handler.cpp \
+ net/tmwa/mail2handler.h \
net/tmwa/maphandler.cpp \
net/tmwa/maphandler.h \
net/tmwa/markethandler.cpp \
@@ -1811,6 +1813,7 @@ SRC += gui/windows/bankwindow.cpp \
net/homunculushandler.h \
net/hostsgroup.h \
net/mailhandler.h \
+ net/mail2handler.h \
net/maphandler.h \
net/markethandler.h \
net/mercenaryhandler.h \
@@ -1901,6 +1904,8 @@ SRC += gui/windows/bankwindow.cpp \
net/eathena/loginrecv.h \
net/eathena/mailhandler.cpp \
net/eathena/mailhandler.h \
+ net/eathena/mail2handler.cpp \
+ net/eathena/mail2handler.h \
net/eathena/mailrecv.cpp \
net/eathena/mailrecv.h \
net/eathena/maphandler.cpp \
diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp
index 9758b8a7d..0557c652b 100644
--- a/src/net/eathena/generalhandler.cpp
+++ b/src/net/eathena/generalhandler.cpp
@@ -51,6 +51,7 @@
#include "net/eathena/itemhandler.h"
#include "net/eathena/loginhandler.h"
#include "net/eathena/maphandler.h"
+#include "net/eathena/mail2handler.h"
#include "net/eathena/mailhandler.h"
#include "net/eathena/markethandler.h"
#include "net/eathena/mercenaryhandler.h"
@@ -94,6 +95,7 @@ GeneralHandler::GeneralHandler() :
mTradeHandler(new TradeHandler),
mQuestHandler(new QuestHandler),
mServerFeatures(new ServerFeatures),
+ mMail2Handler(new Mail2Handler),
mMailHandler(new MailHandler),
mAuctionHandler(new AuctionHandler),
mCashShopHandler(new CashShopHandler),
@@ -136,6 +138,7 @@ GeneralHandler::~GeneralHandler()
delete2(mTradeHandler);
delete2(mQuestHandler);
delete2(mServerFeatures);
+ delete2(mMail2Handler);
delete2(mMailHandler);
delete2(mAuctionHandler);
delete2(mCashShopHandler);
diff --git a/src/net/eathena/generalhandler.h b/src/net/eathena/generalhandler.h
index 032127bb4..c4ff43402 100644
--- a/src/net/eathena/generalhandler.h
+++ b/src/net/eathena/generalhandler.h
@@ -56,6 +56,7 @@ class FamilyHandler;
class FriendsHandler;
class HomunculusHandler;
class MailHandler;
+class Mail2Handler;
class MapHandler;
class MarketHandler;
class MercenaryHandler;
@@ -109,6 +110,7 @@ class GeneralHandler final : public Net::GeneralHandler
TradeHandler *mTradeHandler;
QuestHandler *mQuestHandler;
ServerFeatures *mServerFeatures;
+ Mail2Handler *mMail2Handler;
MailHandler *mMailHandler;
AuctionHandler *mAuctionHandler;
CashShopHandler *mCashShopHandler;
diff --git a/src/net/eathena/mail2handler.cpp b/src/net/eathena/mail2handler.cpp
new file mode 100644
index 000000000..f6a3c88ca
--- /dev/null
+++ b/src/net/eathena/mail2handler.cpp
@@ -0,0 +1,38 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2011-2017 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "net/eathena/mail2handler.h"
+
+#include "debug.h"
+
+namespace EAthena
+{
+
+Mail2Handler::Mail2Handler()
+{
+ mail2Handler = this;
+}
+
+Mail2Handler::~Mail2Handler()
+{
+ mail2Handler = nullptr;
+}
+
+} // namespace EAthena
diff --git a/src/net/eathena/mail2handler.h b/src/net/eathena/mail2handler.h
new file mode 100644
index 000000000..41004c72c
--- /dev/null
+++ b/src/net/eathena/mail2handler.h
@@ -0,0 +1,41 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2011-2017 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NET_EATHENA_MAIL2HANDLER_H
+#define NET_EATHENA_MAIL2HANDLER_H
+
+#include "net/mail2handler.h"
+
+namespace EAthena
+{
+
+class Mail2Handler final : public Net::Mail2Handler
+{
+ public:
+ Mail2Handler();
+
+ A_DELETE_COPY(Mail2Handler)
+
+ ~Mail2Handler();
+};
+
+} // namespace EAthena
+
+#endif // NET_EATHENA_MAIL2HANDLER_H
diff --git a/src/net/mail2handler.h b/src/net/mail2handler.h
new file mode 100644
index 000000000..41fc17d57
--- /dev/null
+++ b/src/net/mail2handler.h
@@ -0,0 +1,47 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2011-2017 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NET_MAIL2HANDLER_H
+#define NET_MAIL2HANDLER_H
+
+#include <string>
+
+#include "localconsts.h"
+
+namespace Net
+{
+
+class Mail2Handler notfinal
+{
+ public:
+ Mail2Handler()
+ { }
+
+ A_DELETE_COPY(Mail2Handler)
+
+ virtual ~Mail2Handler()
+ { }
+};
+
+} // namespace Net
+
+extern Net::Mail2Handler *mail2Handler;
+
+#endif // NET_MAIL2HANDLER_H
diff --git a/src/net/net.cpp b/src/net/net.cpp
index 02bfd06ce..8b7b206ba 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -47,6 +47,7 @@ namespace Net
class FamilyHandler;
class FriendsHandler;
class HomunculusHandler;
+ class Mail2Handler;
class MailHandler;
class MapHandler;
class MarketHandler;
@@ -98,6 +99,7 @@ Net::ElementalHandler *elementalHandler = nullptr;
Net::FamilyHandler *familyHandler = nullptr;
Net::FriendsHandler *friendsHandler = nullptr;
Net::HomunculusHandler *homunculusHandler = nullptr;
+Net::Mail2Handler *mail2Handler = nullptr;
Net::MailHandler *mailHandler = nullptr;
Net::MapHandler *mapHandler = nullptr;
Net::MarketHandler *marketHandler = nullptr;
diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp
index 9f47c20ba..6546bf23a 100644
--- a/src/net/tmwa/generalhandler.cpp
+++ b/src/net/tmwa/generalhandler.cpp
@@ -59,6 +59,7 @@
#include "net/tmwa/familyhandler.h"
#include "net/tmwa/friendshandler.h"
#include "net/tmwa/homunculushandler.h"
+#include "net/tmwa/mail2handler.h"
#include "net/tmwa/mailhandler.h"
#include "net/tmwa/maphandler.h"
#include "net/tmwa/markethandler.h"
@@ -103,6 +104,7 @@ GeneralHandler::GeneralHandler() :
mFamilyHandler(new FamilyHandler),
mFriendsHandler(new FriendsHandler),
mHomunculusHandler(new HomunculusHandler),
+ mMail2Handler(new Mail2Handler),
mMailHandler(new MailHandler),
mMapHandler(new MapHandler),
mMarketHandler(new MarketHandler),
@@ -145,6 +147,7 @@ GeneralHandler::~GeneralHandler()
delete2(mFamilyHandler);
delete2(mFriendsHandler);
delete2(mHomunculusHandler);
+ delete2(mMail2Handler);
delete2(mMailHandler);
delete2(mMapHandler);
delete2(mMarketHandler);
diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h
index d8aeb8efa..818cb4be3 100644
--- a/src/net/tmwa/generalhandler.h
+++ b/src/net/tmwa/generalhandler.h
@@ -54,6 +54,7 @@ class ElementalHandler;
class FamilyHandler;
class FriendsHandler;
class HomunculusHandler;
+class Mail2Handler;
class MailHandler;
class MapHandler;
class MarketHandler;
@@ -117,6 +118,7 @@ class GeneralHandler final : public Net::GeneralHandler
FamilyHandler *mFamilyHandler;
FriendsHandler *mFriendsHandler;
HomunculusHandler *mHomunculusHandler;
+ Mail2Handler *mMail2Handler;
MailHandler *mMailHandler;
MapHandler *mMapHandler;
MarketHandler *mMarketHandler;
diff --git a/src/net/tmwa/mail2handler.cpp b/src/net/tmwa/mail2handler.cpp
new file mode 100644
index 000000000..51d530c3a
--- /dev/null
+++ b/src/net/tmwa/mail2handler.cpp
@@ -0,0 +1,38 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2011-2017 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "net/tmwa/mail2handler.h"
+
+#include "debug.h"
+
+namespace TmwAthena
+{
+
+Mail2Handler::Mail2Handler()
+{
+ mail2Handler = this;
+}
+
+Mail2Handler::~Mail2Handler()
+{
+ mail2Handler = nullptr;
+}
+
+} // namespace TmwAthena
diff --git a/src/net/tmwa/mail2handler.h b/src/net/tmwa/mail2handler.h
new file mode 100644
index 000000000..f130a1822
--- /dev/null
+++ b/src/net/tmwa/mail2handler.h
@@ -0,0 +1,41 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2011-2017 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NET_TMWA_MAIL2HANDLER_H
+#define NET_TMWA_MAIL2HANDLER_H
+
+#include "net/mail2handler.h"
+
+namespace TmwAthena
+{
+
+class Mail2Handler final : public Net::Mail2Handler
+{
+ public:
+ Mail2Handler();
+
+ A_DELETE_COPY(Mail2Handler)
+
+ ~Mail2Handler();
+};
+
+} // namespace TmwAthena
+
+#endif // NET_TMWA_MAIL2HANDLER_H