summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-15 17:05:31 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-15 17:05:31 +0300
commit2b20ac0419cdeeebf47dd41c18811b683f06eb4a (patch)
treef9be20d6ca320c9ecb8835c469439a7cb3a7ee3f /src
parent97899e857e2ebe6bf038b8fdfed81fb489d0d0cb (diff)
downloadplus-2b20ac0419cdeeebf47dd41c18811b683f06eb4a.tar.gz
plus-2b20ac0419cdeeebf47dd41c18811b683f06eb4a.tar.bz2
plus-2b20ac0419cdeeebf47dd41c18811b683f06eb4a.tar.xz
plus-2b20ac0419cdeeebf47dd41c18811b683f06eb4a.zip
Add empty familyhandler.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt4
-rw-r--r--src/Makefile.am4
-rw-r--r--src/net/eathena/familyhandler.cpp57
-rw-r--r--src/net/eathena/familyhandler.h45
-rw-r--r--src/net/eathena/generalhandler.cpp5
-rw-r--r--src/net/eathena/generalhandler.h1
-rw-r--r--src/net/familyhandler.h40
-rw-r--r--src/net/net.cpp7
-rw-r--r--src/net/net.h2
-rw-r--r--src/net/tmwa/familyhandler.cpp45
-rw-r--r--src/net/tmwa/familyhandler.h44
-rw-r--r--src/net/tmwa/generalhandler.cpp5
-rw-r--r--src/net/tmwa/generalhandler.h1
13 files changed, 258 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6f6f79a3b..04c146c7e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1287,6 +1287,8 @@ SET(SRCS_TMWA
net/tmwa/charserverhandler.h
net/tmwa/chathandler.cpp
net/tmwa/chathandler.h
+ net/tmwa/familyhandler.cpp
+ net/tmwa/familyhandler.h
net/tmwa/gamehandler.cpp
net/tmwa/gamehandler.h
net/tmwa/generalhandler.cpp
@@ -1347,6 +1349,8 @@ SET(SRCS_EATHENA
net/eathena/charserverhandler.h
net/eathena/chathandler.cpp
net/eathena/chathandler.h
+ net/eathena/familyhandler.cpp
+ net/eathena/familyhandler.h
net/eathena/gamehandler.cpp
net/eathena/gamehandler.h
net/eathena/generalhandler.cpp
diff --git a/src/Makefile.am b/src/Makefile.am
index 8f9ce0d19..2f4f4500f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1217,6 +1217,8 @@ manaplus_SOURCES += \
net/tmwa/charserverhandler.h \
net/tmwa/chathandler.cpp \
net/tmwa/chathandler.h \
+ net/tmwa/familyhandler.cpp \
+ net/tmwa/familyhandler.h \
net/tmwa/gamehandler.cpp \
net/tmwa/gamehandler.h \
net/tmwa/generalhandler.cpp \
@@ -1278,6 +1280,8 @@ manaplus_SOURCES += net/eathena/adminhandler.cpp \
net/eathena/charserverhandler.h \
net/eathena/chathandler.cpp \
net/eathena/chathandler.h \
+ net/eathena/familyhandler.cpp \
+ net/eathena/familyhandler.h \
net/eathena/gamehandler.cpp \
net/eathena/gamehandler.h \
net/eathena/generalhandler.cpp \
diff --git a/src/net/eathena/familyhandler.cpp b/src/net/eathena/familyhandler.cpp
new file mode 100644
index 000000000..76b31ba3d
--- /dev/null
+++ b/src/net/eathena/familyhandler.cpp
@@ -0,0 +1,57 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2011-2014 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/familyhandler.h"
+
+#include "logger.h"
+
+#include "net/ea/eaprotocol.h"
+
+#include "net/eathena/messageout.h"
+#include "net/eathena/protocol.h"
+
+#include "debug.h"
+
+extern Net::FamilyHandler *familyHandler;
+
+namespace EAthena
+{
+
+FamilyHandler::FamilyHandler() :
+ MessageHandler()
+{
+ static const uint16_t _messages[] =
+ {
+ 0
+ };
+ handledMessages = _messages;
+ familyHandler = this;
+}
+
+void FamilyHandler::handleMessage(Net::MessageIn &msg)
+{
+ switch (msg.getId())
+ {
+ default:
+ break;
+ }
+}
+
+} // namespace EAthena
diff --git a/src/net/eathena/familyhandler.h b/src/net/eathena/familyhandler.h
new file mode 100644
index 000000000..2a1e0d907
--- /dev/null
+++ b/src/net/eathena/familyhandler.h
@@ -0,0 +1,45 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2011-2014 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_FAMILYHANDLER_H
+#define NET_EATHENA_FAMILYHANDLER_H
+
+#include "net/familyhandler.h"
+
+#include "net/eathena/messagehandler.h"
+
+namespace EAthena
+{
+class MessageOut;
+
+class FamilyHandler final : public MessageHandler,
+ public Net::FamilyHandler
+{
+ public:
+ FamilyHandler();
+
+ A_DELETE_COPY(FamilyHandler)
+
+ void handleMessage(Net::MessageIn &msg) override final;
+};
+
+} // namespace EAthena
+
+#endif // NET_EATHENA_FAMILYHANDLER_H
diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp
index 72b2d74b0..a6c6b7bca 100644
--- a/src/net/eathena/generalhandler.cpp
+++ b/src/net/eathena/generalhandler.cpp
@@ -46,6 +46,7 @@
#include "net/eathena/cashshophandler.h"
#include "net/eathena/chathandler.h"
#include "net/eathena/charserverhandler.h"
+#include "net/eathena/familyhandler.h"
#include "net/eathena/gamehandler.h"
#include "net/eathena/guildhandler.h"
#include "net/eathena/inventoryhandler.h"
@@ -100,7 +101,8 @@ GeneralHandler::GeneralHandler() :
mServerFeatures(new ServerFeatures),
mMailHandler(new MailHandler),
mAuctionHandler(new AuctionHandler),
- mCashShopHandler(new CashShopHandler)
+ mCashShopHandler(new CashShopHandler),
+ mFamilyHandler(new FamilyHandler)
{
static const uint16_t _messages[] =
{
@@ -201,6 +203,7 @@ void GeneralHandler::load()
mNetwork->registerHandler(mMailHandler.get());
mNetwork->registerHandler(mAuctionHandler.get());
mNetwork->registerHandler(mCashShopHandler.get());
+ mNetwork->registerHandler(mFamilyHandler.get());
}
void GeneralHandler::reload()
diff --git a/src/net/eathena/generalhandler.h b/src/net/eathena/generalhandler.h
index aed157d9b..20e048cfe 100644
--- a/src/net/eathena/generalhandler.h
+++ b/src/net/eathena/generalhandler.h
@@ -82,6 +82,7 @@ class GeneralHandler final : public MessageHandler,
MessageHandlerPtr mMailHandler;
MessageHandlerPtr mAuctionHandler;
MessageHandlerPtr mCashShopHandler;
+ MessageHandlerPtr mFamilyHandler;
};
} // namespace EAthena
diff --git a/src/net/familyhandler.h b/src/net/familyhandler.h
new file mode 100644
index 000000000..4b522d24a
--- /dev/null
+++ b/src/net/familyhandler.h
@@ -0,0 +1,40 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2011-2014 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_FAMILYHANDLER_H
+#define NET_FAMILYHANDLER_H
+
+#include <string>
+
+#include "localconsts.h"
+
+namespace Net
+{
+
+class FamilyHandler notfinal
+{
+ public:
+ virtual ~FamilyHandler()
+ { }
+};
+
+} // namespace Net
+
+#endif // NET_FAMILYHANDLER_H
diff --git a/src/net/net.cpp b/src/net/net.cpp
index 4ef6c6ea6..d8e5c10cf 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -56,6 +56,7 @@ Net::ServerFeatures *serverFeatures = nullptr;
Net::MailHandler *mailHandler = nullptr;
Net::AuctionHandler *auctionHandler = nullptr;
Net::CashShopHandler *cashShopHandler = nullptr;
+Net::FamilyHandler *familyHandler = nullptr;
Net::AdminHandler *Net::getAdminHandler()
{
@@ -157,6 +158,12 @@ Net::CashShopHandler *Net::getCashShopHandler()
return cashShopHandler;
}
+Net::FamilyHandler *Net::getFamilyHandler()
+{
+ return familyHandler;
+}
+
+
namespace Net
{
ServerInfo::Type networkType = ServerInfo::UNKNOWN;
diff --git a/src/net/net.h b/src/net/net.h
index ade184a81..a35cfb972 100644
--- a/src/net/net.h
+++ b/src/net/net.h
@@ -42,6 +42,7 @@ class BeingHandler;
class CashShopHandler;
class CharServerHandler;
class ChatHandler;
+class FamilyHandler;
class GameHandler;
class GeneralHandler;
class GuildHandler;
@@ -77,6 +78,7 @@ ServerFeatures *getServerFeatures() A_WARN_UNUSED;
MailHandler *getMailHandler() A_WARN_UNUSED;
AuctionHandler *getAuctionHandler() A_WARN_UNUSED;
CashShopHandler *getCashShopHandler() A_WARN_UNUSED;
+FamilyHandler *getFamilyHandler() A_WARN_UNUSED;
ServerInfo::Type getNetworkType() A_WARN_UNUSED;
diff --git a/src/net/tmwa/familyhandler.cpp b/src/net/tmwa/familyhandler.cpp
new file mode 100644
index 000000000..0b372e939
--- /dev/null
+++ b/src/net/tmwa/familyhandler.cpp
@@ -0,0 +1,45 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2011-2014 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/familyhandler.h"
+
+#include "debug.h"
+
+extern Net::FamilyHandler *familyHandler;
+
+namespace TmwAthena
+{
+
+FamilyHandler::FamilyHandler() :
+ MessageHandler()
+{
+ static const uint16_t _messages[] =
+ {
+ 0
+ };
+ handledMessages = _messages;
+ familyHandler = this;
+}
+
+void FamilyHandler::handleMessage(Net::MessageIn &msg A_UNUSED)
+{
+}
+
+} // namespace TmwAthena
diff --git a/src/net/tmwa/familyhandler.h b/src/net/tmwa/familyhandler.h
new file mode 100644
index 000000000..14ef0a1a5
--- /dev/null
+++ b/src/net/tmwa/familyhandler.h
@@ -0,0 +1,44 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2011-2014 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_FAMILYHANDLER_H
+#define NET_TMWA_FAMILYHANDLER_H
+
+#include "net/familyhandler.h"
+
+#include "net/tmwa/messagehandler.h"
+
+namespace TmwAthena
+{
+
+class FamilyHandler final : public MessageHandler,
+ public Net::FamilyHandler
+{
+ public:
+ FamilyHandler();
+
+ A_DELETE_COPY(FamilyHandler)
+
+ void handleMessage(Net::MessageIn &msg) override final;
+};
+
+} // namespace TmwAthena
+
+#endif // NET_TMWA_FAMILYHANDLER_H
diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp
index f8f1a1b19..85c7da7c9 100644
--- a/src/net/tmwa/generalhandler.cpp
+++ b/src/net/tmwa/generalhandler.cpp
@@ -46,6 +46,7 @@
#include "net/tmwa/cashshophandler.h"
#include "net/tmwa/chathandler.h"
#include "net/tmwa/charserverhandler.h"
+#include "net/tmwa/familyhandler.h"
#include "net/tmwa/gamehandler.h"
#include "net/tmwa/guildhandler.h"
#include "net/tmwa/inventoryhandler.h"
@@ -100,7 +101,8 @@ GeneralHandler::GeneralHandler() :
mServerFeatures(new ServerFeatures),
mMailHandler(new MailHandler),
mAuctionHandler(new AuctionHandler),
- mCashShopHandler(new CashShopHandler)
+ mCashShopHandler(new CashShopHandler),
+ mFamilyHandler(new FamilyHandler)
{
static const uint16_t _messages[] =
{
@@ -217,6 +219,7 @@ void GeneralHandler::load()
mNetwork->registerHandler(mMailHandler.get());
mNetwork->registerHandler(mAuctionHandler.get());
mNetwork->registerHandler(mCashShopHandler.get());
+ mNetwork->registerHandler(mFamilyHandler.get());
}
void GeneralHandler::reload()
diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h
index ec9679b4a..820a996f2 100644
--- a/src/net/tmwa/generalhandler.h
+++ b/src/net/tmwa/generalhandler.h
@@ -82,6 +82,7 @@ class GeneralHandler final : public MessageHandler,
MessageHandlerPtr mMailHandler;
MessageHandlerPtr mAuctionHandler;
MessageHandlerPtr mCashShopHandler;
+ MessageHandlerPtr mFamilyHandler;
};
} // namespace TmwAthena