summaryrefslogtreecommitdiffstats
path: root/src/Common
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common')
-rw-r--r--src/Common/Requests/IdentifyRequest.cpp54
-rw-r--r--src/Common/Requests/IdentifyRequest.h47
-rw-r--r--src/Common/Requests/Makefile.am4
-rw-r--r--src/Common/Requests/Makefile.in8
4 files changed, 5 insertions, 108 deletions
diff --git a/src/Common/Requests/IdentifyRequest.cpp b/src/Common/Requests/IdentifyRequest.cpp
deleted file mode 100644
index 23249cd..0000000
--- a/src/Common/Requests/IdentifyRequest.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * IdentifyRequest.cpp
- *
- * Copyright (C) 2008 Matthias Schiffer <matthias@gamezock.de>
- *
- * 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 3 of the License, or
- * (at your option) 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 "IdentifyRequest.h"
-#include "../RequestManager.h"
-#include <Net/Packet.h>
-
-namespace Mad {
-namespace Common {
-namespace Requests {
-
-bool IdentifyRequest::send(Net::Connection *connection, const std::string &hostname0) {
- IdentifyRequest *request = new IdentifyRequest(hostname0);
-
- if(RequestManager::getRequestManager()->sendRequest(connection, request))
- return true;
-
- delete request;
- return false;
-}
-
-bool IdentifyRequest::sendRequest(Net::Connection *connection, uint16_t requestId) {
- if(!connection->send(Net::Packet(Net::Packet::IDENTIFY, requestId, hostname.c_str(), hostname.length())))
- return false;
-
- return true;
-}
-
-void IdentifyRequest::handlePacket(Net::Connection*, const Net::Packet &packet) {
- if(packet.getType() != Net::Packet::OK)
- return; // TODO Logging
-
- signalFinished().emit();
-}
-
-}
-}
-}
diff --git a/src/Common/Requests/IdentifyRequest.h b/src/Common/Requests/IdentifyRequest.h
deleted file mode 100644
index 5a02949..0000000
--- a/src/Common/Requests/IdentifyRequest.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * IdentifyRequest.h
- *
- * Copyright (C) 2008 Matthias Schiffer <matthias@gamezock.de>
- *
- * 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 3 of the License, or
- * (at your option) 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 MAD_COMMON_REQUESTS_IDENTIFYREQUEST_H_
-#define MAD_COMMON_REQUESTS_IDENTIFYREQUEST_H_
-
-#include "../Request.h"
-#include <string>
-
-namespace Mad {
-namespace Common {
-namespace Requests {
-
-class IdentifyRequest : public Request {
- private:
- IdentifyRequest(const std::string &hostname0) : hostname(hostname0) {}
-
- std::string hostname;
-
- public:
- static bool send(Net::Connection *connection, const std::string &hostname0);
-
- virtual bool sendRequest(Net::Connection *connection, uint16_t requestId);
- virtual void handlePacket(Net::Connection*, const Net::Packet &packet);
-};
-
-}
-}
-}
-
-#endif /* MAD_COMMON_REQUESTS_IDENTIFYREQUEST_H_ */
diff --git a/src/Common/Requests/Makefile.am b/src/Common/Requests/Makefile.am
index 6363b79..d455da6 100644
--- a/src/Common/Requests/Makefile.am
+++ b/src/Common/Requests/Makefile.am
@@ -1,4 +1,4 @@
noinst_LTLIBRARIES = librequests.la
-librequests_la_SOURCES = DisconnectRequest.cpp GSSAPIAuthRequest.cpp IdentifyRequest.cpp
+librequests_la_SOURCES = DisconnectRequest.cpp GSSAPIAuthRequest.cpp
-noinst_HEADERS = DisconnectRequest.h GSSAPIAuthRequest.h IdentifyRequest.h
+noinst_HEADERS = DisconnectRequest.h GSSAPIAuthRequest.h
diff --git a/src/Common/Requests/Makefile.in b/src/Common/Requests/Makefile.in
index d3c4783..c118beb 100644
--- a/src/Common/Requests/Makefile.in
+++ b/src/Common/Requests/Makefile.in
@@ -45,8 +45,7 @@ CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
librequests_la_LIBADD =
-am_librequests_la_OBJECTS = DisconnectRequest.lo GSSAPIAuthRequest.lo \
- IdentifyRequest.lo
+am_librequests_la_OBJECTS = DisconnectRequest.lo GSSAPIAuthRequest.lo
librequests_la_OBJECTS = $(am_librequests_la_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
depcomp = $(SHELL) $(top_srcdir)/depcomp
@@ -185,8 +184,8 @@ target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
noinst_LTLIBRARIES = librequests.la
-librequests_la_SOURCES = DisconnectRequest.cpp GSSAPIAuthRequest.cpp IdentifyRequest.cpp
-noinst_HEADERS = DisconnectRequest.h GSSAPIAuthRequest.h IdentifyRequest.h
+librequests_la_SOURCES = DisconnectRequest.cpp GSSAPIAuthRequest.cpp
+noinst_HEADERS = DisconnectRequest.h GSSAPIAuthRequest.h
all: all-am
.SUFFIXES:
@@ -240,7 +239,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DisconnectRequest.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GSSAPIAuthRequest.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IdentifyRequest.Plo@am__quote@
.cpp.o:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<