summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-15 13:20:02 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-15 13:20:02 +0300
commit32a344ef8f062c5fd5ec84321b4975ceba1e377d (patch)
tree988f00d2b877144eb5b5fcca7a852a44c2439156 /src
parent42407f169ac67d375cba959bc553ffc186436cba (diff)
downloadplus-32a344ef8f062c5fd5ec84321b4975ceba1e377d.tar.gz
plus-32a344ef8f062c5fd5ec84321b4975ceba1e377d.tar.bz2
plus-32a344ef8f062c5fd5ec84321b4975ceba1e377d.tar.xz
plus-32a344ef8f062c5fd5ec84321b4975ceba1e377d.zip
Add empty auctionhandler.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt5
-rw-r--r--src/Makefile.am5
-rw-r--r--src/net/auctionhandler.h40
-rw-r--r--src/net/eathena/auctionhandler.cpp57
-rw-r--r--src/net/eathena/auctionhandler.h44
-rw-r--r--src/net/eathena/generalhandler.cpp5
-rw-r--r--src/net/eathena/generalhandler.h1
-rw-r--r--src/net/net.cpp6
-rw-r--r--src/net/net.h2
-rw-r--r--src/net/tmwa/auctionhandler.cpp45
-rw-r--r--src/net/tmwa/auctionhandler.h43
-rw-r--r--src/net/tmwa/generalhandler.cpp5
-rw-r--r--src/net/tmwa/generalhandler.h1
13 files changed, 257 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 171ee9245..846fbc9e2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -512,6 +512,7 @@ SET(SRCS
gui/windows/worldselectdialog.cpp
gui/windows/worldselectdialog.h
net/adminhandler.h
+ net/auctionhandler.h
net/character.h
net/charserverhandler.cpp
net/charserverhandler.h
@@ -1274,6 +1275,8 @@ SET(SRCS_TMWA
net/tmwa/adminhandler.cpp
net/tmwa/adminhandler.h
net/tmwa/attrs.h
+ net/tmwa/auctionhandler.cpp
+ net/tmwa/auctionhandler.h
net/tmwa/beinghandler.cpp
net/tmwa/beinghandler.h
net/tmwa/buysellhandler.cpp
@@ -1329,6 +1332,8 @@ SET(SRCS_EATHENA
net/eathena/adminhandler.cpp
net/eathena/adminhandler.h
net/eathena/attrs.h
+ net/eathena/auctionhandler.cpp
+ net/eathena/auctionhandler.h
net/eathena/beinghandler.cpp
net/eathena/beinghandler.h
net/eathena/beingtype.h
diff --git a/src/Makefile.am b/src/Makefile.am
index 38cf3310a..b68e57fb4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -634,6 +634,7 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
gui/windows/worldselectdialog.cpp \
gui/windows/worldselectdialog.h \
net/adminhandler.h \
+ net/auctionhandler.h \
net/beinghandler.h \
net/buysellhandler.h \
net/character.h \
@@ -1203,6 +1204,8 @@ manaplus_SOURCES += \
net/tmwa/adminhandler.cpp \
net/tmwa/adminhandler.h \
net/tmwa/attrs.h \
+ net/tmwa/auctionhandler.cpp \
+ net/tmwa/auctionhandler.h \
net/tmwa/beinghandler.cpp \
net/tmwa/beinghandler.h \
net/tmwa/buysellhandler.cpp \
@@ -1259,6 +1262,8 @@ manaplus_CXXFLAGS += -DEATHENA_SUPPORT
manaplus_SOURCES += net/eathena/adminhandler.cpp \
net/eathena/adminhandler.h \
net/eathena/attrs.h \
+ net/eathena/auctionhandler.cpp \
+ net/eathena/auctionhandler.h \
net/eathena/beinghandler.cpp \
net/eathena/beinghandler.h \
net/eathena/beingtype.h \
diff --git a/src/net/auctionhandler.h b/src/net/auctionhandler.h
new file mode 100644
index 000000000..24dc9a364
--- /dev/null
+++ b/src/net/auctionhandler.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_AUCTIONHANDLER_H
+#define NET_AUCTIONHANDLER_H
+
+#include <string>
+
+#include "localconsts.h"
+
+namespace Net
+{
+
+class AuctionHandler notfinal
+{
+ public:
+ virtual ~AuctionHandler()
+ { }
+};
+
+} // namespace Net
+
+#endif // NET_AUCTIONHANDLER_H
diff --git a/src/net/eathena/auctionhandler.cpp b/src/net/eathena/auctionhandler.cpp
new file mode 100644
index 000000000..bf544f822
--- /dev/null
+++ b/src/net/eathena/auctionhandler.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/auctionhandler.h"
+
+#include "logger.h"
+
+#include "net/ea/eaprotocol.h"
+
+#include "net/eathena/messageout.h"
+#include "net/eathena/protocol.h"
+
+#include "debug.h"
+
+extern Net::AuctionHandler *auctionHandler;
+
+namespace EAthena
+{
+
+AuctionHandler::AuctionHandler() :
+ MessageHandler()
+{
+ static const uint16_t _messages[] =
+ {
+ 0
+ };
+ handledMessages = _messages;
+ auctionHandler = this;
+}
+
+void AuctionHandler::handleMessage(Net::MessageIn &msg)
+{
+ switch (msg.getId())
+ {
+ default:
+ break;
+ }
+}
+
+} // namespace EAthena
diff --git a/src/net/eathena/auctionhandler.h b/src/net/eathena/auctionhandler.h
new file mode 100644
index 000000000..e4a20d77a
--- /dev/null
+++ b/src/net/eathena/auctionhandler.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_EATHENA_AUCTIONHANDLER_H
+#define NET_EATHENA_AUCTIONHANDLER_H
+
+#include "net/auctionhandler.h"
+
+#include "net/eathena/messagehandler.h"
+
+namespace EAthena
+{
+class MessageOut;
+
+class AuctionHandler final : public MessageHandler, public Net::AuctionHandler
+{
+ public:
+ AuctionHandler();
+
+ A_DELETE_COPY(AuctionHandler)
+
+ void handleMessage(Net::MessageIn &msg) override final;
+};
+
+} // namespace EAthena
+
+#endif // NET_EATHENA_AUCTIONHANDLER_H
diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp
index c9f319fea..e55ff51ff 100644
--- a/src/net/eathena/generalhandler.cpp
+++ b/src/net/eathena/generalhandler.cpp
@@ -40,6 +40,7 @@
#include "net/eathena/adminhandler.h"
#include "net/eathena/attrs.h"
+#include "net/eathena/auctionhandler.h"
#include "net/eathena/beinghandler.h"
#include "net/eathena/buysellhandler.h"
#include "net/eathena/chathandler.h"
@@ -96,7 +97,8 @@ GeneralHandler::GeneralHandler() :
mTradeHandler(new TradeHandler),
mQuestHandler(new QuestHandler),
mServerFeatures(new ServerFeatures),
- mMailHandler(new MailHandler)
+ mMailHandler(new MailHandler),
+ mAuctionHandler(new AuctionHandler)
{
static const uint16_t _messages[] =
{
@@ -195,6 +197,7 @@ void GeneralHandler::load()
mNetwork->registerHandler(mPetHandler.get());
mNetwork->registerHandler(mQuestHandler.get());
mNetwork->registerHandler(mMailHandler.get());
+ mNetwork->registerHandler(mAuctionHandler.get());
}
void GeneralHandler::reload()
diff --git a/src/net/eathena/generalhandler.h b/src/net/eathena/generalhandler.h
index 8c913a076..440273ce0 100644
--- a/src/net/eathena/generalhandler.h
+++ b/src/net/eathena/generalhandler.h
@@ -80,6 +80,7 @@ class GeneralHandler final : public MessageHandler,
MessageHandlerPtr mQuestHandler;
ServerFeatures *mServerFeatures;
MessageHandlerPtr mMailHandler;
+ MessageHandlerPtr mAuctionHandler;
};
} // namespace EAthena
diff --git a/src/net/net.cpp b/src/net/net.cpp
index aee279a58..79c1bffdd 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -54,6 +54,7 @@ Net::BeingHandler *beingHandler = nullptr;
Net::BuySellHandler *buySellHandler = nullptr;
Net::ServerFeatures *serverFeatures = nullptr;
Net::MailHandler *mailHandler = nullptr;
+Net::AuctionHandler *auctionHandler = nullptr;
Net::AdminHandler *Net::getAdminHandler()
{
@@ -145,6 +146,11 @@ Net::MailHandler *Net::getMailHandler()
return mailHandler;
}
+Net::AuctionHandler *Net::getAuctionHandler()
+{
+ return auctionHandler;
+}
+
namespace Net
{
ServerInfo::Type networkType = ServerInfo::UNKNOWN;
diff --git a/src/net/net.h b/src/net/net.h
index 0189daaf0..fef1b5315 100644
--- a/src/net/net.h
+++ b/src/net/net.h
@@ -37,6 +37,7 @@ namespace Net
{
class AdminHandler;
+class AuctionHandler;
class BeingHandler;
class CharServerHandler;
class ChatHandler;
@@ -73,6 +74,7 @@ TradeHandler *getTradeHandler() A_WARN_UNUSED;
BuySellHandler *getBuySellHandler() A_WARN_UNUSED;
ServerFeatures *getServerFeatures() A_WARN_UNUSED;
MailHandler *getMailHandler() A_WARN_UNUSED;
+AuctionHandler *getAuctionHandler() A_WARN_UNUSED;
ServerInfo::Type getNetworkType() A_WARN_UNUSED;
diff --git a/src/net/tmwa/auctionhandler.cpp b/src/net/tmwa/auctionhandler.cpp
new file mode 100644
index 000000000..2e7cbc264
--- /dev/null
+++ b/src/net/tmwa/auctionhandler.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/auctionhandler.h"
+
+#include "debug.h"
+
+extern Net::AuctionHandler *auctionHandler;
+
+namespace TmwAthena
+{
+
+AuctionHandler::AuctionHandler() :
+ MessageHandler()
+{
+ static const uint16_t _messages[] =
+ {
+ 0
+ };
+ handledMessages = _messages;
+ auctionHandler = this;
+}
+
+void AuctionHandler::handleMessage(Net::MessageIn &msg A_UNUSED)
+{
+}
+
+} // namespace TmwAthena
diff --git a/src/net/tmwa/auctionhandler.h b/src/net/tmwa/auctionhandler.h
new file mode 100644
index 000000000..94c9ea3fc
--- /dev/null
+++ b/src/net/tmwa/auctionhandler.h
@@ -0,0 +1,43 @@
+/*
+ * 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_AUCTIONHANDLER_H
+#define NET_TMWA_AUCTIONHANDLER_H
+
+#include "net/auctionhandler.h"
+
+#include "net/tmwa/messagehandler.h"
+
+namespace TmwAthena
+{
+
+class AuctionHandler final : public MessageHandler, public Net::AuctionHandler
+{
+ public:
+ AuctionHandler();
+
+ A_DELETE_COPY(AuctionHandler)
+
+ void handleMessage(Net::MessageIn &msg) override final;
+};
+
+} // namespace TmwAthena
+
+#endif // NET_TMWA_AUCTIONHANDLER_H
diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp
index c683c220d..dabf4efce 100644
--- a/src/net/tmwa/generalhandler.cpp
+++ b/src/net/tmwa/generalhandler.cpp
@@ -40,6 +40,7 @@
#include "net/tmwa/adminhandler.h"
#include "net/tmwa/attrs.h"
+#include "net/tmwa/auctionhandler.h"
#include "net/tmwa/beinghandler.h"
#include "net/tmwa/buysellhandler.h"
#include "net/tmwa/chathandler.h"
@@ -96,7 +97,8 @@ GeneralHandler::GeneralHandler() :
mTradeHandler(new TradeHandler),
mQuestHandler(new QuestHandler),
mServerFeatures(new ServerFeatures),
- mMailHandler(new MailHandler)
+ mMailHandler(new MailHandler),
+ mAuctionHandler(new AuctionHandler)
{
static const uint16_t _messages[] =
{
@@ -211,6 +213,7 @@ void GeneralHandler::load()
mNetwork->registerHandler(mPetHandler.get());
mNetwork->registerHandler(mQuestHandler.get());
mNetwork->registerHandler(mMailHandler.get());
+ mNetwork->registerHandler(mAuctionHandler.get());
}
void GeneralHandler::reload()
diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h
index c4c04af63..5a7bed57b 100644
--- a/src/net/tmwa/generalhandler.h
+++ b/src/net/tmwa/generalhandler.h
@@ -80,6 +80,7 @@ class GeneralHandler final : public MessageHandler,
MessageHandlerPtr mQuestHandler;
ServerFeatures *mServerFeatures;
MessageHandlerPtr mMailHandler;
+ MessageHandlerPtr mAuctionHandler;
};
} // namespace TmwAthena