From 0255911fce07d79d29684f9837f96a4c824f4040 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 7 Jan 2015 17:32:13 +0300 Subject: Add empty searchstorehandler. --- src/net/tmwa/generalhandler.cpp | 5 +++- src/net/tmwa/generalhandler.h | 1 + src/net/tmwa/searchstorehandler.cpp | 50 +++++++++++++++++++++++++++++++++++++ src/net/tmwa/searchstorehandler.h | 43 +++++++++++++++++++++++++++++++ 4 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 src/net/tmwa/searchstorehandler.cpp create mode 100644 src/net/tmwa/searchstorehandler.h (limited to 'src/net/tmwa') diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp index a34da33dc..359cc5492 100644 --- a/src/net/tmwa/generalhandler.cpp +++ b/src/net/tmwa/generalhandler.cpp @@ -63,6 +63,7 @@ #include "net/tmwa/pethandler.h" #include "net/tmwa/playerhandler.h" #include "net/tmwa/protocol.h" +#include "net/tmwa/searchstorehandler.h" #include "net/tmwa/serverfeatures.h" #include "net/tmwa/tradehandler.h" #include "net/tmwa/skillhandler.h" @@ -115,7 +116,8 @@ GeneralHandler::GeneralHandler() : mFriendsHandler(new FriendsHandler), mElementalHandler(new ElementalHandler), mMarketHandler(new MarketHandler), - mVendingHandler(new VendingHandler) + mVendingHandler(new VendingHandler), + mSearchStoreHandler(new SearchStoreHandler) { static const uint16_t _messages[] = { @@ -243,6 +245,7 @@ void GeneralHandler::load() mNetwork->registerHandler(mElementalHandler); mNetwork->registerHandler(mMarketHandler); mNetwork->registerHandler(mVendingHandler); + mNetwork->registerHandler(mSearchStoreHandler); } void GeneralHandler::reload() diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h index ed1bc983c..01eda4145 100644 --- a/src/net/tmwa/generalhandler.h +++ b/src/net/tmwa/generalhandler.h @@ -93,6 +93,7 @@ class GeneralHandler final : public MessageHandler, MessageHandlerPtr mElementalHandler; MessageHandlerPtr mMarketHandler; MessageHandlerPtr mVendingHandler; + MessageHandlerPtr mSearchStoreHandler; }; } // namespace TmwAthena diff --git a/src/net/tmwa/searchstorehandler.cpp b/src/net/tmwa/searchstorehandler.cpp new file mode 100644 index 000000000..26e35725f --- /dev/null +++ b/src/net/tmwa/searchstorehandler.cpp @@ -0,0 +1,50 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2015 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/searchstorehandler.h" + +#include "debug.h" + +extern Net::SearchStoreHandler *searchStoreHandler; + +namespace TmwAthena +{ + +SearchStoreHandler::SearchStoreHandler() : + MessageHandler() +{ + static const uint16_t _messages[] = + { + 0 + }; + handledMessages = _messages; + searchStoreHandler = this; +} + +void SearchStoreHandler::handleMessage(Net::MessageIn &msg) +{ + switch (msg.getId()) + { + default: + break; + } +} + +} // namespace TmwAthena diff --git a/src/net/tmwa/searchstorehandler.h b/src/net/tmwa/searchstorehandler.h new file mode 100644 index 000000000..f5c00a6c1 --- /dev/null +++ b/src/net/tmwa/searchstorehandler.h @@ -0,0 +1,43 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2015 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_SEARCHSTOREHANDLER_H +#define NET_TMWA_SEARCHSTOREHANDLER_H + +#include "net/searchstorehandler.h" + +#include "net/tmwa/messagehandler.h" + +namespace TmwAthena +{ +class SearchStoreHandler final : public MessageHandler, + public Net::SearchStoreHandler +{ + public: + SearchStoreHandler(); + + A_DELETE_COPY(SearchStoreHandler) + + void handleMessage(Net::MessageIn &msg) override final; +}; + +} // namespace TmwAthena + +#endif // NET_TMWA_SEARCHSTOREHANDLER_H -- cgit v1.2.3-60-g2f50