From a12b573538c7816ba3f79cc0c67fc98614e1fdc2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 10 Aug 2017 23:53:20 +0300 Subject: Add empty mail2handler. --- src/net/eathena/generalhandler.cpp | 3 +++ src/net/eathena/generalhandler.h | 2 ++ src/net/eathena/mail2handler.cpp | 38 ++++++++++++++++++++++++++++++ src/net/eathena/mail2handler.h | 41 +++++++++++++++++++++++++++++++++ src/net/mail2handler.h | 47 ++++++++++++++++++++++++++++++++++++++ src/net/net.cpp | 2 ++ src/net/tmwa/generalhandler.cpp | 3 +++ src/net/tmwa/generalhandler.h | 2 ++ src/net/tmwa/mail2handler.cpp | 38 ++++++++++++++++++++++++++++++ src/net/tmwa/mail2handler.h | 41 +++++++++++++++++++++++++++++++++ 10 files changed, 217 insertions(+) create mode 100644 src/net/eathena/mail2handler.cpp create mode 100644 src/net/eathena/mail2handler.h create mode 100644 src/net/mail2handler.h create mode 100644 src/net/tmwa/mail2handler.cpp create mode 100644 src/net/tmwa/mail2handler.h (limited to 'src/net') 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 . + */ + +#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 . + */ + +#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 . + */ + +#ifndef NET_MAIL2HANDLER_H +#define NET_MAIL2HANDLER_H + +#include + +#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 . + */ + +#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 . + */ + +#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 -- cgit v1.2.3-60-g2f50