diff options
-rw-r--r-- | .hgignore | 2 | ||||
-rwxr-xr-x | configure | 8 | ||||
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | src/Common/RequestManager.cpp | 2 | ||||
-rw-r--r-- | src/Common/RequestManager.h | 10 | ||||
-rw-r--r-- | src/Core/Makefile.am | 8 | ||||
-rw-r--r-- | src/Makefile.am | 34 | ||||
-rw-r--r-- | src/Makefile.in | 40 | ||||
-rw-r--r-- | src/Server/ConnectionManager.cpp (renamed from src/Core/ConnectionManager.cpp) | 4 | ||||
-rw-r--r-- | src/Server/ConnectionManager.h (renamed from src/Core/ConnectionManager.h) | 8 | ||||
-rw-r--r-- | src/Server/Makefile.am | 8 | ||||
-rw-r--r-- | src/Server/Makefile.in (renamed from src/Core/Makefile.in) | 26 | ||||
-rw-r--r-- | src/Server/RequestHandlers/DaemonCommandRequestHandler.cpp (renamed from src/Core/RequestHandlers/DaemonCommandRequestHandler.cpp) | 5 | ||||
-rw-r--r-- | src/Server/RequestHandlers/DaemonCommandRequestHandler.h (renamed from src/Core/RequestHandlers/DaemonCommandRequestHandler.h) | 8 | ||||
-rw-r--r-- | src/Server/RequestHandlers/DaemonFSInfoRequestHandler.cpp (renamed from src/Core/RequestHandlers/DaemonFSInfoRequestHandler.cpp) | 2 | ||||
-rw-r--r-- | src/Server/RequestHandlers/DaemonFSInfoRequestHandler.h (renamed from src/Core/RequestHandlers/DaemonFSInfoRequestHandler.h) | 8 | ||||
-rw-r--r-- | src/Server/RequestHandlers/DaemonListRequestHandler.cpp (renamed from src/Core/RequestHandlers/DaemonListRequestHandler.cpp) | 2 | ||||
-rw-r--r-- | src/Server/RequestHandlers/DaemonListRequestHandler.h (renamed from src/Core/RequestHandlers/DaemonListRequestHandler.h) | 8 | ||||
-rw-r--r-- | src/Server/RequestHandlers/DaemonStatusRequestHandler.cpp (renamed from src/Core/RequestHandlers/DaemonStatusRequestHandler.cpp) | 2 | ||||
-rw-r--r-- | src/Server/RequestHandlers/DaemonStatusRequestHandler.h (renamed from src/Core/RequestHandlers/DaemonStatusRequestHandler.h) | 8 | ||||
-rw-r--r-- | src/Server/RequestHandlers/GSSAPIAuthRequestHandler.cpp (renamed from src/Core/RequestHandlers/GSSAPIAuthRequestHandler.cpp) | 2 | ||||
-rw-r--r-- | src/Server/RequestHandlers/GSSAPIAuthRequestHandler.h (renamed from src/Core/RequestHandlers/GSSAPIAuthRequestHandler.h) | 8 | ||||
-rw-r--r-- | src/Server/RequestHandlers/IdentifyRequestHandler.cpp (renamed from src/Core/RequestHandlers/IdentifyRequestHandler.cpp) | 2 | ||||
-rw-r--r-- | src/Server/RequestHandlers/IdentifyRequestHandler.h (renamed from src/Core/RequestHandlers/IdentifyRequestHandler.h) | 8 | ||||
-rw-r--r-- | src/Server/RequestHandlers/LogRequestHandler.cpp (renamed from src/Core/RequestHandlers/LogRequestHandler.cpp) | 2 | ||||
-rw-r--r-- | src/Server/RequestHandlers/LogRequestHandler.h (renamed from src/Core/RequestHandlers/LogRequestHandler.h) | 8 | ||||
-rw-r--r-- | src/Server/RequestHandlers/Makefile.am (renamed from src/Core/RequestHandlers/Makefile.am) | 0 | ||||
-rw-r--r-- | src/Server/RequestHandlers/Makefile.in (renamed from src/Core/RequestHandlers/Makefile.in) | 6 | ||||
-rw-r--r-- | src/Server/RequestHandlers/UserInfoRequestHandler.cpp (renamed from src/Core/RequestHandlers/UserInfoRequestHandler.cpp) | 2 | ||||
-rw-r--r-- | src/Server/RequestHandlers/UserInfoRequestHandler.h (renamed from src/Core/RequestHandlers/UserInfoRequestHandler.h) | 8 | ||||
-rw-r--r-- | src/Server/RequestHandlers/UserListRequestHandler.cpp (renamed from src/Core/RequestHandlers/UserListRequestHandler.cpp) | 2 | ||||
-rw-r--r-- | src/Server/RequestHandlers/UserListRequestHandler.h (renamed from src/Core/RequestHandlers/UserListRequestHandler.h) | 8 | ||||
-rw-r--r-- | src/Server/Requests/CommandRequest.cpp (renamed from src/Core/Requests/CommandRequest.cpp) | 2 | ||||
-rw-r--r-- | src/Server/Requests/CommandRequest.h (renamed from src/Core/Requests/CommandRequest.h) | 8 | ||||
-rw-r--r-- | src/Server/Requests/DaemonStateUpdateRequest.cpp (renamed from src/Core/Requests/DaemonStateUpdateRequest.cpp) | 2 | ||||
-rw-r--r-- | src/Server/Requests/DaemonStateUpdateRequest.h (renamed from src/Core/Requests/DaemonStateUpdateRequest.h) | 8 | ||||
-rw-r--r-- | src/Server/Requests/Makefile.am (renamed from src/Core/Requests/Makefile.am) | 0 | ||||
-rw-r--r-- | src/Server/Requests/Makefile.in (renamed from src/Core/Requests/Makefile.in) | 6 | ||||
-rw-r--r-- | src/Server/UserBackend.h (renamed from src/Core/UserBackend.h) | 8 | ||||
-rw-r--r-- | src/Server/UserManager.cpp (renamed from src/Core/UserManager.cpp) | 2 | ||||
-rw-r--r-- | src/Server/UserManager.h (renamed from src/Core/UserManager.h) | 8 | ||||
-rw-r--r-- | src/mad-server.conf (renamed from src/mad-core.conf) | 2 | ||||
-rw-r--r-- | src/mad-server.cpp (renamed from src/mad-core.cpp) | 10 | ||||
-rw-r--r-- | src/modules/UserBackendMysql.cpp | 4 | ||||
-rw-r--r-- | src/modules/UserBackendMysql.h | 6 |
45 files changed, 161 insertions, 160 deletions
@@ -39,7 +39,7 @@ syntax: regexp syntax: regexp ^configure\.lineno$ -^src/mad-core\.log$ +^src/mad-server\.log$ syntax: regexp ^lib/time\.h$ @@ -26803,7 +26803,7 @@ fi -ac_config_files="$ac_config_files Makefile lib/Makefile libltdl/Makefile src/Makefile src/Client/Makefile src/Client/Requests/Makefile src/Common/Makefile src/Common/Requests/Makefile src/Common/RequestHandlers/Makefile src/Core/Makefile src/Core/Requests/Makefile src/Core/RequestHandlers/Makefile src/Daemon/Makefile src/Daemon/Backends/Makefile src/Daemon/Requests/Makefile src/Daemon/RequestHandlers/Makefile src/Net/Makefile src/modules/Makefile" +ac_config_files="$ac_config_files Makefile lib/Makefile libltdl/Makefile src/Makefile src/Client/Makefile src/Client/Requests/Makefile src/Common/Makefile src/Common/Requests/Makefile src/Common/RequestHandlers/Makefile src/Daemon/Makefile src/Daemon/Backends/Makefile src/Daemon/Requests/Makefile src/Daemon/RequestHandlers/Makefile src/Net/Makefile src/Server/Makefile src/Server/Requests/Makefile src/Server/RequestHandlers/Makefile src/modules/Makefile" cat >confcache <<\_ACEOF @@ -27905,14 +27905,14 @@ do "src/Common/Makefile") CONFIG_FILES="$CONFIG_FILES src/Common/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/Requests/Makefile") CONFIG_FILES="$CONFIG_FILES src/Core/Requests/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/Backends/Makefile") CONFIG_FILES="$CONFIG_FILES src/Daemon/Backends/Makefile" ;; "src/Daemon/Requests/Makefile") CONFIG_FILES="$CONFIG_FILES src/Daemon/Requests/Makefile" ;; "src/Daemon/RequestHandlers/Makefile") CONFIG_FILES="$CONFIG_FILES src/Daemon/RequestHandlers/Makefile" ;; "src/Net/Makefile") CONFIG_FILES="$CONFIG_FILES src/Net/Makefile" ;; + "src/Server/Makefile") CONFIG_FILES="$CONFIG_FILES src/Server/Makefile" ;; + "src/Server/Requests/Makefile") CONFIG_FILES="$CONFIG_FILES src/Server/Requests/Makefile" ;; + "src/Server/RequestHandlers/Makefile") CONFIG_FILES="$CONFIG_FILES src/Server/RequestHandlers/Makefile" ;; "src/modules/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/Makefile" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 diff --git a/configure.ac b/configure.ac index 9f8573e..fe6363d 100644 --- a/configure.ac +++ b/configure.ac @@ -107,14 +107,14 @@ AC_CONFIG_FILES([ src/Common/Makefile src/Common/Requests/Makefile src/Common/RequestHandlers/Makefile - src/Core/Makefile - src/Core/Requests/Makefile - src/Core/RequestHandlers/Makefile src/Daemon/Makefile src/Daemon/Backends/Makefile src/Daemon/Requests/Makefile src/Daemon/RequestHandlers/Makefile src/Net/Makefile + src/Server/Makefile + src/Server/Requests/Makefile + src/Server/RequestHandlers/Makefile src/modules/Makefile ]) diff --git a/src/Common/RequestManager.cpp b/src/Common/RequestManager.cpp index 75f07cf..1edf778 100644 --- a/src/Common/RequestManager.cpp +++ b/src/Common/RequestManager.cpp @@ -144,7 +144,7 @@ void RequestManager::unregisterPacketType(const std::string &type) { requestHandlerFactories.erase(it); } -RequestManager::RequestManager() : core(false), lastRequestId(-1) { +RequestManager::RequestManager() : server(false), lastRequestId(-1) { registerPacketType<RequestHandlers::DisconnectRequestHandler>("Disconnect"); } diff --git a/src/Common/RequestManager.h b/src/Common/RequestManager.h index c94200f..e9ce189 100644 --- a/src/Common/RequestManager.h +++ b/src/Common/RequestManager.h @@ -72,7 +72,7 @@ class RequestManager { static RequestManager requestManager; std::map<Connection*,RequestMap*> requestMaps; - bool core; + bool server; uint16_t lastRequestId; std::map<std::string,RequestHandlerFactory*> requestHandlerFactories; @@ -98,11 +98,11 @@ class RequestManager { return &requestManager; } - bool isCore() const {return core;} - void setCore(bool newCore) { - core = newCore; + bool isServer() const {return server;} + void setServer(bool newServer) { + server = newServer; - if(core) + if(server) lastRequestId &= ~0x01; else lastRequestId |= 0x01; diff --git a/src/Core/Makefile.am b/src/Core/Makefile.am deleted file mode 100644 index a5e780b..0000000 --- a/src/Core/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -SUBDIRS = Requests RequestHandlers - -noinst_LTLIBRARIES = libcore.la - -libcore_la_SOURCES = ConnectionManager.cpp UserManager.cpp -libcore_la_LIBADD = Requests/librequests.la RequestHandlers/librequesthandlers.la - -noinst_HEADERS = ConnectionManager.h UserBackend.h UserManager.h diff --git a/src/Makefile.am b/src/Makefile.am index 9b1a9a2..3b9607f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,34 +1,34 @@ -SUBDIRS = Common Client Core Daemon Net modules +SUBDIRS = Common Client Server Daemon Net modules daemon_modules = -dlpreopen modules/FileLogger.la -core_modules = -dlpreopen modules/FileLogger.la +server_modules = -dlpreopen modules/FileLogger.la if SYSTEMBACKEND_POSIX daemon_modules += -dlpreopen modules/SystemBackendPosix.la -core_modules += -dlpreopen modules/SystemBackendPosix.la +server_modules += -dlpreopen modules/SystemBackendPosix.la endif if SYSTEMBACKEND_PROC daemon_modules += -dlpreopen modules/SystemBackendProc.la -core_modules += -dlpreopen modules/SystemBackendProc.la +server_modules += -dlpreopen modules/SystemBackendProc.la endif if USERBACKEND_MYSQL -core_modules += -dlopen modules/UserBackendMysql.la +server_modules += -dlopen modules/UserBackendMysql.la endif -bin_PROGRAMS = mad madc mad-core +bin_PROGRAMS = mad madc mad-server -mad_SOURCES = mad.cpp -mad_LDADD = Daemon/libdaemon.la Common/libcommon.la Net/libnet.la \ - $(libxml2_LIBS) $(sigc_LIBS) $(GnuTLS_LIBS) @LIBLTDL@ $(daemon_modules) -mad_LDFLAGS = -export-dynamic +mad_SOURCES = mad.cpp +mad_LDADD = Daemon/libdaemon.la Common/libcommon.la Net/libnet.la \ + $(libxml2_LIBS) $(sigc_LIBS) $(GnuTLS_LIBS) @LIBLTDL@ $(daemon_modules) +mad_LDFLAGS = -export-dynamic -madc_SOURCES = madc.cpp -madc_LDADD = Client/libclient.la Common/libcommon.la Net/libnet.la \ - $(libxml2_LIBS) $(sigc_LIBS) $(GnuTLS_LIBS) $(READLINE_LIBS) +madc_SOURCES = madc.cpp +madc_LDADD = Client/libclient.la Common/libcommon.la Net/libnet.la \ + $(libxml2_LIBS) $(sigc_LIBS) $(GnuTLS_LIBS) $(READLINE_LIBS) -mad_core_SOURCES = mad-core.cpp -mad_core_LDADD = Core/libcore.la Common/libcommon.la Net/libnet.la \ - $(libxml2_LIBS) $(sigc_LIBS) $(GnuTLS_LIBS) $(GSSAPI_LIBS) @LIBLTDL@ $(core_modules) -mad_core_LDFLAGS = -export-dynamic +mad_server_SOURCES = mad-server.cpp +mad_server_LDADD = Server/libserver.la Common/libcommon.la Net/libnet.la \ + $(libxml2_LIBS) $(sigc_LIBS) $(GnuTLS_LIBS) $(GSSAPI_LIBS) @LIBLTDL@ $(server_modules) +mad_server_LDFLAGS = -export-dynamic diff --git a/src/Makefile.in b/src/Makefile.in index 315b096..c431af6 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -37,7 +37,7 @@ host_triplet = @host@ @SYSTEMBACKEND_PROC_TRUE@am__append_3 = -dlpreopen modules/SystemBackendProc.la @SYSTEMBACKEND_PROC_TRUE@am__append_4 = -dlpreopen modules/SystemBackendProc.la @USERBACKEND_MYSQL_TRUE@am__append_5 = -dlopen modules/UserBackendMysql.la -bin_PROGRAMS = mad$(EXEEXT) madc$(EXEEXT) mad-core$(EXEEXT) +bin_PROGRAMS = mad$(EXEEXT) madc$(EXEEXT) mad-server$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -80,19 +80,19 @@ mad_DEPENDENCIES = Daemon/libdaemon.la Common/libcommon.la \ mad_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(mad_LDFLAGS) \ $(LDFLAGS) -o $@ -am_mad_core_OBJECTS = mad-core.$(OBJEXT) -mad_core_OBJECTS = $(am_mad_core_OBJECTS) +am_mad_server_OBJECTS = mad-server.$(OBJEXT) +mad_server_OBJECTS = $(am_mad_server_OBJECTS) @USERBACKEND_MYSQL_TRUE@am__DEPENDENCIES_5 = \ @USERBACKEND_MYSQL_TRUE@ modules/UserBackendMysql.la am__DEPENDENCIES_6 = modules/FileLogger.la $(am__DEPENDENCIES_2) \ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_5) -mad_core_DEPENDENCIES = Core/libcore.la Common/libcommon.la \ +mad_server_DEPENDENCIES = Server/libserver.la Common/libcommon.la \ Net/libnet.la $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_6) -mad_core_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ +mad_server_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(mad_core_LDFLAGS) $(LDFLAGS) -o $@ + $(CXXFLAGS) $(mad_server_LDFLAGS) $(LDFLAGS) -o $@ am_madc_OBJECTS = madc.$(OBJEXT) madc_OBJECTS = $(am_madc_OBJECTS) madc_DEPENDENCIES = Client/libclient.la Common/libcommon.la \ @@ -110,8 +110,8 @@ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(mad_SOURCES) $(mad_core_SOURCES) $(madc_SOURCES) -DIST_SOURCES = $(mad_SOURCES) $(mad_core_SOURCES) $(madc_SOURCES) +SOURCES = $(mad_SOURCES) $(mad_server_SOURCES) $(madc_SOURCES) +DIST_SOURCES = $(mad_SOURCES) $(mad_server_SOURCES) $(madc_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ @@ -308,25 +308,25 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = Common Client Core Daemon Net modules +SUBDIRS = Common Client Server Daemon Net modules daemon_modules = -dlpreopen modules/FileLogger.la $(am__append_1) \ $(am__append_3) -core_modules = -dlpreopen modules/FileLogger.la $(am__append_2) \ +server_modules = -dlpreopen modules/FileLogger.la $(am__append_2) \ $(am__append_4) $(am__append_5) mad_SOURCES = mad.cpp mad_LDADD = Daemon/libdaemon.la Common/libcommon.la Net/libnet.la \ - $(libxml2_LIBS) $(sigc_LIBS) $(GnuTLS_LIBS) @LIBLTDL@ $(daemon_modules) + $(libxml2_LIBS) $(sigc_LIBS) $(GnuTLS_LIBS) @LIBLTDL@ $(daemon_modules) mad_LDFLAGS = -export-dynamic madc_SOURCES = madc.cpp madc_LDADD = Client/libclient.la Common/libcommon.la Net/libnet.la \ - $(libxml2_LIBS) $(sigc_LIBS) $(GnuTLS_LIBS) $(READLINE_LIBS) + $(libxml2_LIBS) $(sigc_LIBS) $(GnuTLS_LIBS) $(READLINE_LIBS) -mad_core_SOURCES = mad-core.cpp -mad_core_LDADD = Core/libcore.la Common/libcommon.la Net/libnet.la \ - $(libxml2_LIBS) $(sigc_LIBS) $(GnuTLS_LIBS) $(GSSAPI_LIBS) @LIBLTDL@ $(core_modules) +mad_server_SOURCES = mad-server.cpp +mad_server_LDADD = Server/libserver.la Common/libcommon.la Net/libnet.la \ + $(libxml2_LIBS) $(sigc_LIBS) $(GnuTLS_LIBS) $(GSSAPI_LIBS) @LIBLTDL@ $(server_modules) -mad_core_LDFLAGS = -export-dynamic +mad_server_LDFLAGS = -export-dynamic all: all-recursive .SUFFIXES: @@ -391,9 +391,9 @@ clean-binPROGRAMS: mad$(EXEEXT): $(mad_OBJECTS) $(mad_DEPENDENCIES) @rm -f mad$(EXEEXT) $(mad_LINK) $(mad_OBJECTS) $(mad_LDADD) $(LIBS) -mad-core$(EXEEXT): $(mad_core_OBJECTS) $(mad_core_DEPENDENCIES) - @rm -f mad-core$(EXEEXT) - $(mad_core_LINK) $(mad_core_OBJECTS) $(mad_core_LDADD) $(LIBS) +mad-server$(EXEEXT): $(mad_server_OBJECTS) $(mad_server_DEPENDENCIES) + @rm -f mad-server$(EXEEXT) + $(mad_server_LINK) $(mad_server_OBJECTS) $(mad_server_LDADD) $(LIBS) madc$(EXEEXT): $(madc_OBJECTS) $(madc_DEPENDENCIES) @rm -f madc$(EXEEXT) $(CXXLINK) $(madc_OBJECTS) $(madc_LDADD) $(LIBS) @@ -404,7 +404,7 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mad-core.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mad-server.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mad.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/madc.Po@am__quote@ diff --git a/src/Core/ConnectionManager.cpp b/src/Server/ConnectionManager.cpp index 4f8f90d..279304c 100644 --- a/src/Core/ConnectionManager.cpp +++ b/src/Server/ConnectionManager.cpp @@ -42,7 +42,7 @@ #include <algorithm> namespace Mad { -namespace Core { +namespace Server { ConnectionManager ConnectionManager::connectionManager; @@ -166,7 +166,7 @@ void ConnectionManager::configFinished() { } void ConnectionManager::doInit() { - Common::RequestManager::get()->setCore(true); + Common::RequestManager::get()->setServer(true); Net::Connection::init(); diff --git a/src/Core/ConnectionManager.h b/src/Server/ConnectionManager.h index 75395ad..5072897 100644 --- a/src/Core/ConnectionManager.h +++ b/src/Server/ConnectionManager.h @@ -17,8 +17,8 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAD_CORE_CONNECTIONMANAGER_H_ -#define MAD_CORE_CONNECTIONMANAGER_H_ +#ifndef MAD_SERVER_CONNECTIONMANAGER_H_ +#define MAD_SERVER_CONNECTIONMANAGER_H_ #include <list> #include <vector> @@ -40,7 +40,7 @@ class ServerConnection; class Packet; } -namespace Core { +namespace Server { class ConnectionManager : public Common::Configurable, public Common::Initializable { private: @@ -128,4 +128,4 @@ class ConnectionManager : public Common::Configurable, public Common::Initializa } } -#endif /*MAD_CORE_CONNECTIONMANAGER_H_*/ +#endif /*MAD_SERVER_CONNECTIONMANAGER_H_*/ diff --git a/src/Server/Makefile.am b/src/Server/Makefile.am new file mode 100644 index 0000000..cd6a409 --- /dev/null +++ b/src/Server/Makefile.am @@ -0,0 +1,8 @@ +SUBDIRS = Requests RequestHandlers + +noinst_LTLIBRARIES = libserver.la + +libserver_la_SOURCES = ConnectionManager.cpp UserManager.cpp +libserver_la_LIBADD = Requests/librequests.la RequestHandlers/librequesthandlers.la + +noinst_HEADERS = ConnectionManager.h UserBackend.h UserManager.h diff --git a/src/Core/Makefile.in b/src/Server/Makefile.in index bdeb29a..6e94f54 100644 --- a/src/Core/Makefile.in +++ b/src/Server/Makefile.in @@ -33,7 +33,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -subdir = src/Core +subdir = src/Server DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -59,10 +59,10 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) -libcore_la_DEPENDENCIES = Requests/librequests.la \ +libserver_la_DEPENDENCIES = Requests/librequests.la \ RequestHandlers/librequesthandlers.la -am_libcore_la_OBJECTS = ConnectionManager.lo UserManager.lo -libcore_la_OBJECTS = $(am_libcore_la_OBJECTS) +am_libserver_la_OBJECTS = ConnectionManager.lo UserManager.lo +libserver_la_OBJECTS = $(am_libserver_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles @@ -75,8 +75,8 @@ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libcore_la_SOURCES) -DIST_SOURCES = $(libcore_la_SOURCES) +SOURCES = $(libserver_la_SOURCES) +DIST_SOURCES = $(libserver_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ @@ -275,9 +275,9 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = Requests RequestHandlers -noinst_LTLIBRARIES = libcore.la -libcore_la_SOURCES = ConnectionManager.cpp UserManager.cpp -libcore_la_LIBADD = Requests/librequests.la RequestHandlers/librequesthandlers.la +noinst_LTLIBRARIES = libserver.la +libserver_la_SOURCES = ConnectionManager.cpp UserManager.cpp +libserver_la_LIBADD = Requests/librequests.la RequestHandlers/librequesthandlers.la noinst_HEADERS = ConnectionManager.h UserBackend.h UserManager.h all: all-recursive @@ -292,9 +292,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Core/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Server/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Core/Makefile + $(AUTOMAKE) --gnu src/Server/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -321,8 +321,8 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libcore.la: $(libcore_la_OBJECTS) $(libcore_la_DEPENDENCIES) - $(CXXLINK) $(libcore_la_OBJECTS) $(libcore_la_LIBADD) $(LIBS) +libserver.la: $(libserver_la_OBJECTS) $(libserver_la_DEPENDENCIES) + $(CXXLINK) $(libserver_la_OBJECTS) $(libserver_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) diff --git a/src/Core/RequestHandlers/DaemonCommandRequestHandler.cpp b/src/Server/RequestHandlers/DaemonCommandRequestHandler.cpp index 0e316bc..7c1efb9 100644 --- a/src/Core/RequestHandlers/DaemonCommandRequestHandler.cpp +++ b/src/Server/RequestHandlers/DaemonCommandRequestHandler.cpp @@ -19,11 +19,12 @@ #include "DaemonCommandRequestHandler.h" #include "../ConnectionManager.h" +#include "../Requests/CommandRequest.h" + #include <Common/Logger.h> -#include <Core/Requests/CommandRequest.h> namespace Mad { -namespace Core { +namespace Server { namespace RequestHandlers { void DaemonCommandRequestHandler::handlePacket(const Common::XmlPacket &packet) { diff --git a/src/Core/RequestHandlers/DaemonCommandRequestHandler.h b/src/Server/RequestHandlers/DaemonCommandRequestHandler.h index aab9539..6bd1278 100644 --- a/src/Core/RequestHandlers/DaemonCommandRequestHandler.h +++ b/src/Server/RequestHandlers/DaemonCommandRequestHandler.h @@ -17,15 +17,15 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAD_CORE_REQUESTHANDLERS_DAEMONCOMMANDREQUESTHANDLER_H_ -#define MAD_CORE_REQUESTHANDLERS_DAEMONCOMMANDREQUESTHANDLER_H_ +#ifndef MAD_SERVER_REQUESTHANDLERS_DAEMONCOMMANDREQUESTHANDLER_H_ +#define MAD_SERVER_REQUESTHANDLERS_DAEMONCOMMANDREQUESTHANDLER_H_ #include <Common/RequestHandler.h> #include <Common/Request.h> #include <stdint.h> namespace Mad { -namespace Core { +namespace Server { namespace RequestHandlers { class DaemonCommandRequestHandler : public Common::RequestHandler { @@ -44,4 +44,4 @@ class DaemonCommandRequestHandler : public Common::RequestHandler { } } -#endif /* MAD_CORE_REQUESTHANDLERS_DAEMONCOMMANDREQUESTHANDLER_H_ */ +#endif /* MAD_SERVER_REQUESTHANDLERS_DAEMONCOMMANDREQUESTHANDLER_H_ */ diff --git a/src/Core/RequestHandlers/DaemonFSInfoRequestHandler.cpp b/src/Server/RequestHandlers/DaemonFSInfoRequestHandler.cpp index 547611c..9ccca40 100644 --- a/src/Core/RequestHandlers/DaemonFSInfoRequestHandler.cpp +++ b/src/Server/RequestHandlers/DaemonFSInfoRequestHandler.cpp @@ -24,7 +24,7 @@ namespace Mad { -namespace Core { +namespace Server { namespace RequestHandlers { void DaemonFSInfoRequestHandler::handlePacket(const Common::XmlPacket &packet) { diff --git a/src/Core/RequestHandlers/DaemonFSInfoRequestHandler.h b/src/Server/RequestHandlers/DaemonFSInfoRequestHandler.h index 66800d8..3352f11 100644 --- a/src/Core/RequestHandlers/DaemonFSInfoRequestHandler.h +++ b/src/Server/RequestHandlers/DaemonFSInfoRequestHandler.h @@ -17,15 +17,15 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAD_CORE_REQUESTHANDLERS_DAEMONFSINFOREQUESTHANDLER_H_ -#define MAD_CORE_REQUESTHANDLERS_DAEMONFSINFOREQUESTHANDLER_H_ +#ifndef MAD_SERVER_REQUESTHANDLERS_DAEMONFSINFOREQUESTHANDLER_H_ +#define MAD_SERVER_REQUESTHANDLERS_DAEMONFSINFOREQUESTHANDLER_H_ #include <Common/RequestHandler.h> #include <Common/Request.h> #include <stdint.h> namespace Mad { -namespace Core { +namespace Server { namespace RequestHandlers { class DaemonFSInfoRequestHandler : public Common::RequestHandler { @@ -44,4 +44,4 @@ class DaemonFSInfoRequestHandler : public Common::RequestHandler { } } -#endif /* MAD_CORE_REQUESTHANDLERS_DAEMONFSINFOREQUESTHANDLER_H_ */ +#endif /* MAD_SERVER_REQUESTHANDLERS_DAEMONFSINFOREQUESTHANDLER_H_ */ diff --git a/src/Core/RequestHandlers/DaemonListRequestHandler.cpp b/src/Server/RequestHandlers/DaemonListRequestHandler.cpp index 84d3207..c4b4143 100644 --- a/src/Core/RequestHandlers/DaemonListRequestHandler.cpp +++ b/src/Server/RequestHandlers/DaemonListRequestHandler.cpp @@ -22,7 +22,7 @@ #include <Common/Logger.h> namespace Mad { -namespace Core { +namespace Server { namespace RequestHandlers { void DaemonListRequestHandler::handlePacket(const Common::XmlPacket &packet) { diff --git a/src/Core/RequestHandlers/DaemonListRequestHandler.h b/src/Server/RequestHandlers/DaemonListRequestHandler.h index a469603..8726962 100644 --- a/src/Core/RequestHandlers/DaemonListRequestHandler.h +++ b/src/Server/RequestHandlers/DaemonListRequestHandler.h @@ -17,13 +17,13 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAD_CORE_REQUESTHANDLERS_DAEMONLISTREQUESTHANDLER_H_ -#define MAD_CORE_REQUESTHANDLERS_DAEMONLISTREQUESTHANDLER_H_ +#ifndef MAD_SERVER_REQUESTHANDLERS_DAEMONLISTREQUESTHANDLER_H_ +#define MAD_SERVER_REQUESTHANDLERS_DAEMONLISTREQUESTHANDLER_H_ #include <Common/RequestHandler.h> namespace Mad { -namespace Core { +namespace Server { namespace RequestHandlers { class DaemonListRequestHandler : public Common::RequestHandler { @@ -39,4 +39,4 @@ class DaemonListRequestHandler : public Common::RequestHandler { } } -#endif /* MAD_CORE_REQUESTHANDLERS_DAEMONLISTREQUESTHANDLER_H_ */ +#endif /* MAD_SERVER_REQUESTHANDLERS_DAEMONLISTREQUESTHANDLER_H_ */ diff --git a/src/Core/RequestHandlers/DaemonStatusRequestHandler.cpp b/src/Server/RequestHandlers/DaemonStatusRequestHandler.cpp index a84307b..07e0c4c 100644 --- a/src/Core/RequestHandlers/DaemonStatusRequestHandler.cpp +++ b/src/Server/RequestHandlers/DaemonStatusRequestHandler.cpp @@ -24,7 +24,7 @@ namespace Mad { -namespace Core { +namespace Server { namespace RequestHandlers { void DaemonStatusRequestHandler::handlePacket(const Common::XmlPacket &packet) { diff --git a/src/Core/RequestHandlers/DaemonStatusRequestHandler.h b/src/Server/RequestHandlers/DaemonStatusRequestHandler.h index 5ef6089..8e61ada 100644 --- a/src/Core/RequestHandlers/DaemonStatusRequestHandler.h +++ b/src/Server/RequestHandlers/DaemonStatusRequestHandler.h @@ -17,15 +17,15 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAD_CORE_REQUESTHANDLERS_DAEMONSTATUSREQUESTHANDLER_H_ -#define MAD_CORE_REQUESTHANDLERS_DAEMONSTATUSREQUESTHANDLER_H_ +#ifndef MAD_SERVER_REQUESTHANDLERS_DAEMONSTATUSREQUESTHANDLER_H_ +#define MAD_SERVER_REQUESTHANDLERS_DAEMONSTATUSREQUESTHANDLER_H_ #include <Common/RequestHandler.h> #include <Common/Request.h> #include <stdint.h> namespace Mad { -namespace Core { +namespace Server { namespace RequestHandlers { class DaemonStatusRequestHandler : public Common::RequestHandler { @@ -44,4 +44,4 @@ class DaemonStatusRequestHandler : public Common::RequestHandler { } } -#endif /* MAD_CORE_REQUESTHANDLERS_DAEMONSTATUSREQUESTHANDLER_H_ */ +#endif /* MAD_SERVER_REQUESTHANDLERS_DAEMONSTATUSREQUESTHANDLER_H_ */ diff --git a/src/Core/RequestHandlers/GSSAPIAuthRequestHandler.cpp b/src/Server/RequestHandlers/GSSAPIAuthRequestHandler.cpp index 7c2b482..c665843 100644 --- a/src/Core/RequestHandlers/GSSAPIAuthRequestHandler.cpp +++ b/src/Server/RequestHandlers/GSSAPIAuthRequestHandler.cpp @@ -25,7 +25,7 @@ #include <cstring> namespace Mad { -namespace Core { +namespace Server { namespace RequestHandlers { // TODO Error handling diff --git a/src/Core/RequestHandlers/GSSAPIAuthRequestHandler.h b/src/Server/RequestHandlers/GSSAPIAuthRequestHandler.h index dd4d564..2c5191c 100644 --- a/src/Core/RequestHandlers/GSSAPIAuthRequestHandler.h +++ b/src/Server/RequestHandlers/GSSAPIAuthRequestHandler.h @@ -17,14 +17,14 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAD_CORE_REQUESTHANDLERS_GSSAPIAUTHREQUESTHANDLER_H_ -#define MAD_CORE_REQUESTHANDLERS_GSSAPIAUTHREQUESTHANDLER_H_ +#ifndef MAD_SERVER_REQUESTHANDLERS_GSSAPIAUTHREQUESTHANDLER_H_ +#define MAD_SERVER_REQUESTHANDLERS_GSSAPIAUTHREQUESTHANDLER_H_ #include <Common/RequestHandler.h> #include <gssapi/gssapi.h> namespace Mad { -namespace Core { +namespace Server { namespace RequestHandlers { class GSSAPIAuthRequestHandler : public Common::RequestHandler { @@ -45,4 +45,4 @@ class GSSAPIAuthRequestHandler : public Common::RequestHandler { } } -#endif /* MAD_CORE_REQUESTHANDLERS_GSSAPIAUTHREQUESTHANDLER_H_ */ +#endif /* MAD_SERVER_REQUESTHANDLERS_GSSAPIAUTHREQUESTHANDLER_H_ */ diff --git a/src/Core/RequestHandlers/IdentifyRequestHandler.cpp b/src/Server/RequestHandlers/IdentifyRequestHandler.cpp index 235569c..9db9411 100644 --- a/src/Core/RequestHandlers/IdentifyRequestHandler.cpp +++ b/src/Server/RequestHandlers/IdentifyRequestHandler.cpp @@ -23,7 +23,7 @@ namespace Mad { -namespace Core { +namespace Server { namespace RequestHandlers { void IdentifyRequestHandler::handlePacket(const Common::XmlPacket &packet) { diff --git a/src/Core/RequestHandlers/IdentifyRequestHandler.h b/src/Server/RequestHandlers/IdentifyRequestHandler.h index 016f777..322bbab 100644 --- a/src/Core/RequestHandlers/IdentifyRequestHandler.h +++ b/src/Server/RequestHandlers/IdentifyRequestHandler.h @@ -17,13 +17,13 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAD_CORE_REQUESTHANDLERS_IDENTIFYREQUESTHANDLER_H_ -#define MAD_CORE_REQUESTHANDLERS_IDENTIFYREQUESTHANDLER_H_ +#ifndef MAD_SERVER_REQUESTHANDLERS_IDENTIFYREQUESTHANDLER_H_ +#define MAD_SERVER_REQUESTHANDLERS_IDENTIFYREQUESTHANDLER_H_ #include <Common/RequestHandler.h> namespace Mad { -namespace Core { +namespace Server { namespace RequestHandlers { class IdentifyRequestHandler : public Common::RequestHandler { @@ -39,4 +39,4 @@ class IdentifyRequestHandler : public Common::RequestHandler { } } -#endif /* MAD_CORE_REQUESTHANDLERS_IDENTIFYREQUESTHANDLER_H_ */ +#endif /* MAD_SERVER_REQUESTHANDLERS_IDENTIFYREQUESTHANDLER_H_ */ diff --git a/src/Core/RequestHandlers/LogRequestHandler.cpp b/src/Server/RequestHandlers/LogRequestHandler.cpp index aeec7da..ae64921 100644 --- a/src/Core/RequestHandlers/LogRequestHandler.cpp +++ b/src/Server/RequestHandlers/LogRequestHandler.cpp @@ -23,7 +23,7 @@ #include "../ConnectionManager.h" namespace Mad { -namespace Core { +namespace Server { namespace RequestHandlers { void LogRequestHandler::handlePacket(const Common::XmlPacket &packet) { diff --git a/src/Core/RequestHandlers/LogRequestHandler.h b/src/Server/RequestHandlers/LogRequestHandler.h index c391346..d18a6d3 100644 --- a/src/Core/RequestHandlers/LogRequestHandler.h +++ b/src/Server/RequestHandlers/LogRequestHandler.h @@ -17,13 +17,13 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAD_CORE_REQUESTHANDLERS_LOGREQUESTHANDLER_H_ -#define MAD_CORE_REQUESTHANDLERS_LOGREQUESTHANDLER_H_ +#ifndef MAD_SERVER_REQUESTHANDLERS_LOGREQUESTHANDLER_H_ +#define MAD_SERVER_REQUESTHANDLERS_LOGREQUESTHANDLER_H_ #include <Common/RequestHandler.h> namespace Mad { -namespace Core { +namespace Server { namespace RequestHandlers { class LogRequestHandler : public Common::RequestHandler { @@ -39,4 +39,4 @@ class LogRequestHandler : public Common::RequestHandler { } } -#endif /* MAD_CORE_REQUESTHANDLERS_LOGREQUESTHANDLER_H_ */ +#endif /* MAD_SERVER_REQUESTHANDLERS_LOGREQUESTHANDLER_H_ */ diff --git a/src/Core/RequestHandlers/Makefile.am b/src/Server/RequestHandlers/Makefile.am index 036f936..036f936 100644 --- a/src/Core/RequestHandlers/Makefile.am +++ b/src/Server/RequestHandlers/Makefile.am diff --git a/src/Core/RequestHandlers/Makefile.in b/src/Server/RequestHandlers/Makefile.in index c8ecb9c..7f1bfa3 100644 --- a/src/Core/RequestHandlers/Makefile.in +++ b/src/Server/RequestHandlers/Makefile.in @@ -33,7 +33,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -subdir = src/Core/RequestHandlers +subdir = src/Server/RequestHandlers DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -287,9 +287,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Core/RequestHandlers/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Server/RequestHandlers/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Core/RequestHandlers/Makefile + $(AUTOMAKE) --gnu src/Server/RequestHandlers/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/src/Core/RequestHandlers/UserInfoRequestHandler.cpp b/src/Server/RequestHandlers/UserInfoRequestHandler.cpp index 68356f8..16003a2 100644 --- a/src/Core/RequestHandlers/UserInfoRequestHandler.cpp +++ b/src/Server/RequestHandlers/UserInfoRequestHandler.cpp @@ -23,7 +23,7 @@ #include <Common/Logger.h> namespace Mad { -namespace Core { +namespace Server { namespace RequestHandlers { void UserInfoRequestHandler::handlePacket(const Common::XmlPacket &packet) { diff --git a/src/Core/RequestHandlers/UserInfoRequestHandler.h b/src/Server/RequestHandlers/UserInfoRequestHandler.h index b3103d4..5b1d466 100644 --- a/src/Core/RequestHandlers/UserInfoRequestHandler.h +++ b/src/Server/RequestHandlers/UserInfoRequestHandler.h @@ -17,8 +17,8 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAD_CORE_REQUESTHANDLERS_USERINFOREQUESTHANDLER_H_ -#define MAD_CORE_REQUESTHANDLERS_USERINFOREQUESTHANDLER_H_ +#ifndef MAD_SERVER_REQUESTHANDLERS_USERINFOREQUESTHANDLER_H_ +#define MAD_SERVER_REQUESTHANDLERS_USERINFOREQUESTHANDLER_H_ #include <Common/RequestHandler.h> #include <Common/UserInfo.h> @@ -26,7 +26,7 @@ #include <map> namespace Mad { -namespace Core { +namespace Server { namespace RequestHandlers { class UserInfoRequestHandler : public Common::RequestHandler { @@ -45,4 +45,4 @@ class UserInfoRequestHandler : public Common::RequestHandler { } } -#endif /* MAD_CORE_REQUESTHANDLERS_USERINFOREQUESTHANDLER_H_ */ +#endif /* MAD_SERVER_REQUESTHANDLERS_USERINFOREQUESTHANDLER_H_ */ diff --git a/src/Core/RequestHandlers/UserListRequestHandler.cpp b/src/Server/RequestHandlers/UserListRequestHandler.cpp index 8a61cbd..696b1d4 100644 --- a/src/Core/RequestHandlers/UserListRequestHandler.cpp +++ b/src/Server/RequestHandlers/UserListRequestHandler.cpp @@ -23,7 +23,7 @@ #include <Common/Logger.h> namespace Mad { -namespace Core { +namespace Server { namespace RequestHandlers { void UserListRequestHandler::handlePacket(const Common::XmlPacket &packet) { diff --git a/src/Core/RequestHandlers/UserListRequestHandler.h b/src/Server/RequestHandlers/UserListRequestHandler.h index e31da67..7c85aa0 100644 --- a/src/Core/RequestHandlers/UserListRequestHandler.h +++ b/src/Server/RequestHandlers/UserListRequestHandler.h @@ -17,8 +17,8 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAD_CORE_REQUESTHANDLERS_USERLISTREQUESTHANDLER_H_ -#define MAD_CORE_REQUESTHANDLERS_USERLISTREQUESTHANDLER_H_ +#ifndef MAD_SERVER_REQUESTHANDLERS_USERLISTREQUESTHANDLER_H_ +#define MAD_SERVER_REQUESTHANDLERS_USERLISTREQUESTHANDLER_H_ #include <Common/RequestHandler.h> #include <Common/UserInfo.h> @@ -26,7 +26,7 @@ #include <map> namespace Mad { -namespace Core { +namespace Server { namespace RequestHandlers { class UserListRequestHandler : public Common::RequestHandler { @@ -45,4 +45,4 @@ class UserListRequestHandler : public Common::RequestHandler { } } -#endif /* MAD_CORE_REQUESTHANDLERS_USERLISTREQUESTHANDLER_H_ */ +#endif /* MAD_SERVER_REQUESTHANDLERS_USERLISTREQUESTHANDLER_H_ */ diff --git a/src/Core/Requests/CommandRequest.cpp b/src/Server/Requests/CommandRequest.cpp index 78bb650..33f8dc0 100644 --- a/src/Core/Requests/CommandRequest.cpp +++ b/src/Server/Requests/CommandRequest.cpp @@ -20,7 +20,7 @@ #include "CommandRequest.h" namespace Mad { -namespace Core { +namespace Server { namespace Requests { void CommandRequest::sendRequest() { diff --git a/src/Core/Requests/CommandRequest.h b/src/Server/Requests/CommandRequest.h index 2e4d1de..feb33be 100644 --- a/src/Core/Requests/CommandRequest.h +++ b/src/Server/Requests/CommandRequest.h @@ -17,13 +17,13 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAD_CORE_REQUESTS_COMMANDREQUEST_H_ -#define MAD_CORE_REQUESTS_COMMANDREQUEST_H_ +#ifndef MAD_SERVER_REQUESTS_COMMANDREQUEST_H_ +#define MAD_SERVER_REQUESTS_COMMANDREQUEST_H_ #include <Common/Request.h> namespace Mad { -namespace Core { +namespace Server { namespace Requests { class CommandRequest : public Common::Request { @@ -42,4 +42,4 @@ class CommandRequest : public Common::Request { } } -#endif /* MAD_CORE_REQUESTS_COMMANDREQUEST_H_ */ +#endif /* MAD_SERVER_REQUESTS_COMMANDREQUEST_H_ */ diff --git a/src/Core/Requests/DaemonStateUpdateRequest.cpp b/src/Server/Requests/DaemonStateUpdateRequest.cpp index c8a813b..4bdf003 100644 --- a/src/Core/Requests/DaemonStateUpdateRequest.cpp +++ b/src/Server/Requests/DaemonStateUpdateRequest.cpp @@ -20,7 +20,7 @@ #include "DaemonStateUpdateRequest.h" namespace Mad { -namespace Core { +namespace Server { namespace Requests { void DaemonStateUpdateRequest::sendRequest() { diff --git a/src/Core/Requests/DaemonStateUpdateRequest.h b/src/Server/Requests/DaemonStateUpdateRequest.h index a1a8bb3..6debb06 100644 --- a/src/Core/Requests/DaemonStateUpdateRequest.h +++ b/src/Server/Requests/DaemonStateUpdateRequest.h @@ -17,14 +17,14 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAD_CORE_REQUESTS_DAEMONSTATEUPDATEREQUEST_H_ -#define MAD_CORE_REQUESTS_DAEMONSTATEUPDATEREQUEST_H_ +#ifndef MAD_SERVER_REQUESTS_DAEMONSTATEUPDATEREQUEST_H_ +#define MAD_SERVER_REQUESTS_DAEMONSTATEUPDATEREQUEST_H_ #include <Common/Request.h> #include <Common/HostInfo.h> namespace Mad { -namespace Core { +namespace Server { namespace Requests { class DaemonStateUpdateRequest : public Common::Request { @@ -44,4 +44,4 @@ class DaemonStateUpdateRequest : public Common::Request { } } -#endif /* MAD_CORE_REQUESTS_DAEMONSTATEUPDATEREQUEST_H_ */ +#endif /* MAD_SERVER_REQUESTS_DAEMONSTATEUPDATEREQUEST_H_ */ diff --git a/src/Core/Requests/Makefile.am b/src/Server/Requests/Makefile.am index f101b84..f101b84 100644 --- a/src/Core/Requests/Makefile.am +++ b/src/Server/Requests/Makefile.am diff --git a/src/Core/Requests/Makefile.in b/src/Server/Requests/Makefile.in index f0a6168..4780982 100644 --- a/src/Core/Requests/Makefile.in +++ b/src/Server/Requests/Makefile.in @@ -33,7 +33,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -subdir = src/Core/Requests +subdir = src/Server/Requests DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -280,9 +280,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Core/Requests/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Server/Requests/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Core/Requests/Makefile + $(AUTOMAKE) --gnu src/Server/Requests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/src/Core/UserBackend.h b/src/Server/UserBackend.h index 415f6bf..cf88095 100644 --- a/src/Core/UserBackend.h +++ b/src/Server/UserBackend.h @@ -17,8 +17,8 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAD_CORE_USERBACKEND_H_ -#define MAD_CORE_USERBACKEND_H_ +#ifndef MAD_SERVER_USERBACKEND_H_ +#define MAD_SERVER_USERBACKEND_H_ #include <config.h> @@ -31,7 +31,7 @@ namespace Mad { -namespace Core { +namespace Server { class UserManager; @@ -68,4 +68,4 @@ class UserBackend { } } -#endif /* MAD_CORE_USERBACKEND_H_ */ +#endif /* MAD_SERVER_USERBACKEND_H_ */ diff --git a/src/Core/UserManager.cpp b/src/Server/UserManager.cpp index d560586..2f58b7a 100644 --- a/src/Core/UserManager.cpp +++ b/src/Server/UserManager.cpp @@ -21,7 +21,7 @@ #include "UserBackend.h" namespace Mad { -namespace Core { +namespace Server { UserManager UserManager::userManager; diff --git a/src/Core/UserManager.h b/src/Server/UserManager.h index a925bbe..3c4097b 100644 --- a/src/Core/UserManager.h +++ b/src/Server/UserManager.h @@ -17,8 +17,8 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAD_CORE_USERMANAGER_H_ -#define MAD_CORE_USERMANAGER_H_ +#ifndef MAD_SERVER_USERMANAGER_H_ +#define MAD_SERVER_USERMANAGER_H_ #include <Common/UserInfo.h> @@ -28,7 +28,7 @@ #include <sigc++/slot.h> namespace Mad { -namespace Core { +namespace Server { class UserBackend; @@ -70,4 +70,4 @@ class UserManager { } } -#endif /* MAD_CORE_USERMANAGER_H_ */ +#endif /* MAD_SERVER_USERMANAGER_H_ */ diff --git a/src/mad-core.conf b/src/mad-server.conf index 4176307..bd4672c 100644 --- a/src/mad-core.conf +++ b/src/mad-server.conf @@ -1,5 +1,5 @@ Logger Console -Logger File "mad-core.log" +Logger File "mad-server.log" Listen * diff --git a/src/mad-core.cpp b/src/mad-server.cpp index 5cf65ac..863d1ee 100644 --- a/src/mad-core.cpp +++ b/src/mad-server.cpp @@ -1,5 +1,5 @@ /* - * mad-core.cpp + * mad-server.cpp * * Copyright (C) 2008 Matthias Schiffer <matthias@gamezock.de> * @@ -22,7 +22,7 @@ #include "Common/Logger.h" #include "Common/ModuleManager.h" #include "Common/ThreadManager.h" -#include "Core/ConnectionManager.h" +#include "Server/ConnectionManager.h" #include <signal.h> @@ -37,7 +37,7 @@ int main() { sigprocmask(SIG_BLOCK, &signals, 0); Common::ThreadManager::get()->init(); - Core::ConnectionManager::get()->init(); + Server::ConnectionManager::get()->init(); Common::ModuleManager::get()->loadModule("FileLogger"); Common::ModuleManager::get()->loadModule("SystemBackendPosix"); @@ -45,11 +45,11 @@ int main() { Common::ModuleManager::get()->loadModule("UserBackendMysql"); - Common::ConfigManager::get()->loadFile("mad-core.conf"); + Common::ConfigManager::get()->loadFile("mad-server.conf"); Common::ConfigManager::get()->finish(); while(true) - Core::ConnectionManager::get()->run(); + Server::ConnectionManager::get()->run(); Common::Initializable::deinit(); diff --git a/src/modules/UserBackendMysql.cpp b/src/modules/UserBackendMysql.cpp index 39b0652..daea626 100644 --- a/src/modules/UserBackendMysql.cpp +++ b/src/modules/UserBackendMysql.cpp @@ -131,7 +131,7 @@ void UserBackendMysql::configFinished() { mysql = mysql_init(0); mysql_real_connect(mysql, host.c_str(), username.c_str(), passwd.c_str(), db.c_str(), port, unixSocket.empty() ? 0 : unixSocket.c_str(), 0); - Core::UserManager::get()->registerBackend(backend); + Server::UserManager::get()->registerBackend(backend); } @@ -211,7 +211,7 @@ void UserBackendMysql::unregisterBackend() { return; Common::ConfigManager::get()->unregisterConfigurable(backend); - Core::UserManager::get()->unregisterBackend(backend); + Server::UserManager::get()->unregisterBackend(backend); delete backend; backend = 0; diff --git a/src/modules/UserBackendMysql.h b/src/modules/UserBackendMysql.h index ac82d67..ddd4252 100644 --- a/src/modules/UserBackendMysql.h +++ b/src/modules/UserBackendMysql.h @@ -20,8 +20,8 @@ #ifndef MAD_MODULES_USERBACKENDMYSQL_H_ #define MAD_MODULES_USERBACKENDMYSQL_H_ -#include <Core/UserBackend.h> -#include <Core/UserManager.h> +#include <Server/UserBackend.h> +#include <Server/UserManager.h> #include <Common/Configurable.h> #include <mysql/mysql.h> @@ -30,7 +30,7 @@ namespace Mad { namespace Modules { -class UserBackendMysql : private Core::UserBackend, private Common::Configurable { +class UserBackendMysql : private Server::UserBackend, private Common::Configurable { private: static UserBackendMysql *backend; |