diff options
Diffstat (limited to 'src/Common')
-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 |
22 files changed, 95 insertions, 101 deletions
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) |