diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2008-10-08 23:08:21 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2008-10-08 23:08:21 +0200 |
commit | 58c5d4eefdf1cdee0651f7c74ffd1501adbdc9c3 (patch) | |
tree | 340e4f8ccfd172e197db6aa20cd6cfc7bec0f40e /src/Core/Requests | |
parent | 3bb4da8601bd4d6de56d57507faf7fa115a15037 (diff) | |
download | mad-58c5d4eefdf1cdee0651f7c74ffd1501adbdc9c3.tar mad-58c5d4eefdf1cdee0651f7c74ffd1501adbdc9c3.zip |
fsinfo-Befehl implementiert
Diffstat (limited to 'src/Core/Requests')
-rw-r--r-- | src/Core/Requests/DaemonStatusRequest.cpp | 42 | ||||
-rw-r--r-- | src/Core/Requests/DaemonStatusRequest.h | 43 | ||||
-rw-r--r-- | src/Core/Requests/Makefile.am | 4 | ||||
-rw-r--r-- | src/Core/Requests/Makefile.in | 7 |
4 files changed, 5 insertions, 91 deletions
diff --git a/src/Core/Requests/DaemonStatusRequest.cpp b/src/Core/Requests/DaemonStatusRequest.cpp deleted file mode 100644 index 3b028c9..0000000 --- a/src/Core/Requests/DaemonStatusRequest.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* - * DaemonStatusRequest.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 "DaemonStatusRequest.h" -#include <Common/RequestManager.h> - -namespace Mad { -namespace Core { -namespace Requests { - -void DaemonStatusRequest::sendRequest(Net::Connection *connection, uint16_t requestId) { - connection->send(Net::Packet(Net::Packet::STATUS, requestId)); -} - -void DaemonStatusRequest::handlePacket(Net::Connection*, const Net::Packet &packet) { - if(packet.getType() != Net::Packet::OK) { - finishWithError(Common::Exception(Common::Exception::UNEXPECTED_PACKET)); - return; // TODO Logging - } - - finish(Net::Packets::HostStatusPacket(packet)); -} - -} -} -} diff --git a/src/Core/Requests/DaemonStatusRequest.h b/src/Core/Requests/DaemonStatusRequest.h deleted file mode 100644 index 09cbc2b..0000000 --- a/src/Core/Requests/DaemonStatusRequest.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * DaemonStatusRequest.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_CORE_REQUESTS_DAEMONSTATUSREQUEST_H_ -#define MAD_CORE_REQUESTS_DAEMONSTATUSREQUEST_H_ - -#include <Common/Request.h> -#include <Net/Packets/HostStatusPacket.h> - -namespace Mad { -namespace Core { -namespace Requests { - -class DaemonStatusRequest : public Common::Request<Net::Packets::HostStatusPacket> { - protected: - virtual void sendRequest(Net::Connection *connection, uint16_t requestId); - virtual void handlePacket(Net::Connection *connection, const Net::Packet &packet); - - public: - DaemonStatusRequest(slot_type slot) : Common::Request<Net::Packets::HostStatusPacket>(slot) {} -}; - -} -} -} - -#endif /* MAD_CORE_REQUESTS_DAEMONSTATUSREQUEST_H_ */ diff --git a/src/Core/Requests/Makefile.am b/src/Core/Requests/Makefile.am index e69088b..f101b84 100644 --- a/src/Core/Requests/Makefile.am +++ b/src/Core/Requests/Makefile.am @@ -1,4 +1,4 @@ noinst_LTLIBRARIES = librequests.la -librequests_la_SOURCES = CommandRequest.cpp DaemonStateUpdateRequest.cpp DaemonStatusRequest.cpp +librequests_la_SOURCES = CommandRequest.cpp DaemonStateUpdateRequest.cpp -noinst_HEADERS = CommandRequest.h DaemonStateUpdateRequest.h DaemonStatusRequest.h +noinst_HEADERS = CommandRequest.h DaemonStateUpdateRequest.h diff --git a/src/Core/Requests/Makefile.in b/src/Core/Requests/Makefile.in index e6367a2..26aa0fe 100644 --- a/src/Core/Requests/Makefile.in +++ b/src/Core/Requests/Makefile.in @@ -49,7 +49,7 @@ CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) librequests_la_LIBADD = am_librequests_la_OBJECTS = CommandRequest.lo \ - DaemonStateUpdateRequest.lo DaemonStatusRequest.lo + DaemonStateUpdateRequest.lo librequests_la_OBJECTS = $(am_librequests_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp @@ -188,8 +188,8 @@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = librequests.la -librequests_la_SOURCES = CommandRequest.cpp DaemonStateUpdateRequest.cpp DaemonStatusRequest.cpp -noinst_HEADERS = CommandRequest.h DaemonStateUpdateRequest.h DaemonStatusRequest.h +librequests_la_SOURCES = CommandRequest.cpp DaemonStateUpdateRequest.cpp +noinst_HEADERS = CommandRequest.h DaemonStateUpdateRequest.h all: all-am .SUFFIXES: @@ -243,7 +243,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CommandRequest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DaemonStateUpdateRequest.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DaemonStatusRequest.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< |