summaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/FileLogger/FileLogger.cpp6
-rw-r--r--src/modules/FileLogger/FileLogger.h16
-rw-r--r--src/modules/SystemBackendPosix/SystemBackendPosix.cpp20
-rw-r--r--src/modules/SystemBackendPosix/SystemBackendPosix.h6
-rw-r--r--src/modules/SystemBackendProc/SystemBackendProc.cpp24
-rw-r--r--src/modules/SystemBackendProc/SystemBackendProc.h6
-rw-r--r--src/modules/UserBackendMysql/UserBackendMysql.cpp90
-rw-r--r--src/modules/UserBackendMysql/UserBackendMysql.h22
8 files changed, 95 insertions, 95 deletions
diff --git a/src/modules/FileLogger/FileLogger.cpp b/src/modules/FileLogger/FileLogger.cpp
index 4655002..a78ab36 100644
--- a/src/modules/FileLogger/FileLogger.cpp
+++ b/src/modules/FileLogger/FileLogger.cpp
@@ -19,7 +19,7 @@
#include "FileLogger.h"
-#include <Common/ConfigEntry.h>
+#include <Core/ConfigEntry.h>
namespace Mad {
@@ -29,7 +29,7 @@ FileLogger::ConfigHelper FileLogger::configHelper;
std::set<FileLogger*> FileLogger::loggers;
-bool FileLogger::ConfigHelper::handleConfigEntry(const Common::ConfigEntry &entry, bool handled) {
+bool FileLogger::ConfigHelper::handleConfigEntry(const Core::ConfigEntry &entry, bool handled) {
if(handled)
return false;
@@ -40,7 +40,7 @@ bool FileLogger::ConfigHelper::handleConfigEntry(const Common::ConfigEntry &entr
FileLogger *logger = new FileLogger(entry[0][1]);
loggers.insert(logger);
- Common::LogManager::get()->registerLogger(static_cast<Logger*>(logger));
+ Core::LogManager::get()->registerLogger(static_cast<Logger*>(logger));
}
else {
Logger::logf(Logger::WARNING, "FileLogger: no filename given.");
diff --git a/src/modules/FileLogger/FileLogger.h b/src/modules/FileLogger/FileLogger.h
index 2def986..04e2126 100644
--- a/src/modules/FileLogger/FileLogger.h
+++ b/src/modules/FileLogger/FileLogger.h
@@ -20,20 +20,20 @@
#ifndef MAD_MODULES_FILELOGGER_H_
#define MAD_MODULES_FILELOGGER_H_
-#include <Common/ConfigManager.h>
-#include <Common/Configurable.h>
-#include <Common/LogManager.h>
+#include <Core/ConfigManager.h>
+#include <Core/Configurable.h>
+#include <Core/LogManager.h>
#include <fstream>
namespace Mad {
namespace Modules {
-class FileLogger : private Common::Logger, private Common::RemoteLogger {
+class FileLogger : private Core::Logger, private Core::RemoteLogger {
private:
- class ConfigHelper : public Common::Configurable {
+ class ConfigHelper : public Core::Configurable {
protected:
- virtual bool handleConfigEntry(const Common::ConfigEntry &entry, bool handled);
+ virtual bool handleConfigEntry(const Core::ConfigEntry &entry, bool handled);
public:
virtual int getPriority() const {return 1;}
@@ -57,11 +57,11 @@ class FileLogger : private Common::Logger, private Common::RemoteLogger {
: file(filename.c_str(), std::ios::out|std::ios::app) {}
static void registerConfigHelper() {
- Common::ConfigManager::get()->registerConfigurable(&configHelper);
+ Core::ConfigManager::get()->registerConfigurable(&configHelper);
}
static void unregisterConfigHelper() {
- Common::ConfigManager::get()->unregisterConfigurable(&configHelper);
+ Core::ConfigManager::get()->unregisterConfigurable(&configHelper);
for(std::set<FileLogger*>::iterator logger = loggers.begin(); logger != loggers.end(); ++logger) {
delete *logger;
diff --git a/src/modules/SystemBackendPosix/SystemBackendPosix.cpp b/src/modules/SystemBackendPosix/SystemBackendPosix.cpp
index 35e6c4f..4eb5807 100644
--- a/src/modules/SystemBackendPosix/SystemBackendPosix.cpp
+++ b/src/modules/SystemBackendPosix/SystemBackendPosix.cpp
@@ -19,7 +19,7 @@
#include "SystemBackendPosix.h"
-#include <Net/ThreadManager.h>
+#include <Core/ThreadManager.h>
#include <stdio.h>
#include <stdlib.h>
@@ -29,12 +29,12 @@ namespace Modules {
boost::shared_ptr<SystemBackendPosix> SystemBackendPosix::backend;
-void SystemBackendPosix::getFSInfo(std::vector<Common::SystemManager::FSInfo> *fsInfo) throw(Net::Exception) {
- Net::ThreadManager::get()->detach();
+void SystemBackendPosix::getFSInfo(std::vector<Common::SystemManager::FSInfo> *fsInfo) throw(Core::Exception) {
+ Core::ThreadManager::get()->detach();
FILE *pipe = popen("/bin/df -P -k", "r");
if(!pipe)
- throw(Net::Exception(Net::Exception::NOT_AVAILABLE));
+ throw(Core::Exception(Core::Exception::NOT_AVAILABLE));
char buffer[1024];
std::string output;
@@ -78,18 +78,18 @@ void SystemBackendPosix::getFSInfo(std::vector<Common::SystemManager::FSInfo> *f
return;
}
-void SystemBackendPosix::shutdown() throw(Net::Exception) {
- Net::ThreadManager::get()->detach();
+void SystemBackendPosix::shutdown() throw(Core::Exception) {
+ Core::ThreadManager::get()->detach();
if(system("/sbin/halt") != 0)
- throw(Net::Exception(Net::Exception::NOT_AVAILABLE));
+ throw(Core::Exception(Core::Exception::NOT_AVAILABLE));
}
-void SystemBackendPosix::reboot() throw(Net::Exception) {
- Net::ThreadManager::get()->detach();
+void SystemBackendPosix::reboot() throw(Core::Exception) {
+ Core::ThreadManager::get()->detach();
if(system("/sbin/reboot") != 0)
- throw(Net::Exception(Net::Exception::NOT_AVAILABLE));
+ throw(Core::Exception(Core::Exception::NOT_AVAILABLE));
}
}
diff --git a/src/modules/SystemBackendPosix/SystemBackendPosix.h b/src/modules/SystemBackendPosix/SystemBackendPosix.h
index e462b43..4aec7dd 100644
--- a/src/modules/SystemBackendPosix/SystemBackendPosix.h
+++ b/src/modules/SystemBackendPosix/SystemBackendPosix.h
@@ -38,10 +38,10 @@ class SystemBackendPosix : public Common::SystemBackend {
static boost::shared_ptr<SystemBackendPosix> backend;
protected:
- virtual void getFSInfo(std::vector<Common::SystemManager::FSInfo> *fsInfo) throw(Net::Exception);
+ virtual void getFSInfo(std::vector<Common::SystemManager::FSInfo> *fsInfo) throw(Core::Exception);
- virtual void shutdown() throw(Net::Exception);
- virtual void reboot() throw(Net::Exception);
+ virtual void shutdown() throw(Core::Exception);
+ virtual void reboot() throw(Core::Exception);
public:
static void registerBackend() {
diff --git a/src/modules/SystemBackendProc/SystemBackendProc.cpp b/src/modules/SystemBackendProc/SystemBackendProc.cpp
index ab074b2..e8b45cd 100644
--- a/src/modules/SystemBackendProc/SystemBackendProc.cpp
+++ b/src/modules/SystemBackendProc/SystemBackendProc.cpp
@@ -19,7 +19,7 @@
#include "SystemBackendProc.h"
-#include <Net/ThreadManager.h>
+#include <Core/ThreadManager.h>
#include <cstdio>
#include <cstring>
@@ -29,18 +29,18 @@ namespace Modules {
boost::shared_ptr<SystemBackendProc> SystemBackendProc::backend;
-void SystemBackendProc::getUptimeInfo(unsigned long *uptime, unsigned long *idleTime) throw(Net::Exception) {
- Net::ThreadManager::get()->detach();
+void SystemBackendProc::getUptimeInfo(unsigned long *uptime, unsigned long *idleTime) throw(Core::Exception) {
+ Core::ThreadManager::get()->detach();
uptimeFile.seekg(0, std::ios::beg);
if(!uptimeFile.good())
- throw(Net::Exception(Net::Exception::NOT_AVAILABLE));
+ throw(Core::Exception(Core::Exception::NOT_AVAILABLE));
float f;
uptimeFile >> f;
if(!uptimeFile.good())
- throw(Net::Exception(Net::Exception::NOT_AVAILABLE));
+ throw(Core::Exception(Core::Exception::NOT_AVAILABLE));
if(uptime)
*uptime = (unsigned long)f;
@@ -50,8 +50,8 @@ void SystemBackendProc::getUptimeInfo(unsigned long *uptime, unsigned long *idle
*idleTime = (unsigned long)f;
}
-void SystemBackendProc::getMemoryInfo(unsigned long *totalMem, unsigned long *freeMem, unsigned long *totalSwap, unsigned long *freeSwap) throw(Net::Exception) {
- Net::ThreadManager::get()->detach();
+void SystemBackendProc::getMemoryInfo(unsigned long *totalMem, unsigned long *freeMem, unsigned long *totalSwap, unsigned long *freeSwap) throw(Core::Exception) {
+ Core::ThreadManager::get()->detach();
if(totalMem)
*totalMem = 0;
@@ -65,7 +65,7 @@ void SystemBackendProc::getMemoryInfo(unsigned long *totalMem, unsigned long *fr
meminfoFile.seekg(0, std::ios::beg);
if(!meminfoFile.good())
- throw(Net::Exception(Net::Exception::NOT_AVAILABLE));
+ throw(Core::Exception(Core::Exception::NOT_AVAILABLE));
while(!meminfoFile.eof() && meminfoFile.good()) {
std::string line;
@@ -92,8 +92,8 @@ void SystemBackendProc::getMemoryInfo(unsigned long *totalMem, unsigned long *fr
}
}
-void SystemBackendProc::getLoadInfo(unsigned long *currentLoad, unsigned long *nProcesses, float *loadAvg1, float *loadAvg5, float *loadAvg15) throw(Net::Exception) {
- Net::ThreadManager::get()->detach();
+void SystemBackendProc::getLoadInfo(unsigned long *currentLoad, unsigned long *nProcesses, float *loadAvg1, float *loadAvg5, float *loadAvg15) throw(Core::Exception) {
+ Core::ThreadManager::get()->detach();
unsigned long currentLoadValue = 0, nProcessesValue = 0;
float loadAvg1Value = 0, loadAvg5Value = 0, loadAvg15Value = 0;
@@ -101,13 +101,13 @@ void SystemBackendProc::getLoadInfo(unsigned long *currentLoad, unsigned long *n
loadFile.seekg(0, std::ios::beg);
if(!loadFile.good())
- throw(Net::Exception(Net::Exception::NOT_AVAILABLE));
+ throw(Core::Exception(Core::Exception::NOT_AVAILABLE));
std::string line;
std::getline(loadFile, line);
if(line.empty())
- throw(Net::Exception(Net::Exception::NOT_AVAILABLE));
+ throw(Core::Exception(Core::Exception::NOT_AVAILABLE));
std::sscanf(line.c_str(), "%f %f %f %lu/%lu", &loadAvg1Value, &loadAvg5Value, &loadAvg15Value, &currentLoadValue, &nProcessesValue);
diff --git a/src/modules/SystemBackendProc/SystemBackendProc.h b/src/modules/SystemBackendProc/SystemBackendProc.h
index eb2f8a6..9a0cb71 100644
--- a/src/modules/SystemBackendProc/SystemBackendProc.h
+++ b/src/modules/SystemBackendProc/SystemBackendProc.h
@@ -39,9 +39,9 @@ class SystemBackendProc : public Common::SystemBackend, boost::noncopyable {
SystemBackendProc() : uptimeFile("/proc/uptime"), meminfoFile("/proc/meminfo"), loadFile("/proc/loadavg") {}
protected:
- virtual void getUptimeInfo(unsigned long *uptime, unsigned long *idleTime) throw(Net::Exception);
- virtual void getMemoryInfo(unsigned long *totalMem, unsigned long *freeMem, unsigned long *totalSwap, unsigned long *freeSwap) throw(Net::Exception);
- virtual void getLoadInfo(unsigned long *currentLoad, unsigned long *nProcesses, float *loadAvg1, float *loadAvg5, float *loadAvg15) throw(Net::Exception);
+ virtual void getUptimeInfo(unsigned long *uptime, unsigned long *idleTime) throw(Core::Exception);
+ virtual void getMemoryInfo(unsigned long *totalMem, unsigned long *freeMem, unsigned long *totalSwap, unsigned long *freeSwap) throw(Core::Exception);
+ virtual void getLoadInfo(unsigned long *currentLoad, unsigned long *nProcesses, float *loadAvg1, float *loadAvg5, float *loadAvg15) throw(Core::Exception);
public:
static void registerBackend() {
diff --git a/src/modules/UserBackendMysql/UserBackendMysql.cpp b/src/modules/UserBackendMysql/UserBackendMysql.cpp
index b020310..f0e9b2e 100644
--- a/src/modules/UserBackendMysql/UserBackendMysql.cpp
+++ b/src/modules/UserBackendMysql/UserBackendMysql.cpp
@@ -20,10 +20,10 @@
#include <config.h>
#include "UserBackendMysql.h"
-#include <Common/ConfigEntry.h>
-#include <Common/ConfigManager.h>
-#include <Common/Logger.h>
-#include <Net/ThreadManager.h>
+#include <Core/ConfigEntry.h>
+#include <Core/ConfigManager.h>
+#include <Core/Logger.h>
+#include <Core/ThreadManager.h>
#include <sstream>
@@ -36,7 +36,7 @@ namespace Modules {
boost::shared_ptr<UserBackendMysql> UserBackendMysql::backend;
-bool UserBackendMysql::handleConfigEntry(const Common::ConfigEntry &entry, bool handled) {
+bool UserBackendMysql::handleConfigEntry(const Core::ConfigEntry &entry, bool handled) {
if(handled)
return false;
@@ -65,7 +65,7 @@ bool UserBackendMysql::handleConfigEntry(const Common::ConfigEntry &entry, bool
val = strtol(entry[1][0].c_str(), &endptr, 10);
if(endptr != 0 || val < 0 || val > 65535)
- Common::Logger::log(Common::Logger::WARNING, "UserBackendMysql: Invalid port");
+ Core::Logger::log(Core::Logger::WARNING, "UserBackendMysql: Invalid port");
else
port = val;
}
@@ -121,7 +121,7 @@ bool UserBackendMysql::handleConfigEntry(const Common::ConfigEntry &entry, bool
void UserBackendMysql::configFinished() {
if(db.empty()) {
- Common::Logger::log(Common::Logger::ERROR, "UserBackendMysql: No database name given");
+ Core::Logger::log(Core::Logger::ERROR, "UserBackendMysql: No database name given");
return;
}
@@ -132,17 +132,17 @@ void UserBackendMysql::configFinished() {
}
-boost::shared_ptr<std::map<unsigned long, Common::UserInfo> > UserBackendMysql::getUserList() throw(Net::Exception) {
- Net::ThreadManager::get()->detach();
+boost::shared_ptr<std::map<unsigned long, Common::UserInfo> > UserBackendMysql::getUserList() throw(Core::Exception) {
+ Core::ThreadManager::get()->detach();
if(mysql_ping(mysql))
- throw Net::Exception(Net::Exception::NOT_AVAILABLE);
+ throw Core::Exception(Core::Exception::NOT_AVAILABLE);
mysql_real_query(mysql, queryListUsers.c_str(), queryListUsers.length());
MYSQL_RES *result = mysql_use_result(mysql);
if(!result || mysql_num_fields(result) < 4)
- throw Net::Exception(Net::Exception::NOT_AVAILABLE);
+ throw Core::Exception(Core::Exception::NOT_AVAILABLE);
boost::shared_ptr<std::map<unsigned long, Common::UserInfo> > users(new std::map<unsigned long, Common::UserInfo>());
@@ -158,11 +158,11 @@ boost::shared_ptr<std::map<unsigned long, Common::UserInfo> > UserBackendMysql::
return users;
}
-boost::shared_ptr<Common::UserInfo> UserBackendMysql::getUserInfo(unsigned long uid) throw(Net::Exception) {
- Net::ThreadManager::get()->detach();
+boost::shared_ptr<Common::UserInfo> UserBackendMysql::getUserInfo(unsigned long uid) throw(Core::Exception) {
+ Core::ThreadManager::get()->detach();
if(mysql_ping(mysql))
- throw Net::Exception(Net::Exception::NOT_AVAILABLE);
+ throw Core::Exception(Core::Exception::NOT_AVAILABLE);
std::string query = queryUserById;
@@ -177,7 +177,7 @@ boost::shared_ptr<Common::UserInfo> UserBackendMysql::getUserInfo(unsigned long
MYSQL_RES *result = mysql_use_result(mysql);
if(!result || mysql_num_fields(result) < 4)
- throw Net::Exception(Net::Exception::NOT_AVAILABLE);
+ throw Core::Exception(Core::Exception::NOT_AVAILABLE);
MYSQL_ROW row = mysql_fetch_row(result);
@@ -192,14 +192,14 @@ boost::shared_ptr<Common::UserInfo> UserBackendMysql::getUserInfo(unsigned long
return user;
}
- throw Net::Exception(Net::Exception::NOT_AVAILABLE);
+ throw Core::Exception(Core::Exception::NOT_AVAILABLE);
}
-boost::shared_ptr<Common::UserInfo> UserBackendMysql::getUserInfoByName(const std::string &name) throw(Net::Exception) {
- Net::ThreadManager::get()->detach();
+boost::shared_ptr<Common::UserInfo> UserBackendMysql::getUserInfoByName(const std::string &name) throw(Core::Exception) {
+ Core::ThreadManager::get()->detach();
if(mysql_ping(mysql))
- throw Net::Exception(Net::Exception::NOT_AVAILABLE);
+ throw Core::Exception(Core::Exception::NOT_AVAILABLE);
boost::scoped_array<char> escapedName(new char[name.length()*2+1]);
@@ -211,7 +211,7 @@ boost::shared_ptr<Common::UserInfo> UserBackendMysql::getUserInfoByName(const st
MYSQL_RES *result = mysql_use_result(mysql);
if(!result || mysql_num_fields(result) < 4)
- throw Net::Exception(Net::Exception::NOT_AVAILABLE);
+ throw Core::Exception(Core::Exception::NOT_AVAILABLE);
MYSQL_ROW row = mysql_fetch_row(result);
@@ -226,14 +226,14 @@ boost::shared_ptr<Common::UserInfo> UserBackendMysql::getUserInfoByName(const st
return user;
}
- throw Net::Exception(Net::Exception::NOT_AVAILABLE);
+ throw Core::Exception(Core::Exception::NOT_AVAILABLE);
}
-boost::shared_ptr<std::set<unsigned long> > UserBackendMysql::getUserGroupList(unsigned long uid) throw(Net::Exception) {
- Net::ThreadManager::get()->detach();
+boost::shared_ptr<std::set<unsigned long> > UserBackendMysql::getUserGroupList(unsigned long uid) throw(Core::Exception) {
+ Core::ThreadManager::get()->detach();
if(mysql_ping(mysql))
- throw Net::Exception(Net::Exception::NOT_AVAILABLE);
+ throw Core::Exception(Core::Exception::NOT_AVAILABLE);
std::ostringstream tmp;
tmp << '"';
@@ -246,7 +246,7 @@ boost::shared_ptr<std::set<unsigned long> > UserBackendMysql::getUserGroupList(u
MYSQL_RES *result = mysql_use_result(mysql);
if(!result || mysql_num_fields(result) < 1)
- throw Net::Exception(Net::Exception::NOT_AVAILABLE);
+ throw Core::Exception(Core::Exception::NOT_AVAILABLE);
boost::shared_ptr<std::set<unsigned long> > groups(new std::set<unsigned long>);
@@ -257,17 +257,17 @@ boost::shared_ptr<std::set<unsigned long> > UserBackendMysql::getUserGroupList(u
}
-boost::shared_ptr<std::map<unsigned long, Common::GroupInfo> > UserBackendMysql::getGroupList() throw(Net::Exception) {
- Net::ThreadManager::get()->detach();
+boost::shared_ptr<std::map<unsigned long, Common::GroupInfo> > UserBackendMysql::getGroupList() throw(Core::Exception) {
+ Core::ThreadManager::get()->detach();
if(mysql_ping(mysql))
- throw Net::Exception(Net::Exception::NOT_AVAILABLE);
+ throw Core::Exception(Core::Exception::NOT_AVAILABLE);
mysql_real_query(mysql, queryListGroups.c_str(), queryListGroups.length());
MYSQL_RES *result = mysql_use_result(mysql);
if(!result || mysql_num_fields(result) < 2)
- throw Net::Exception(Net::Exception::NOT_AVAILABLE);
+ throw Core::Exception(Core::Exception::NOT_AVAILABLE);
boost::shared_ptr<std::map<unsigned long, Common::GroupInfo> > groups(new std::map<unsigned long, Common::GroupInfo>());
@@ -280,11 +280,11 @@ boost::shared_ptr<std::map<unsigned long, Common::GroupInfo> > UserBackendMysql:
return groups;
}
-std::string UserBackendMysql::getGroupName(unsigned long gid) throw(Net::Exception) {
- Net::ThreadManager::get()->detach();
+std::string UserBackendMysql::getGroupName(unsigned long gid) throw(Core::Exception) {
+ Core::ThreadManager::get()->detach();
if(mysql_ping(mysql))
- throw Net::Exception(Net::Exception::NOT_AVAILABLE);
+ throw Core::Exception(Core::Exception::NOT_AVAILABLE);
std::string query = queryGroupById;
@@ -299,21 +299,21 @@ std::string UserBackendMysql::getGroupName(unsigned long gid) throw(Net::Excepti
MYSQL_RES *result = mysql_use_result(mysql);
if(!result || mysql_num_fields(result) < 2)
- throw Net::Exception(Net::Exception::NOT_AVAILABLE);
+ throw Core::Exception(Core::Exception::NOT_AVAILABLE);
MYSQL_ROW row = mysql_fetch_row(result);
if(row)
return row[1];
- throw Net::Exception(Net::Exception::NOT_AVAILABLE);
+ throw Core::Exception(Core::Exception::NOT_AVAILABLE);
}
-unsigned long UserBackendMysql::getGroupId(const std::string &name) throw(Net::Exception) {
- Net::ThreadManager::get()->detach();
+unsigned long UserBackendMysql::getGroupId(const std::string &name) throw(Core::Exception) {
+ Core::ThreadManager::get()->detach();
if(mysql_ping(mysql))
- throw Net::Exception(Net::Exception::NOT_AVAILABLE);
+ throw Core::Exception(Core::Exception::NOT_AVAILABLE);
boost::scoped_array<char> escapedName(new char[name.length()*2+1]);
@@ -325,21 +325,21 @@ unsigned long UserBackendMysql::getGroupId(const std::string &name) throw(Net::E
MYSQL_RES *result = mysql_use_result(mysql);
if(!result || mysql_num_fields(result) < 2)
- throw Net::Exception(Net::Exception::NOT_AVAILABLE);
+ throw Core::Exception(Core::Exception::NOT_AVAILABLE);
MYSQL_ROW row = mysql_fetch_row(result);
if(row)
return strtoul(row[0], 0, 10);
- throw Net::Exception(Net::Exception::NOT_AVAILABLE);
+ throw Core::Exception(Core::Exception::NOT_AVAILABLE);
}
-boost::shared_ptr<std::set<unsigned long> > UserBackendMysql::getGroupUserList(unsigned long gid) throw(Net::Exception) {
- Net::ThreadManager::get()->detach();
+boost::shared_ptr<std::set<unsigned long> > UserBackendMysql::getGroupUserList(unsigned long gid) throw(Core::Exception) {
+ Core::ThreadManager::get()->detach();
if(mysql_ping(mysql))
- throw Net::Exception(Net::Exception::NOT_AVAILABLE);
+ throw Core::Exception(Core::Exception::NOT_AVAILABLE);
std::ostringstream tmp;
tmp << '"';
@@ -352,7 +352,7 @@ boost::shared_ptr<std::set<unsigned long> > UserBackendMysql::getGroupUserList(u
MYSQL_RES *result = mysql_use_result(mysql);
if(!result || mysql_num_fields(result) < 1)
- throw Net::Exception(Net::Exception::NOT_AVAILABLE);
+ throw Core::Exception(Core::Exception::NOT_AVAILABLE);
boost::shared_ptr<std::set<unsigned long> > users(new std::set<unsigned long>);
@@ -368,14 +368,14 @@ void UserBackendMysql::registerBackend() {
return;
backend.reset(new UserBackendMysql());
- Common::ConfigManager::get()->registerConfigurable(backend.get());
+ Core::ConfigManager::get()->registerConfigurable(backend.get());
}
void UserBackendMysql::unregisterBackend() {
if(!backend)
return;
- Common::ConfigManager::get()->unregisterConfigurable(backend.get());
+ Core::ConfigManager::get()->unregisterConfigurable(backend.get());
Server::UserManager::get()->unregisterBackend(backend);
backend.reset();
diff --git a/src/modules/UserBackendMysql/UserBackendMysql.h b/src/modules/UserBackendMysql/UserBackendMysql.h
index 26c7ef3..523806f 100644
--- a/src/modules/UserBackendMysql/UserBackendMysql.h
+++ b/src/modules/UserBackendMysql/UserBackendMysql.h
@@ -22,7 +22,7 @@
#include <Server/UserBackend.h>
#include <Server/UserManager.h>
-#include <Common/Configurable.h>
+#include <Core/Configurable.h>
#include <mysql/mysql.h>
@@ -30,7 +30,7 @@
namespace Mad {
namespace Modules {
-class UserBackendMysql : public Server::UserBackend, private Common::Configurable {
+class UserBackendMysql : public Server::UserBackend, private Core::Configurable {
private:
static boost::shared_ptr<UserBackendMysql> backend;
@@ -47,18 +47,18 @@ class UserBackendMysql : public Server::UserBackend, private Common::Configurabl
UserBackendMysql() : port(0), mysql(0) {}
protected:
- virtual bool handleConfigEntry(const Common::ConfigEntry &entry, bool);
+ virtual bool handleConfigEntry(const Core::ConfigEntry &entry, bool);
virtual void configFinished();
- virtual boost::shared_ptr<std::map<unsigned long, Common::UserInfo> > getUserList() throw(Net::Exception);
- virtual boost::shared_ptr<Common::UserInfo> getUserInfo(unsigned long uid) throw(Net::Exception);
- virtual boost::shared_ptr<Common::UserInfo> getUserInfoByName(const std::string &name) throw(Net::Exception);
- virtual boost::shared_ptr<std::set<unsigned long> > getUserGroupList(unsigned long uid) throw(Net::Exception);
+ virtual boost::shared_ptr<std::map<unsigned long, Common::UserInfo> > getUserList() throw(Core::Exception);
+ virtual boost::shared_ptr<Common::UserInfo> getUserInfo(unsigned long uid) throw(Core::Exception);
+ virtual boost::shared_ptr<Common::UserInfo> getUserInfoByName(const std::string &name) throw(Core::Exception);
+ virtual boost::shared_ptr<std::set<unsigned long> > getUserGroupList(unsigned long uid) throw(Core::Exception);
- virtual boost::shared_ptr<std::map<unsigned long, Common::GroupInfo> > getGroupList() throw(Net::Exception);
- virtual std::string getGroupName(unsigned long gid) throw(Net::Exception);
- virtual unsigned long getGroupId(const std::string &name) throw(Net::Exception);
- virtual boost::shared_ptr<std::set<unsigned long> > getGroupUserList(unsigned long gid) throw(Net::Exception);
+ virtual boost::shared_ptr<std::map<unsigned long, Common::GroupInfo> > getGroupList() throw(Core::Exception);
+ virtual std::string getGroupName(unsigned long gid) throw(Core::Exception);
+ virtual unsigned long getGroupId(const std::string &name) throw(Core::Exception);
+ virtual boost::shared_ptr<std::set<unsigned long> > getGroupUserList(unsigned long gid) throw(Core::Exception);
public:
virtual ~UserBackendMysql() {