diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2008-09-13 04:39:42 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2008-09-13 04:39:42 +0200 |
commit | d710e7dc5e8f3895f5d1aa6bd1db0ef3151af8ca (patch) | |
tree | e7a87fb03e22ee044c221a46dfeebc1a1046fd2b | |
parent | 7e87778a02f3d37865c10051a3f14038bbbcbaef (diff) | |
download | mad-d710e7dc5e8f3895f5d1aa6bd1db0ef3151af8ca.tar mad-d710e7dc5e8f3895f5d1aa6bd1db0ef3151af8ca.zip |
Und wieder eine Umbenennungsorgie...
-rwxr-xr-x | configure | 12 | ||||
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | src/Client/CommandParser.cpp | 8 | ||||
-rw-r--r-- | src/Client/Makefile.am | 4 | ||||
-rw-r--r-- | src/Client/Makefile.in | 6 | ||||
-rw-r--r-- | src/Client/Request/Makefile.am | 4 | ||||
-rw-r--r-- | src/Client/Requests/CoreStatusRequest.cpp (renamed from src/Client/Request/CoreStatusRequest.cpp) | 2 | ||||
-rw-r--r-- | src/Client/Requests/CoreStatusRequest.h (renamed from src/Client/Request/CoreStatusRequest.h) | 12 | ||||
-rw-r--r-- | src/Client/Requests/Makefile.am | 4 | ||||
-rw-r--r-- | src/Client/Requests/Makefile.in (renamed from src/Client/Request/Makefile.in) | 24 | ||||
-rw-r--r-- | src/Common/Makefile.am | 6 | ||||
-rw-r--r-- | src/Common/Makefile.in | 8 | ||||
-rw-r--r-- | src/Common/Request.h (renamed from src/Common/Request/Request.h) | 12 | ||||
-rw-r--r-- | src/Common/Request/Makefile.am | 4 | ||||
-rw-r--r-- | src/Common/RequestHandler.h (renamed from src/Common/RequestHandler/RequestHandler.h) | 8 | ||||
-rw-r--r-- | src/Common/RequestHandler/Makefile.am | 5 | ||||
-rw-r--r-- | src/Common/RequestHandlers/DisconnectRequestHandler.cpp (renamed from src/Common/RequestHandler/DisconnectRequestHandler.cpp) | 2 | ||||
-rw-r--r-- | src/Common/RequestHandlers/DisconnectRequestHandler.h (renamed from src/Common/RequestHandler/DisconnectRequestHandler.h) | 10 | ||||
-rw-r--r-- | src/Common/RequestHandlers/IdentifyRequestHandler.cpp (renamed from src/Common/RequestHandler/IdentifyRequestHandler.cpp) | 2 | ||||
-rw-r--r-- | src/Common/RequestHandlers/IdentifyRequestHandler.h (renamed from src/Common/RequestHandler/IdentifyRequestHandler.h) | 10 | ||||
-rw-r--r-- | src/Common/RequestHandlers/Makefile.am | 5 | ||||
-rw-r--r-- | src/Common/RequestHandlers/Makefile.in (renamed from src/Common/RequestHandler/Makefile.in) | 26 | ||||
-rw-r--r-- | src/Common/RequestManager.cpp | 16 | ||||
-rw-r--r-- | src/Common/RequestManager.h | 16 | ||||
-rw-r--r-- | src/Common/Requests/DisconnectRequest.cpp (renamed from src/Common/Request/DisconnectRequest.cpp) | 2 | ||||
-rw-r--r-- | src/Common/Requests/DisconnectRequest.h (renamed from src/Common/Request/DisconnectRequest.h) | 10 | ||||
-rw-r--r-- | src/Common/Requests/GSSAPIAuthRequest.cpp (renamed from src/Common/Request/GSSAPIAuthRequest.cpp) | 2 | ||||
-rw-r--r-- | src/Common/Requests/GSSAPIAuthRequest.h (renamed from src/Common/Request/GSSAPIAuthRequest.h) | 10 | ||||
-rw-r--r-- | src/Common/Requests/IdentifyRequest.cpp (renamed from src/Common/Request/IdentifyRequest.cpp) | 2 | ||||
-rw-r--r-- | src/Common/Requests/IdentifyRequest.h (renamed from src/Common/Request/IdentifyRequest.h) | 10 | ||||
-rw-r--r-- | src/Common/Requests/Makefile.am | 4 | ||||
-rw-r--r-- | src/Common/Requests/Makefile.in (renamed from src/Common/Request/Makefile.in) | 26 | ||||
-rw-r--r-- | src/Core/ConnectionManager.cpp | 8 | ||||
-rw-r--r-- | src/Core/Makefile.am | 4 | ||||
-rw-r--r-- | src/Core/Makefile.in | 6 | ||||
-rw-r--r-- | src/Core/RequestHandler/Makefile.am | 4 | ||||
-rw-r--r-- | src/Core/RequestHandlers/CoreStatusRequestHandler.cpp (renamed from src/Core/RequestHandler/CoreStatusRequestHandler.cpp) | 2 | ||||
-rw-r--r-- | src/Core/RequestHandlers/CoreStatusRequestHandler.h (renamed from src/Core/RequestHandler/CoreStatusRequestHandler.h) | 6 | ||||
-rw-r--r-- | src/Core/RequestHandlers/GSSAPIAuthRequestHandler.cpp (renamed from src/Core/RequestHandler/GSSAPIAuthRequestHandler.cpp) | 2 | ||||
-rw-r--r-- | src/Core/RequestHandlers/GSSAPIAuthRequestHandler.h (renamed from src/Core/RequestHandler/GSSAPIAuthRequestHandler.h) | 6 | ||||
-rw-r--r-- | src/Core/RequestHandlers/Makefile.am | 4 | ||||
-rw-r--r-- | src/Core/RequestHandlers/Makefile.in (renamed from src/Core/RequestHandler/Makefile.in) | 24 | ||||
-rw-r--r-- | src/Daemon/Makefile.am | 4 | ||||
-rw-r--r-- | src/Daemon/Makefile.in | 6 | ||||
-rw-r--r-- | src/Daemon/RequestHandler/Makefile.am | 4 | ||||
-rw-r--r-- | src/Daemon/RequestHandlers/Makefile.am | 4 | ||||
-rw-r--r-- | src/Daemon/RequestHandlers/Makefile.in (renamed from src/Daemon/RequestHandler/Makefile.in) | 24 | ||||
-rw-r--r-- | src/mad.cpp | 4 |
48 files changed, 194 insertions, 200 deletions
@@ -22089,7 +22089,7 @@ done -ac_config_files="$ac_config_files Makefile src/Makefile src/Client/Makefile src/Client/Request/Makefile src/Common/Makefile src/Common/Backends/Makefile src/Common/Request/Makefile src/Common/RequestHandler/Makefile src/Core/Makefile src/Core/RequestHandler/Makefile src/Daemon/Makefile src/Daemon/RequestHandler/Makefile src/Net/Makefile src/Net/Packets/Makefile" +ac_config_files="$ac_config_files Makefile src/Makefile src/Client/Makefile src/Client/Requests/Makefile src/Common/Makefile src/Common/Backends/Makefile src/Common/Requests/Makefile src/Common/RequestHandlers/Makefile src/Core/Makefile src/Core/RequestHandlers/Makefile src/Daemon/Makefile src/Daemon/RequestHandlers/Makefile src/Net/Makefile src/Net/Packets/Makefile" cat >confcache <<\_ACEOF @@ -22688,15 +22688,15 @@ do "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/Client/Makefile") CONFIG_FILES="$CONFIG_FILES src/Client/Makefile" ;; - "src/Client/Request/Makefile") CONFIG_FILES="$CONFIG_FILES src/Client/Request/Makefile" ;; + "src/Client/Requests/Makefile") CONFIG_FILES="$CONFIG_FILES src/Client/Requests/Makefile" ;; "src/Common/Makefile") CONFIG_FILES="$CONFIG_FILES src/Common/Makefile" ;; "src/Common/Backends/Makefile") CONFIG_FILES="$CONFIG_FILES src/Common/Backends/Makefile" ;; - "src/Common/Request/Makefile") CONFIG_FILES="$CONFIG_FILES src/Common/Request/Makefile" ;; - "src/Common/RequestHandler/Makefile") CONFIG_FILES="$CONFIG_FILES src/Common/RequestHandler/Makefile" ;; + "src/Common/Requests/Makefile") CONFIG_FILES="$CONFIG_FILES src/Common/Requests/Makefile" ;; + "src/Common/RequestHandlers/Makefile") CONFIG_FILES="$CONFIG_FILES src/Common/RequestHandlers/Makefile" ;; "src/Core/Makefile") CONFIG_FILES="$CONFIG_FILES src/Core/Makefile" ;; - "src/Core/RequestHandler/Makefile") CONFIG_FILES="$CONFIG_FILES src/Core/RequestHandler/Makefile" ;; + "src/Core/RequestHandlers/Makefile") CONFIG_FILES="$CONFIG_FILES src/Core/RequestHandlers/Makefile" ;; "src/Daemon/Makefile") CONFIG_FILES="$CONFIG_FILES src/Daemon/Makefile" ;; - "src/Daemon/RequestHandler/Makefile") CONFIG_FILES="$CONFIG_FILES src/Daemon/RequestHandler/Makefile" ;; + "src/Daemon/RequestHandlers/Makefile") CONFIG_FILES="$CONFIG_FILES src/Daemon/RequestHandlers/Makefile" ;; "src/Net/Makefile") CONFIG_FILES="$CONFIG_FILES src/Net/Makefile" ;; "src/Net/Packets/Makefile") CONFIG_FILES="$CONFIG_FILES src/Net/Packets/Makefile" ;; diff --git a/configure.ac b/configure.ac index 5771ed9..6de70fc 100644 --- a/configure.ac +++ b/configure.ac @@ -54,15 +54,15 @@ AC_CONFIG_FILES([ Makefile src/Makefile src/Client/Makefile - src/Client/Request/Makefile + src/Client/Requests/Makefile src/Common/Makefile src/Common/Backends/Makefile - src/Common/Request/Makefile - src/Common/RequestHandler/Makefile + src/Common/Requests/Makefile + src/Common/RequestHandlers/Makefile src/Core/Makefile - src/Core/RequestHandler/Makefile + src/Core/RequestHandlers/Makefile src/Daemon/Makefile - src/Daemon/RequestHandler/Makefile + src/Daemon/RequestHandlers/Makefile src/Net/Makefile src/Net/Packets/Makefile ]) diff --git a/src/Client/CommandParser.cpp b/src/Client/CommandParser.cpp index ed15b7b..decb28e 100644 --- a/src/Client/CommandParser.cpp +++ b/src/Client/CommandParser.cpp @@ -18,8 +18,8 @@ */ #include "CommandParser.h" -#include "Request/CoreStatusRequest.h" -#include <Common/Request/DisconnectRequest.h> +#include "Requests/CoreStatusRequest.h" +#include <Common/Requests/DisconnectRequest.h> #include <Net/Packets/HostStatusPacket.h> #include <iostream> @@ -86,14 +86,14 @@ void CommandParser::helpCommand(const std::vector<std::string> &args) { void CommandParser::statusCommand(const std::vector<std::string>&) { activeRequests++; - Request::CoreStatusRequest::send(connection, *requestManager, sigc::mem_fun(this, &CommandParser::coreStatusRequestFinished)); + Requests::CoreStatusRequest::send(connection, *requestManager, sigc::mem_fun(this, &CommandParser::coreStatusRequestFinished)); } void CommandParser::exitCommand(const std::vector<std::string>&) { activeRequests++; disconnect = true; - Common::Request::DisconnectRequest::send(connection, *requestManager, sigc::mem_fun(this, &CommandParser::requestFinished)); + Common::Requests::DisconnectRequest::send(connection, *requestManager, sigc::mem_fun(this, &CommandParser::requestFinished)); } void CommandParser::coreStatusRequestFinished(const Net::Packets::HostStatusPacket &packet) { diff --git a/src/Client/Makefile.am b/src/Client/Makefile.am index 65407f3..6ee2248 100644 --- a/src/Client/Makefile.am +++ b/src/Client/Makefile.am @@ -1,7 +1,7 @@ -SUBDIRS = Request +SUBDIRS = Requests noinst_LTLIBRARIES = libclient.la libclient_la_SOURCES = CommandParser.cpp -libclient_la_LIBADD = Request/librequest.la +libclient_la_LIBADD = Requests/librequests.la noinst_HEADERS = CommandParser.h diff --git a/src/Client/Makefile.in b/src/Client/Makefile.in index a1a049e..3d9d14c 100644 --- a/src/Client/Makefile.in +++ b/src/Client/Makefile.in @@ -44,7 +44,7 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) -libclient_la_DEPENDENCIES = Request/librequest.la +libclient_la_DEPENDENCIES = Requests/librequests.la am_libclient_la_OBJECTS = CommandParser.lo libclient_la_OBJECTS = $(am_libclient_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src @@ -191,10 +191,10 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = Request +SUBDIRS = Requests noinst_LTLIBRARIES = libclient.la libclient_la_SOURCES = CommandParser.cpp -libclient_la_LIBADD = Request/librequest.la +libclient_la_LIBADD = Requests/librequests.la noinst_HEADERS = CommandParser.h all: all-recursive diff --git a/src/Client/Request/Makefile.am b/src/Client/Request/Makefile.am deleted file mode 100644 index 64b5a33..0000000 --- a/src/Client/Request/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -noinst_LTLIBRARIES = librequest.la -librequest_la_SOURCES = CoreStatusRequest.cpp - -noinst_HEADERS = CoreStatusRequest.h diff --git a/src/Client/Request/CoreStatusRequest.cpp b/src/Client/Requests/CoreStatusRequest.cpp index f5fe043..fa3f1f1 100644 --- a/src/Client/Request/CoreStatusRequest.cpp +++ b/src/Client/Requests/CoreStatusRequest.cpp @@ -26,7 +26,7 @@ namespace Mad { namespace Client { -namespace Request { +namespace Requests { bool CoreStatusRequest::send(Net::Connection *connection, Common::RequestManager &requestManager, const sigc::slot<void,const Net::Packets::HostStatusPacket&> &callback) { CoreStatusRequest *request = new CoreStatusRequest(); diff --git a/src/Client/Request/CoreStatusRequest.h b/src/Client/Requests/CoreStatusRequest.h index 1a6a01e..7de8a68 100644 --- a/src/Client/Request/CoreStatusRequest.h +++ b/src/Client/Requests/CoreStatusRequest.h @@ -17,10 +17,10 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAD_CLIENT_REQUEST_CORESTATUSREQUEST_H_ -#define MAD_CLIENT_REQUEST_CORESTATUSREQUEST_H_ +#ifndef MAD_CLIENT_REQUESTS_CORESTATUSREQUEST_H_ +#define MAD_CLIENT_REQUESTS_CORESTATUSREQUEST_H_ -#include <Common/Request/Request.h> +#include <Common/Request.h> #include <sigc++/signal.h> @@ -37,9 +37,9 @@ class HostStatusPacket; } namespace Client { -namespace Request { +namespace Requests { -class CoreStatusRequest: public Common::Request::Request { +class CoreStatusRequest : public Common::Request { private: sigc::signal<void,const Net::Packets::HostStatusPacket&> finished; @@ -56,4 +56,4 @@ class CoreStatusRequest: public Common::Request::Request { } } -#endif /* MAD_CLIENT_REQUEST_CORESTATUSREQUEST_H_ */ +#endif /* MAD_CLIENT_REQUESTS_CORESTATUSREQUEST_H_ */ diff --git a/src/Client/Requests/Makefile.am b/src/Client/Requests/Makefile.am new file mode 100644 index 0000000..4ba72b6 --- /dev/null +++ b/src/Client/Requests/Makefile.am @@ -0,0 +1,4 @@ +noinst_LTLIBRARIES = librequests.la +librequests_la_SOURCES = CoreStatusRequest.cpp + +noinst_HEADERS = CoreStatusRequest.h diff --git a/src/Client/Request/Makefile.in b/src/Client/Requests/Makefile.in index fde067d..b257084 100644 --- a/src/Client/Request/Makefile.in +++ b/src/Client/Requests/Makefile.in @@ -33,7 +33,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -subdir = src/Client/Request +subdir = src/Client/Requests DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -44,9 +44,9 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) -librequest_la_LIBADD = -am_librequest_la_OBJECTS = CoreStatusRequest.lo -librequest_la_OBJECTS = $(am_librequest_la_OBJECTS) +librequests_la_LIBADD = +am_librequests_la_OBJECTS = CoreStatusRequest.lo +librequests_la_OBJECTS = $(am_librequests_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -59,8 +59,8 @@ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(librequest_la_SOURCES) -DIST_SOURCES = $(librequest_la_SOURCES) +SOURCES = $(librequests_la_SOURCES) +DIST_SOURCES = $(librequests_la_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags @@ -181,8 +181,8 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = librequest.la -librequest_la_SOURCES = CoreStatusRequest.cpp +noinst_LTLIBRARIES = librequests.la +librequests_la_SOURCES = CoreStatusRequest.cpp noinst_HEADERS = CoreStatusRequest.h all: all-am @@ -197,9 +197,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Client/Request/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Client/Requests/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Client/Request/Makefile + $(AUTOMAKE) --gnu src/Client/Requests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -226,8 +226,8 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -librequest.la: $(librequest_la_OBJECTS) $(librequest_la_DEPENDENCIES) - $(CXXLINK) $(librequest_la_OBJECTS) $(librequest_la_LIBADD) $(LIBS) +librequests.la: $(librequests_la_OBJECTS) $(librequests_la_DEPENDENCIES) + $(CXXLINK) $(librequests_la_OBJECTS) $(librequests_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) diff --git a/src/Common/Makefile.am b/src/Common/Makefile.am index c282538..8ea7c14 100644 --- a/src/Common/Makefile.am +++ b/src/Common/Makefile.am @@ -1,7 +1,7 @@ -SUBDIRS = Backends Request RequestHandler +SUBDIRS = Backends Requests RequestHandlers noinst_LTLIBRARIES = libcommon.la libcommon_la_SOURCES = ConfigManager.cpp RequestManager.cpp SystemBackend.cpp Util.cpp -libcommon_la_LIBADD = Backends/libbackends.la Request/librequest.la RequestHandler/librequesthandler.la +libcommon_la_LIBADD = Backends/libbackends.la Requests/librequests.la RequestHandlers/librequesthandlers.la -noinst_HEADERS = ConfigManager.h RequestManager.h SystemBackend.h Util.h +noinst_HEADERS = ConfigManager.h Request.h RequestHandler.h RequestManager.h SystemBackend.h Util.h diff --git a/src/Common/Makefile.in b/src/Common/Makefile.in index 39ba3b6..af266fe 100644 --- a/src/Common/Makefile.in +++ b/src/Common/Makefile.in @@ -45,7 +45,7 @@ CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcommon_la_DEPENDENCIES = Backends/libbackends.la \ - Request/librequest.la RequestHandler/librequesthandler.la + Requests/librequests.la RequestHandlers/librequesthandlers.la am_libcommon_la_OBJECTS = ConfigManager.lo RequestManager.lo \ SystemBackend.lo Util.lo libcommon_la_OBJECTS = $(am_libcommon_la_OBJECTS) @@ -193,11 +193,11 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = Backends Request RequestHandler +SUBDIRS = Backends Requests RequestHandlers noinst_LTLIBRARIES = libcommon.la libcommon_la_SOURCES = ConfigManager.cpp RequestManager.cpp SystemBackend.cpp Util.cpp -libcommon_la_LIBADD = Backends/libbackends.la Request/librequest.la RequestHandler/librequesthandler.la -noinst_HEADERS = ConfigManager.h RequestManager.h SystemBackend.h Util.h +libcommon_la_LIBADD = Backends/libbackends.la Requests/librequests.la RequestHandlers/librequesthandlers.la +noinst_HEADERS = ConfigManager.h Request.h RequestHandler.h RequestManager.h SystemBackend.h Util.h all: all-recursive .SUFFIXES: diff --git a/src/Common/Request/Request.h b/src/Common/Request.h index c87d87d..17e5eab 100644 --- a/src/Common/Request/Request.h +++ b/src/Common/Request.h @@ -17,17 +17,16 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAD_COMMON_REQUEST_REQUEST_H_ -#define MAD_COMMON_REQUEST_REQUEST_H_ +#ifndef MAD_COMMON_REQUEST_H_ +#define MAD_COMMON_REQUEST_H_ -#include "../RequestHandler/RequestHandler.h" +#include "RequestHandler.h" #include <stdint.h> namespace Mad { namespace Common { -namespace Request { -class Request : public RequestHandler::RequestHandler { +class Request : public RequestHandler { private: bool sent; @@ -44,6 +43,5 @@ class Request : public RequestHandler::RequestHandler { } } -} -#endif /* MAD_COMMON_REQUEST_REQUEST_H_ */ +#endif /* MAD_COMMON_REQUEST_H_ */ diff --git a/src/Common/Request/Makefile.am b/src/Common/Request/Makefile.am deleted file mode 100644 index ef75dfe..0000000 --- a/src/Common/Request/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -noinst_LTLIBRARIES = librequest.la -librequest_la_SOURCES = DisconnectRequest.cpp GSSAPIAuthRequest.cpp IdentifyRequest.cpp - -noinst_HEADERS = DisconnectRequest.h GSSAPIAuthRequest.h IdentifyRequest.h Request.h diff --git a/src/Common/RequestHandler/RequestHandler.h b/src/Common/RequestHandler.h index 8f50d55..a6995ec 100644 --- a/src/Common/RequestHandler/RequestHandler.h +++ b/src/Common/RequestHandler.h @@ -17,8 +17,8 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAD_COMMON_REQUESTHANDLER_REQUESTHANDLER_H_ -#define MAD_COMMON_REQUESTHANDLER_REQUESTHANDLER_H_ +#ifndef MAD_COMMON_REQUESTHANDLER_H_ +#define MAD_COMMON_REQUESTHANDLER_H_ namespace Mad { @@ -28,7 +28,6 @@ class Packet; } namespace Common { -namespace RequestHandler { class RequestHandler { private: @@ -49,6 +48,5 @@ class RequestHandler { } } -} -#endif /* MAD_COMMON_REQUESTHANDLER_REQUESTHANDLER_H_ */ +#endif /* MAD_COMMON_REQUESTHANDLER_H_ */ diff --git a/src/Common/RequestHandler/Makefile.am b/src/Common/RequestHandler/Makefile.am deleted file mode 100644 index 69e6c77..0000000 --- a/src/Common/RequestHandler/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -noinst_LTLIBRARIES = librequesthandler.la -librequesthandler_la_SOURCES = DisconnectRequestHandler.cpp IdentifyRequestHandler.cpp - -noinst_HEADERS = DisconnectRequestHandler.h IdentifyRequestHandler.h RequestHandler.h - diff --git a/src/Common/RequestHandler/DisconnectRequestHandler.cpp b/src/Common/RequestHandlers/DisconnectRequestHandler.cpp index af05457..967649e 100644 --- a/src/Common/RequestHandler/DisconnectRequestHandler.cpp +++ b/src/Common/RequestHandlers/DisconnectRequestHandler.cpp @@ -22,7 +22,7 @@ namespace Mad { namespace Common { -namespace RequestHandler { +namespace RequestHandlers { bool DisconnectRequestHandler::handlePacket(Net::Connection *connection, const Net::Packet &packet) { if(isFinished()) diff --git a/src/Common/RequestHandler/DisconnectRequestHandler.h b/src/Common/RequestHandlers/DisconnectRequestHandler.h index 90429c4..784700d 100644 --- a/src/Common/RequestHandler/DisconnectRequestHandler.h +++ b/src/Common/RequestHandlers/DisconnectRequestHandler.h @@ -17,14 +17,14 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAD_COMMON_REQUESTHANDLER_DISCONNECTREQUESTHANDLER_H_ -#define MAD_COMMON_REQUESTHANDLER_DISCONNECTREQUESTHANDLER_H_ +#ifndef MAD_COMMON_REQUESTHANDLERS_DISCONNECTREQUESTHANDLER_H_ +#define MAD_COMMON_REQUESTHANDLERS_DISCONNECTREQUESTHANDLER_H_ -#include "RequestHandler.h" +#include "../RequestHandler.h" namespace Mad { namespace Common { -namespace RequestHandler { +namespace RequestHandlers { class DisconnectRequestHandler : public RequestHandler { public: @@ -37,4 +37,4 @@ class DisconnectRequestHandler : public RequestHandler { } } -#endif /* MAD_COMMON_REQUESTHANDLER_DISCONNECTREQUESTHANDLER_H_ */ +#endif /* MAD_COMMON_REQUESTHANDLERS_DISCONNECTREQUESTHANDLER_H_ */ diff --git a/src/Common/RequestHandler/IdentifyRequestHandler.cpp b/src/Common/RequestHandlers/IdentifyRequestHandler.cpp index 8a6ea40..791eadd 100644 --- a/src/Common/RequestHandler/IdentifyRequestHandler.cpp +++ b/src/Common/RequestHandlers/IdentifyRequestHandler.cpp @@ -22,7 +22,7 @@ namespace Mad { namespace Common { -namespace RequestHandler { +namespace RequestHandlers { bool IdentifyRequestHandler::handlePacket(Net::Connection *connection, const Net::Packet &packet) { if(isFinished()) diff --git a/src/Common/RequestHandler/IdentifyRequestHandler.h b/src/Common/RequestHandlers/IdentifyRequestHandler.h index 7ac2e3e..6bd4b31 100644 --- a/src/Common/RequestHandler/IdentifyRequestHandler.h +++ b/src/Common/RequestHandlers/IdentifyRequestHandler.h @@ -17,14 +17,14 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAD_COMMON_REQUESTHANDLER_IDENTIFYREQUESTHANDLER_H_ -#define MAD_COMMON_REQUESTHANDLER_IDENTIFYREQUESTHANDLER_H_ +#ifndef MAD_COMMON_REQUESTHANDLERS_IDENTIFYREQUESTHANDLER_H_ +#define MAD_COMMON_REQUESTHANDLERS_IDENTIFYREQUESTHANDLER_H_ -#include "RequestHandler.h" +#include "../RequestHandler.h" namespace Mad { namespace Common { -namespace RequestHandler { +namespace RequestHandlers { class IdentifyRequestHandler : public RequestHandler { public: @@ -37,4 +37,4 @@ class IdentifyRequestHandler : public RequestHandler { } } -#endif /* MAD_COMMON_REQUESTHANDLER_IDENTIFYREQUESTHANDLER_H_ */ +#endif /* MAD_COMMON_REQUESTHANDLERS_IDENTIFYREQUESTHANDLER_H_ */ diff --git a/src/Common/RequestHandlers/Makefile.am b/src/Common/RequestHandlers/Makefile.am new file mode 100644 index 0000000..a8aac28 --- /dev/null +++ b/src/Common/RequestHandlers/Makefile.am @@ -0,0 +1,5 @@ +noinst_LTLIBRARIES = librequesthandlers.la +librequesthandlers_la_SOURCES = DisconnectRequestHandler.cpp IdentifyRequestHandler.cpp + +noinst_HEADERS = DisconnectRequestHandler.h IdentifyRequestHandler.h + diff --git a/src/Common/RequestHandler/Makefile.in b/src/Common/RequestHandlers/Makefile.in index 0140d46..79edc8d 100644 --- a/src/Common/RequestHandler/Makefile.in +++ b/src/Common/RequestHandlers/Makefile.in @@ -33,7 +33,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -subdir = src/Common/RequestHandler +subdir = src/Common/RequestHandlers DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -44,10 +44,10 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) -librequesthandler_la_LIBADD = -am_librequesthandler_la_OBJECTS = DisconnectRequestHandler.lo \ +librequesthandlers_la_LIBADD = +am_librequesthandlers_la_OBJECTS = DisconnectRequestHandler.lo \ IdentifyRequestHandler.lo -librequesthandler_la_OBJECTS = $(am_librequesthandler_la_OBJECTS) +librequesthandlers_la_OBJECTS = $(am_librequesthandlers_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -60,8 +60,8 @@ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(librequesthandler_la_SOURCES) -DIST_SOURCES = $(librequesthandler_la_SOURCES) +SOURCES = $(librequesthandlers_la_SOURCES) +DIST_SOURCES = $(librequesthandlers_la_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags @@ -182,9 +182,9 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = librequesthandler.la -librequesthandler_la_SOURCES = DisconnectRequestHandler.cpp IdentifyRequestHandler.cpp -noinst_HEADERS = DisconnectRequestHandler.h IdentifyRequestHandler.h RequestHandler.h +noinst_LTLIBRARIES = librequesthandlers.la +librequesthandlers_la_SOURCES = DisconnectRequestHandler.cpp IdentifyRequestHandler.cpp +noinst_HEADERS = DisconnectRequestHandler.h IdentifyRequestHandler.h all: all-am .SUFFIXES: @@ -198,9 +198,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Common/RequestHandler/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Common/RequestHandlers/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Common/RequestHandler/Makefile + $(AUTOMAKE) --gnu src/Common/RequestHandlers/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -227,8 +227,8 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -librequesthandler.la: $(librequesthandler_la_OBJECTS) $(librequesthandler_la_DEPENDENCIES) - $(CXXLINK) $(librequesthandler_la_OBJECTS) $(librequesthandler_la_LIBADD) $(LIBS) +librequesthandlers.la: $(librequesthandlers_la_OBJECTS) $(librequesthandlers_la_DEPENDENCIES) + $(CXXLINK) $(librequesthandlers_la_OBJECTS) $(librequesthandlers_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) diff --git a/src/Common/RequestManager.cpp b/src/Common/RequestManager.cpp index 0dc7a48..7075229 100644 --- a/src/Common/RequestManager.cpp +++ b/src/Common/RequestManager.cpp @@ -18,16 +18,16 @@ */ #include "RequestManager.h" -#include "Request/Request.h" -#include "RequestHandler/DisconnectRequestHandler.h" -#include "RequestHandler/IdentifyRequestHandler.h" +#include "Request.h" +#include "RequestHandlers/DisconnectRequestHandler.h" +#include "RequestHandlers/IdentifyRequestHandler.h" #include <iostream> namespace Mad { namespace Common { -RequestHandler::RequestHandler* RequestManager::RequestMap::findRequest(uint16_t id) { +RequestHandler* RequestManager::RequestMap::findRequest(uint16_t id) { iterator it = find(id); if(it == end()) return 0; @@ -58,7 +58,7 @@ void RequestManager::receiveHandler(Net::Connection *connection, const Net::Pack } RequestMap *requestMap = it->second; - RequestHandler::RequestHandler *request = requestMap->findRequest(packet.getRequestId()); + RequestHandler *request = requestMap->findRequest(packet.getRequestId()); if(request) { request->handlePacket(connection, packet); @@ -86,7 +86,7 @@ void RequestManager::receiveHandler(Net::Connection *connection, const Net::Pack std::cerr << "Received an unexpected packet." << std::endl; } -bool RequestManager::sendRequest(Net::Connection *connection, Request::Request *request) { +bool RequestManager::sendRequest(Net::Connection *connection, Request *request) { std::map<Net::Connection*,RequestMap*>::iterator it = requestMaps.find(connection); if(it == requestMaps.end()) @@ -136,8 +136,8 @@ void RequestManager::unregisterPacketType(Net::Packet::Type type) { } RequestManager::RequestManager(bool core) : requestId(core ? -2 : -1) { - registerPacketType<RequestHandler::DisconnectRequestHandler>(Net::Packet::DISCONNECT); - registerPacketType<RequestHandler::IdentifyRequestHandler>(Net::Packet::IDENTIFY); + registerPacketType<RequestHandlers::DisconnectRequestHandler>(Net::Packet::DISCONNECT); + registerPacketType<RequestHandlers::IdentifyRequestHandler>(Net::Packet::IDENTIFY); } RequestManager::~RequestManager() { diff --git a/src/Common/RequestManager.h b/src/Common/RequestManager.h index e7a8e7b..2ca10e7 100644 --- a/src/Common/RequestManager.h +++ b/src/Common/RequestManager.h @@ -20,20 +20,18 @@ #ifndef MAD_COMMON_REQUESTMANAGER_H_ #define MAD_COMMON_REQUESTMANAGER_H_ -#include "RequestHandler/RequestHandler.h" +#include "RequestHandler.h" #include <Net/Connection.h> #include <map> namespace Mad { namespace Common { -namespace Request { class Request; -} class RequestManager { private: - class RequestMap : private std::map<uint16_t,RequestHandler::RequestHandler*> { + class RequestMap : private std::map<uint16_t,RequestHandler*> { private: // Prevent shallow copy RequestMap(const RequestMap &o); @@ -46,11 +44,11 @@ class RequestManager { delete it->second; } - bool addRequest(uint16_t id, RequestHandler::RequestHandler *info) { + bool addRequest(uint16_t id, RequestHandler *info) { return insert(std::make_pair(id, info)).second; } - RequestHandler::RequestHandler* findRequest(uint16_t id); + RequestHandler* findRequest(uint16_t id); bool deleteRequest(uint16_t id); }; @@ -59,13 +57,13 @@ class RequestManager { RequestHandlerFactory() {} public: - virtual RequestHandler::RequestHandler* createRequestHandler() = 0; + virtual RequestHandler* createRequestHandler() = 0; virtual ~RequestHandlerFactory() {} }; template<class T> class SpecificRequestHandlerFactory : public RequestHandlerFactory { public: - virtual RequestHandler::RequestHandler* createRequestHandler() { + virtual RequestHandler* createRequestHandler() { return new T(); } }; @@ -95,7 +93,7 @@ class RequestManager { void unregisterPacketType(Net::Packet::Type type); - bool sendRequest(Net::Connection *connection, Request::Request *request); + bool sendRequest(Net::Connection *connection, Request *request); RequestManager(bool core); virtual ~RequestManager(); diff --git a/src/Common/Request/DisconnectRequest.cpp b/src/Common/Requests/DisconnectRequest.cpp index 0f8a3c0..2652af2 100644 --- a/src/Common/Request/DisconnectRequest.cpp +++ b/src/Common/Requests/DisconnectRequest.cpp @@ -22,7 +22,7 @@ namespace Mad { namespace Common { -namespace Request { +namespace Requests { bool DisconnectRequest::send(Net::Connection *connection, RequestManager &requestManager, const sigc::slot<void> &callback) { DisconnectRequest *request = new DisconnectRequest(); diff --git a/src/Common/Request/DisconnectRequest.h b/src/Common/Requests/DisconnectRequest.h index 136ef73..a569d8f 100644 --- a/src/Common/Request/DisconnectRequest.h +++ b/src/Common/Requests/DisconnectRequest.h @@ -17,10 +17,10 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAD_COMMON_REQUEST_DISCONNECTREQUEST_H_ -#define MAD_COMMON_REQUEST_DISCONNECTREQUEST_H_ +#ifndef MAD_COMMON_REQUESTS_DISCONNECTREQUEST_H_ +#define MAD_COMMON_REQUESTS_DISCONNECTREQUEST_H_ -#include "Request.h" +#include "../Request.h" #include <sigc++/signal.h> @@ -29,7 +29,7 @@ namespace Common { class RequestManager; -namespace Request { +namespace Requests { class DisconnectRequest : public Request { private: @@ -48,4 +48,4 @@ class DisconnectRequest : public Request { } } -#endif /* MAD_COMMON_REQUEST_DISCONNECTREQUEST_H_ */ +#endif /* MAD_COMMON_REQUESTS_DISCONNECTREQUEST_H_ */ diff --git a/src/Common/Request/GSSAPIAuthRequest.cpp b/src/Common/Requests/GSSAPIAuthRequest.cpp index 4387f97..1874064 100644 --- a/src/Common/Request/GSSAPIAuthRequest.cpp +++ b/src/Common/Requests/GSSAPIAuthRequest.cpp @@ -26,7 +26,7 @@ namespace Mad { namespace Common { -namespace Request { +namespace Requests { // TODO Logging & error handling! diff --git a/src/Common/Request/GSSAPIAuthRequest.h b/src/Common/Requests/GSSAPIAuthRequest.h index dd2afbb..a4a2f17 100644 --- a/src/Common/Request/GSSAPIAuthRequest.h +++ b/src/Common/Requests/GSSAPIAuthRequest.h @@ -17,10 +17,10 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAD_COMMON_REQUEST_GSSAPIAUTHREQUEST_H_ -#define MAD_COMMON_REQUEST_GSSAPIAUTHREQUEST_H_ +#ifndef MAD_COMMON_REQUESTS_GSSAPIAUTHREQUEST_H_ +#define MAD_COMMON_REQUESTS_GSSAPIAUTHREQUEST_H_ -#include "Request.h" +#include "../Request.h" #include <string> #include <gssapi/gssapi.h> @@ -29,7 +29,7 @@ namespace Common { class RequestManager; -namespace Request { +namespace Requests { // TODO Logging & error handling! @@ -56,4 +56,4 @@ class GSSAPIAuthRequest : public Request { } } -#endif /* MAD_COMMON_REQUEST_GSSAPIAUTHREQUEST_H_ */ +#endif /* MAD_COMMON_REQUESTS_GSSAPIAUTHREQUEST_H_ */ diff --git a/src/Common/Request/IdentifyRequest.cpp b/src/Common/Requests/IdentifyRequest.cpp index 5fe4227..18b515f 100644 --- a/src/Common/Request/IdentifyRequest.cpp +++ b/src/Common/Requests/IdentifyRequest.cpp @@ -23,7 +23,7 @@ namespace Mad { namespace Common { -namespace Request { +namespace Requests { bool IdentifyRequest::send(Net::Connection *connection, RequestManager &requestManager, const std::string &hostname0) { IdentifyRequest *request = new IdentifyRequest(hostname0); diff --git a/src/Common/Request/IdentifyRequest.h b/src/Common/Requests/IdentifyRequest.h index 276da23..9fb45d9 100644 --- a/src/Common/Request/IdentifyRequest.h +++ b/src/Common/Requests/IdentifyRequest.h @@ -17,10 +17,10 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAD_COMMON_REQUEST_IDENTIFYREQUEST_H_ -#define MAD_COMMON_REQUEST_IDENTIFYREQUEST_H_ +#ifndef MAD_COMMON_REQUESTS_IDENTIFYREQUEST_H_ +#define MAD_COMMON_REQUESTS_IDENTIFYREQUEST_H_ -#include "Request.h" +#include "../Request.h" #include <string> namespace Mad { @@ -28,7 +28,7 @@ namespace Common { class RequestManager; -namespace Request { +namespace Requests { class IdentifyRequest : public Request { private: @@ -47,4 +47,4 @@ class IdentifyRequest : public Request { } } -#endif /* MAD_COMMON_REQUEST_IDENTIFYREQUEST_H_ */ +#endif /* MAD_COMMON_REQUESTS_IDENTIFYREQUEST_H_ */ diff --git a/src/Common/Requests/Makefile.am b/src/Common/Requests/Makefile.am new file mode 100644 index 0000000..6363b79 --- /dev/null +++ b/src/Common/Requests/Makefile.am @@ -0,0 +1,4 @@ +noinst_LTLIBRARIES = librequests.la +librequests_la_SOURCES = DisconnectRequest.cpp GSSAPIAuthRequest.cpp IdentifyRequest.cpp + +noinst_HEADERS = DisconnectRequest.h GSSAPIAuthRequest.h IdentifyRequest.h diff --git a/src/Common/Request/Makefile.in b/src/Common/Requests/Makefile.in index f44ec75..fc9d079 100644 --- a/src/Common/Request/Makefile.in +++ b/src/Common/Requests/Makefile.in @@ -33,7 +33,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -subdir = src/Common/Request +subdir = src/Common/Requests DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -44,10 +44,10 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) -librequest_la_LIBADD = -am_librequest_la_OBJECTS = DisconnectRequest.lo GSSAPIAuthRequest.lo \ +librequests_la_LIBADD = +am_librequests_la_OBJECTS = DisconnectRequest.lo GSSAPIAuthRequest.lo \ IdentifyRequest.lo -librequest_la_OBJECTS = $(am_librequest_la_OBJECTS) +librequests_la_OBJECTS = $(am_librequests_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -60,8 +60,8 @@ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(librequest_la_SOURCES) -DIST_SOURCES = $(librequest_la_SOURCES) +SOURCES = $(librequests_la_SOURCES) +DIST_SOURCES = $(librequests_la_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags @@ -182,9 +182,9 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = librequest.la -librequest_la_SOURCES = DisconnectRequest.cpp GSSAPIAuthRequest.cpp IdentifyRequest.cpp -noinst_HEADERS = DisconnectRequest.h GSSAPIAuthRequest.h IdentifyRequest.h Request.h +noinst_LTLIBRARIES = librequests.la +librequests_la_SOURCES = DisconnectRequest.cpp GSSAPIAuthRequest.cpp IdentifyRequest.cpp +noinst_HEADERS = DisconnectRequest.h GSSAPIAuthRequest.h IdentifyRequest.h all: all-am .SUFFIXES: @@ -198,9 +198,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Common/Request/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Common/Requests/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Common/Request/Makefile + $(AUTOMAKE) --gnu src/Common/Requests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -227,8 +227,8 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -librequest.la: $(librequest_la_OBJECTS) $(librequest_la_DEPENDENCIES) - $(CXXLINK) $(librequest_la_OBJECTS) $(librequest_la_LIBADD) $(LIBS) +librequests.la: $(librequests_la_OBJECTS) $(librequests_la_DEPENDENCIES) + $(CXXLINK) $(librequests_la_OBJECTS) $(librequests_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) diff --git a/src/Core/ConnectionManager.cpp b/src/Core/ConnectionManager.cpp index 39c6705..98288ba 100644 --- a/src/Core/ConnectionManager.cpp +++ b/src/Core/ConnectionManager.cpp @@ -19,8 +19,8 @@ #include "ConnectionManager.h" #include "ConfigManager.h" -#include "RequestHandler/CoreStatusRequestHandler.h" -#include "RequestHandler/GSSAPIAuthRequestHandler.h" +#include "RequestHandlers/CoreStatusRequestHandler.h" +#include "RequestHandlers/GSSAPIAuthRequestHandler.h" #include <Net/ServerConnection.h> #include <Net/Packet.h> #include <Net/Listener.h> @@ -54,8 +54,8 @@ void ConnectionManager::refreshPollfds() { } ConnectionManager::ConnectionManager(const ConfigManager& configManager) : requestManager(true) { - requestManager.registerPacketType<RequestHandler::CoreStatusRequestHandler>(Net::Packet::CORE_STATUS); - requestManager.registerPacketType<RequestHandler::GSSAPIAuthRequestHandler>(Net::Packet::GSSAPI_AUTH); + requestManager.registerPacketType<RequestHandlers::CoreStatusRequestHandler>(Net::Packet::CORE_STATUS); + requestManager.registerPacketType<RequestHandlers::GSSAPIAuthRequestHandler>(Net::Packet::GSSAPI_AUTH); const std::vector<Net::IPAddress> &listenerAddresses = configManager.getListenerAddresses(); diff --git a/src/Core/Makefile.am b/src/Core/Makefile.am index 3051814..fcbcd60 100644 --- a/src/Core/Makefile.am +++ b/src/Core/Makefile.am @@ -1,8 +1,8 @@ -SUBDIRS = RequestHandler +SUBDIRS = RequestHandlers noinst_LTLIBRARIES = libcore.la libcore_la_SOURCES = ConfigManager.cpp ConnectionManager.cpp -libcore_la_LIBADD = RequestHandler/librequesthandler.la +libcore_la_LIBADD = RequestHandlers/librequesthandlers.la noinst_HEADERS = ConfigManager.h ConnectionManager.h diff --git a/src/Core/Makefile.in b/src/Core/Makefile.in index e274531..9531b06 100644 --- a/src/Core/Makefile.in +++ b/src/Core/Makefile.in @@ -44,7 +44,7 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) -libcore_la_DEPENDENCIES = RequestHandler/librequesthandler.la +libcore_la_DEPENDENCIES = RequestHandlers/librequesthandlers.la am_libcore_la_OBJECTS = ConfigManager.lo ConnectionManager.lo libcore_la_OBJECTS = $(am_libcore_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src @@ -191,10 +191,10 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = RequestHandler +SUBDIRS = RequestHandlers noinst_LTLIBRARIES = libcore.la libcore_la_SOURCES = ConfigManager.cpp ConnectionManager.cpp -libcore_la_LIBADD = RequestHandler/librequesthandler.la +libcore_la_LIBADD = RequestHandlers/librequesthandlers.la noinst_HEADERS = ConfigManager.h ConnectionManager.h all: all-recursive diff --git a/src/Core/RequestHandler/Makefile.am b/src/Core/RequestHandler/Makefile.am deleted file mode 100644 index 3754a22..0000000 --- a/src/Core/RequestHandler/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -noinst_LTLIBRARIES = librequesthandler.la -librequesthandler_la_SOURCES = CoreStatusRequestHandler.cpp GSSAPIAuthRequestHandler.cpp - -noinst_HEADERS = CoreStatusRequestHandler.h GSSAPIAuthRequestHandler.h diff --git a/src/Core/RequestHandler/CoreStatusRequestHandler.cpp b/src/Core/RequestHandlers/CoreStatusRequestHandler.cpp index 9d923f5..352de86 100644 --- a/src/Core/RequestHandler/CoreStatusRequestHandler.cpp +++ b/src/Core/RequestHandlers/CoreStatusRequestHandler.cpp @@ -24,7 +24,7 @@ namespace Mad { namespace Core { -namespace RequestHandler { +namespace RequestHandlers { bool CoreStatusRequestHandler::handlePacket(Net::Connection *connection, const Net::Packet &packet) { if(isFinished()) diff --git a/src/Core/RequestHandler/CoreStatusRequestHandler.h b/src/Core/RequestHandlers/CoreStatusRequestHandler.h index dc822cb..c6c0da3 100644 --- a/src/Core/RequestHandler/CoreStatusRequestHandler.h +++ b/src/Core/RequestHandlers/CoreStatusRequestHandler.h @@ -20,13 +20,13 @@ #ifndef MAD_CORE_REQUESTHANDLER_CORESTATUSREQUESTHANDLER_H_ #define MAD_CORE_REQUESTHANDLER_CORESTATUSREQUESTHANDLER_H_ -#include <Common/RequestHandler/RequestHandler.h> +#include <Common/RequestHandler.h> namespace Mad { namespace Core { -namespace RequestHandler { +namespace RequestHandlers { -class CoreStatusRequestHandler : public Common::RequestHandler::RequestHandler { +class CoreStatusRequestHandler : public Common::RequestHandler { public: CoreStatusRequestHandler() {} diff --git a/src/Core/RequestHandler/GSSAPIAuthRequestHandler.cpp b/src/Core/RequestHandlers/GSSAPIAuthRequestHandler.cpp index 08c4751..c1b7e7c 100644 --- a/src/Core/RequestHandler/GSSAPIAuthRequestHandler.cpp +++ b/src/Core/RequestHandlers/GSSAPIAuthRequestHandler.cpp @@ -26,7 +26,7 @@ namespace Mad { namespace Core { -namespace RequestHandler { +namespace RequestHandlers { // TODO Error handling diff --git a/src/Core/RequestHandler/GSSAPIAuthRequestHandler.h b/src/Core/RequestHandlers/GSSAPIAuthRequestHandler.h index 590919f..a88969b 100644 --- a/src/Core/RequestHandler/GSSAPIAuthRequestHandler.h +++ b/src/Core/RequestHandlers/GSSAPIAuthRequestHandler.h @@ -20,14 +20,14 @@ #ifndef MAD_CORE_REQUESTHANDLER_GSSAPIAUTHREQUESTHANDLER_H_ #define MAD_CORE_REQUESTHANDLER_GSSAPIAUTHREQUESTHANDLER_H_ -#include <Common/RequestHandler/RequestHandler.h> +#include <Common/RequestHandler.h> #include <gssapi/gssapi.h> namespace Mad { namespace Core { -namespace RequestHandler { +namespace RequestHandlers { -class GSSAPIAuthRequestHandler : public Common::RequestHandler::RequestHandler { +class GSSAPIAuthRequestHandler : public Common::RequestHandler { private: gss_ctx_id_t gssContext; diff --git a/src/Core/RequestHandlers/Makefile.am b/src/Core/RequestHandlers/Makefile.am new file mode 100644 index 0000000..d556af6 --- /dev/null +++ b/src/Core/RequestHandlers/Makefile.am @@ -0,0 +1,4 @@ +noinst_LTLIBRARIES = librequesthandlers.la +librequesthandlers_la_SOURCES = CoreStatusRequestHandler.cpp GSSAPIAuthRequestHandler.cpp + +noinst_HEADERS = CoreStatusRequestHandler.h GSSAPIAuthRequestHandler.h diff --git a/src/Core/RequestHandler/Makefile.in b/src/Core/RequestHandlers/Makefile.in index 8b20b23..c6a8848 100644 --- a/src/Core/RequestHandler/Makefile.in +++ b/src/Core/RequestHandlers/Makefile.in @@ -33,7 +33,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -subdir = src/Core/RequestHandler +subdir = src/Core/RequestHandlers DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -44,10 +44,10 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) -librequesthandler_la_LIBADD = -am_librequesthandler_la_OBJECTS = CoreStatusRequestHandler.lo \ +librequesthandlers_la_LIBADD = +am_librequesthandlers_la_OBJECTS = CoreStatusRequestHandler.lo \ GSSAPIAuthRequestHandler.lo -librequesthandler_la_OBJECTS = $(am_librequesthandler_la_OBJECTS) +librequesthandlers_la_OBJECTS = $(am_librequesthandlers_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -60,8 +60,8 @@ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(librequesthandler_la_SOURCES) -DIST_SOURCES = $(librequesthandler_la_SOURCES) +SOURCES = $(librequesthandlers_la_SOURCES) +DIST_SOURCES = $(librequesthandlers_la_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags @@ -182,8 +182,8 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = librequesthandler.la -librequesthandler_la_SOURCES = CoreStatusRequestHandler.cpp GSSAPIAuthRequestHandler.cpp +noinst_LTLIBRARIES = librequesthandlers.la +librequesthandlers_la_SOURCES = CoreStatusRequestHandler.cpp GSSAPIAuthRequestHandler.cpp noinst_HEADERS = CoreStatusRequestHandler.h GSSAPIAuthRequestHandler.h all: all-am @@ -198,9 +198,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Core/RequestHandler/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Core/RequestHandlers/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Core/RequestHandler/Makefile + $(AUTOMAKE) --gnu src/Core/RequestHandlers/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -227,8 +227,8 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -librequesthandler.la: $(librequesthandler_la_OBJECTS) $(librequesthandler_la_DEPENDENCIES) - $(CXXLINK) $(librequesthandler_la_OBJECTS) $(librequesthandler_la_LIBADD) $(LIBS) +librequesthandlers.la: $(librequesthandlers_la_OBJECTS) $(librequesthandlers_la_DEPENDENCIES) + $(CXXLINK) $(librequesthandlers_la_OBJECTS) $(librequesthandlers_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) diff --git a/src/Daemon/Makefile.am b/src/Daemon/Makefile.am index 355fa65..c5d522f 100644 --- a/src/Daemon/Makefile.am +++ b/src/Daemon/Makefile.am @@ -1,8 +1,8 @@ -SUBDIRS = RequestHandler +SUBDIRS = RequestHandlers noinst_LTLIBRARIES = libdaemon.la libdaemon_la_SOURCES = -libdaemon_la_LIBADD = RequestHandler/librequesthandler.la +libdaemon_la_LIBADD = RequestHandlers/librequesthandlers.la noinst_HEADERS = diff --git a/src/Daemon/Makefile.in b/src/Daemon/Makefile.in index 6f7efcf..a299a0a 100644 --- a/src/Daemon/Makefile.in +++ b/src/Daemon/Makefile.in @@ -44,7 +44,7 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) -libdaemon_la_DEPENDENCIES = RequestHandler/librequesthandler.la +libdaemon_la_DEPENDENCIES = RequestHandlers/librequesthandlers.la am_libdaemon_la_OBJECTS = libdaemon_la_OBJECTS = $(am_libdaemon_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src @@ -189,10 +189,10 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = RequestHandler +SUBDIRS = RequestHandlers noinst_LTLIBRARIES = libdaemon.la libdaemon_la_SOURCES = -libdaemon_la_LIBADD = RequestHandler/librequesthandler.la +libdaemon_la_LIBADD = RequestHandlers/librequesthandlers.la noinst_HEADERS = all: all-recursive diff --git a/src/Daemon/RequestHandler/Makefile.am b/src/Daemon/RequestHandler/Makefile.am deleted file mode 100644 index 7e1c298..0000000 --- a/src/Daemon/RequestHandler/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -noinst_LTLIBRARIES = librequesthandler.la -librequesthandler_la_SOURCES = - -noinst_HEADERS = diff --git a/src/Daemon/RequestHandlers/Makefile.am b/src/Daemon/RequestHandlers/Makefile.am new file mode 100644 index 0000000..2108fe5 --- /dev/null +++ b/src/Daemon/RequestHandlers/Makefile.am @@ -0,0 +1,4 @@ +noinst_LTLIBRARIES = librequesthandlers.la +librequesthandlers_la_SOURCES = + +noinst_HEADERS = diff --git a/src/Daemon/RequestHandler/Makefile.in b/src/Daemon/RequestHandlers/Makefile.in index 814f907..5c64103 100644 --- a/src/Daemon/RequestHandler/Makefile.in +++ b/src/Daemon/RequestHandlers/Makefile.in @@ -33,7 +33,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -subdir = src/Daemon/RequestHandler +subdir = src/Daemon/RequestHandlers DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -44,9 +44,9 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) -librequesthandler_la_LIBADD = -am_librequesthandler_la_OBJECTS = -librequesthandler_la_OBJECTS = $(am_librequesthandler_la_OBJECTS) +librequesthandlers_la_LIBADD = +am_librequesthandlers_la_OBJECTS = +librequesthandlers_la_OBJECTS = $(am_librequesthandlers_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -57,8 +57,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(librequesthandler_la_SOURCES) -DIST_SOURCES = $(librequesthandler_la_SOURCES) +SOURCES = $(librequesthandlers_la_SOURCES) +DIST_SOURCES = $(librequesthandlers_la_SOURCES) HEADERS = $(noinst_HEADERS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -177,8 +177,8 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = librequesthandler.la -librequesthandler_la_SOURCES = +noinst_LTLIBRARIES = librequesthandlers.la +librequesthandlers_la_SOURCES = noinst_HEADERS = all: all-am @@ -192,9 +192,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Daemon/RequestHandler/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Daemon/RequestHandlers/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Daemon/RequestHandler/Makefile + $(AUTOMAKE) --gnu src/Daemon/RequestHandlers/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -221,8 +221,8 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -librequesthandler.la: $(librequesthandler_la_OBJECTS) $(librequesthandler_la_DEPENDENCIES) - $(LINK) $(librequesthandler_la_OBJECTS) $(librequesthandler_la_LIBADD) $(LIBS) +librequesthandlers.la: $(librequesthandlers_la_OBJECTS) $(librequesthandlers_la_DEPENDENCIES) + $(LINK) $(librequesthandlers_la_OBJECTS) $(librequesthandlers_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) diff --git a/src/mad.cpp b/src/mad.cpp index 177b88a..613747b 100644 --- a/src/mad.cpp +++ b/src/mad.cpp @@ -20,7 +20,7 @@ #include "Net/ClientConnection.h" #include "Net/IPAddress.h" #include "Common/RequestManager.h" -#include "Common/Request/IdentifyRequest.h" +#include "Common/Requests/IdentifyRequest.h" #include <iostream> #include <unistd.h> @@ -46,7 +46,7 @@ int main() { char hostname[256]; gethostname(hostname, sizeof(hostname)); - Mad::Common::Request::IdentifyRequest::send(connection, requestManager, hostname); + Mad::Common::Requests::IdentifyRequest::send(connection, requestManager, hostname); while(connection->isConnected()) { struct pollfd fd = connection->getPollfd(); |