summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mad-server.cpp4
-rw-r--r--src/modules/CMakeLists.txt4
-rw-r--r--src/modules/UserBackendHome/CMakeLists.txt8
-rw-r--r--src/modules/UserBackendMysql/CMakeLists.txt8
-rw-r--r--src/modules/UserConfigBackendHome/CMakeLists.txt8
-rw-r--r--src/modules/UserConfigBackendHome/Module.cpp (renamed from src/modules/UserBackendHome/Module.cpp)4
-rw-r--r--src/modules/UserConfigBackendHome/Module.h (renamed from src/modules/UserBackendHome/Module.h)14
-rw-r--r--src/modules/UserConfigBackendHome/UserConfigBackendHome.cpp (renamed from src/modules/UserBackendHome/UserBackendHome.cpp)18
-rw-r--r--src/modules/UserConfigBackendHome/UserConfigBackendHome.h (renamed from src/modules/UserBackendHome/UserBackendHome.h)16
-rw-r--r--src/modules/UserDBBackendMysql/CMakeLists.txt8
-rw-r--r--src/modules/UserDBBackendMysql/Module.cpp (renamed from src/modules/UserBackendMysql/Module.cpp)4
-rw-r--r--src/modules/UserDBBackendMysql/Module.h (renamed from src/modules/UserBackendMysql/Module.h)14
-rw-r--r--src/modules/UserDBBackendMysql/UserDBBackendMysql.cpp (renamed from src/modules/UserBackendMysql/UserBackendMysql.cpp)52
-rw-r--r--src/modules/UserDBBackendMysql/UserDBBackendMysql.h (renamed from src/modules/UserBackendMysql/UserBackendMysql.h)18
14 files changed, 90 insertions, 90 deletions
diff --git a/src/mad-server.cpp b/src/mad-server.cpp
index 1749ba2..a0ca564 100644
--- a/src/mad-server.cpp
+++ b/src/mad-server.cpp
@@ -32,8 +32,8 @@ int main() {
application.getModuleManager()->loadModule("SystemBackendPosix");
application.getModuleManager()->loadModule("SystemBackendProc");
- application.getModuleManager()->loadModule("UserBackendMysql");
- application.getModuleManager()->loadModule("UserBackendHome");
+ application.getModuleManager()->loadModule("UserDBBackendMysql");
+ application.getModuleManager()->loadModule("UserConfigBackendHome");
application.getConfigManager()->loadFile("mad-server.conf");
application.getConfigManager()->finish();
diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt
index 774b4eb..1e8128b 100644
--- a/src/modules/CMakeLists.txt
+++ b/src/modules/CMakeLists.txt
@@ -34,10 +34,10 @@ endmacro(mad_module_libraries)
add_subdirectory(FileLogger)
add_subdirectory(SystemBackendPosix)
add_subdirectory(SystemBackendProc)
-add_subdirectory(UserBackendHome)
+add_subdirectory(UserConfigBackendHome)
if(MYSQL_FOUND)
-add_subdirectory(UserBackendMysql)
+add_subdirectory(UserDBBackendMysql)
endif(MYSQL_FOUND)
SET(STATIC_MODULE_LOADERS "")
diff --git a/src/modules/UserBackendHome/CMakeLists.txt b/src/modules/UserBackendHome/CMakeLists.txt
deleted file mode 100644
index 9d053f3..0000000
--- a/src/modules/UserBackendHome/CMakeLists.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-include_directories(${INCLUDES})
-
-mad_module(UserBackendHome
- Module.cpp Module.h
- UserBackendHome.cpp UserBackendHome.h
-)
-
-mad_module_libraries(UserBackendHome) \ No newline at end of file
diff --git a/src/modules/UserBackendMysql/CMakeLists.txt b/src/modules/UserBackendMysql/CMakeLists.txt
deleted file mode 100644
index 1c71816..0000000
--- a/src/modules/UserBackendMysql/CMakeLists.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-include_directories(${INCLUDES} ${MYSQL_INCLUDE_DIR})
-
-mad_module(UserBackendMysql
- Module.cpp Module.h
- UserBackendMysql.cpp UserBackendMysql.h
-)
-
-mad_module_libraries(UserBackendMysql ${MYSQL_LIBRARIES}) \ No newline at end of file
diff --git a/src/modules/UserConfigBackendHome/CMakeLists.txt b/src/modules/UserConfigBackendHome/CMakeLists.txt
new file mode 100644
index 0000000..4f8e224
--- /dev/null
+++ b/src/modules/UserConfigBackendHome/CMakeLists.txt
@@ -0,0 +1,8 @@
+include_directories(${INCLUDES})
+
+mad_module(UserConfigBackendHome
+ Module.cpp Module.h
+ UserConfigBackendHome.cpp UserConfigBackendHome.h
+)
+
+mad_module_libraries(UserConfigBackendHome) \ No newline at end of file
diff --git a/src/modules/UserBackendHome/Module.cpp b/src/modules/UserConfigBackendHome/Module.cpp
index b6a1052..cab1b80 100644
--- a/src/modules/UserBackendHome/Module.cpp
+++ b/src/modules/UserConfigBackendHome/Module.cpp
@@ -21,8 +21,8 @@
extern "C" {
-Mad::Common::Module* UserBackendHome_create(Mad::Common::Application *application) {
- return new Mad::Modules::UserBackendHome::Module(application);
+Mad::Common::Module* UserConfigBackendHome_create(Mad::Common::Application *application) {
+ return new Mad::Modules::UserConfigBackendHome::Module(application);
}
}
diff --git a/src/modules/UserBackendHome/Module.h b/src/modules/UserConfigBackendHome/Module.h
index da384bc..1d6322d 100644
--- a/src/modules/UserBackendHome/Module.h
+++ b/src/modules/UserConfigBackendHome/Module.h
@@ -17,26 +17,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef MAD_MODULES_USERBACKENDHOME_MODULE_H_
-#define MAD_MODULES_USERBACKENDHOME_MODULE_H_
+#ifndef MAD_MODULES_USERCONFIGBACKENDHOME_MODULE_H_
+#define MAD_MODULES_USERCONFIGBACKENDHOME_MODULE_H_
-#include "UserBackendHome.h"
+#include "UserConfigBackendHome.h"
#include <Common/Module.h>
#include <Common/UserManager.h>
namespace Mad {
namespace Modules {
-namespace UserBackendHome {
+namespace UserConfigBackendHome {
class Module : public Common::Module {
private:
Common::Application *application;
- boost::shared_ptr<UserBackendHome> backend;
+ boost::shared_ptr<UserConfigBackendHome> backend;
public:
- Module(Common::Application *application0) : application(application0), backend(new UserBackendHome(application)) {
+ Module(Common::Application *application0) : application(application0), backend(new UserConfigBackendHome(application)) {
application->getUserManager()->registerBackend(backend);
}
@@ -49,4 +49,4 @@ class Module : public Common::Module {
}
}
-#endif /* MAD_MODULES_USERBACKENDHOME_MODULE_H_ */
+#endif /* MAD_MODULES_USERCONFIGBACKENDHOME_MODULE_H_ */
diff --git a/src/modules/UserBackendHome/UserBackendHome.cpp b/src/modules/UserConfigBackendHome/UserConfigBackendHome.cpp
index 445af72..b68268b 100644
--- a/src/modules/UserBackendHome/UserBackendHome.cpp
+++ b/src/modules/UserConfigBackendHome/UserConfigBackendHome.cpp
@@ -1,5 +1,5 @@
/*
- * UserBackendHome.cpp
+ * UserConfigBackendHome.cpp
*
* Copyright (C) 2009 Matthias Schiffer <matthias@gamezock.de>
*
@@ -17,7 +17,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "UserBackendHome.h"
+#include "UserConfigBackendHome.h"
#include <Core/ConfigEntry.h>
#include <Core/ConfigManager.h>
@@ -29,9 +29,9 @@
namespace Mad {
namespace Modules {
-namespace UserBackendHome {
+namespace UserConfigBackendHome {
-bool UserBackendHome::handleConfigEntry(const Core::ConfigEntry &entry, bool /*handled*/) {
+bool UserConfigBackendHome::handleConfigEntry(const Core::ConfigEntry &entry, bool /*handled*/) {
if(entry[0].getKey().matches("UserManager")) {
if(entry[1].getKey().matches("Skeleton")) {
if(entry[2].empty())
@@ -67,7 +67,7 @@ bool UserBackendHome::handleConfigEntry(const Core::ConfigEntry &entry, bool /*h
return false;
}
-void UserBackendHome::setOwnerAndCopyMode(const std::string &source, const std::string &dest, const Common::UserInfo &userInfo, bool isSymlink) {
+void UserConfigBackendHome::setOwnerAndCopyMode(const std::string &source, const std::string &dest, const Common::UserInfo &userInfo, bool isSymlink) {
if((isSymlink ? lchown : chown)(dest.c_str(), (uid_t)userInfo.getUid(), (gid_t)userInfo.getGid()) != 0) {
// TODO Error
}
@@ -80,7 +80,7 @@ void UserBackendHome::setOwnerAndCopyMode(const std::string &source, const std::
}
}
-void UserBackendHome::migrateOwner(const std::string &path, const Common::UserInfo &oldUserInfo, const Common::UserInfo &userInfo, bool isSymlink) {
+void UserConfigBackendHome::migrateOwner(const std::string &path, const Common::UserInfo &oldUserInfo, const Common::UserInfo &userInfo, bool isSymlink) {
struct stat st;
if((isSymlink ? lstat : stat)(path.c_str(), &st) != 0) {
// TODO Error
@@ -103,7 +103,7 @@ void UserBackendHome::migrateOwner(const std::string &path, const Common::UserIn
}
}
-void UserBackendHome::addUser(const Common::UserInfo &userInfo) throw(Core::Exception) {
+void UserConfigBackendHome::addUser(const Common::UserInfo &userInfo) throw(Core::Exception) {
boost::filesystem::path path(homeDir);
path /= userInfo.getUsername();
@@ -160,7 +160,7 @@ void UserBackendHome::addUser(const Common::UserInfo &userInfo) throw(Core::Exce
boost::filesystem::current_path(oldPath);
}
-void UserBackendHome::updateUser(const Common::UserInfo &oldUserInfo, const Common::UserInfo &userInfo) throw(Core::Exception) {
+void UserConfigBackendHome::updateUser(const Common::UserInfo &oldUserInfo, const Common::UserInfo &userInfo) throw(Core::Exception) {
boost::filesystem::path oldPath(homeDir);
oldPath /= oldUserInfo.getUsername();
@@ -201,7 +201,7 @@ void UserBackendHome::updateUser(const Common::UserInfo &oldUserInfo, const Comm
}
}
-void UserBackendHome::deleteUser(const Common::UserInfo &userInfo) throw(Core::Exception) {
+void UserConfigBackendHome::deleteUser(const Common::UserInfo &userInfo) throw(Core::Exception) {
boost::filesystem::path path(homeDir);
path /= userInfo.getUsername();
diff --git a/src/modules/UserBackendHome/UserBackendHome.h b/src/modules/UserConfigBackendHome/UserConfigBackendHome.h
index 74fa2cb..f115d9e 100644
--- a/src/modules/UserBackendHome/UserBackendHome.h
+++ b/src/modules/UserConfigBackendHome/UserConfigBackendHome.h
@@ -1,5 +1,5 @@
/*
- * UserBackendMysql.h
+ * UserConfigBackendMysql.h
*
* Copyright (C) 2008 Matthias Schiffer <matthias@gamezock.de>
*
@@ -17,8 +17,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef MAD_MODULES_USERBACKENDHOME_USERBACKENDHOME_H_
-#define MAD_MODULES_USERBACKENDHOME_USERBACKENDHOME_H_
+#ifndef MAD_MODULES_USERCONFIGBACKENDHOME_USERCONFIGBACKENDHOME_H_
+#define MAD_MODULES_USERCONFIGBACKENDHOME_USERCONFIGBACKENDHOME_H_
#include <Common/UserConfigBackend.h>
#include <Common/Application.h>
@@ -30,9 +30,9 @@
namespace Mad {
namespace Modules {
-namespace UserBackendHome {
+namespace UserConfigBackendHome {
-class UserBackendHome : public Common::UserConfigBackend, private Core::Configurable, private boost::noncopyable {
+class UserConfigBackendHome : public Common::UserConfigBackend, private Core::Configurable, private boost::noncopyable {
private:
Common::Application *application;
@@ -54,11 +54,11 @@ class UserBackendHome : public Common::UserConfigBackend, private Core::Configur
virtual void deleteUser(const Common::UserInfo &userInfo) throw(Core::Exception);
public:
- UserBackendHome(Common::Application *application0) : application(application0), homeDir("/home"), dirMode(0755) {
+ UserConfigBackendHome(Common::Application *application0) : application(application0), homeDir("/home"), dirMode(0755) {
application->getConfigManager()->registerConfigurable(this);
}
- virtual ~UserBackendHome() {
+ virtual ~UserConfigBackendHome() {
application->getConfigManager()->unregisterConfigurable(this);
}
};
@@ -67,4 +67,4 @@ class UserBackendHome : public Common::UserConfigBackend, private Core::Configur
}
}
-#endif /* MAD_MODULES_USERBACKENDHOME_USERBACKENDHOME_H_ */
+#endif /* MAD_MODULES_USERCONFIGBACKENDHOME_USERCONFIGBACKENDHOME_H_ */
diff --git a/src/modules/UserDBBackendMysql/CMakeLists.txt b/src/modules/UserDBBackendMysql/CMakeLists.txt
new file mode 100644
index 0000000..8c4f079
--- /dev/null
+++ b/src/modules/UserDBBackendMysql/CMakeLists.txt
@@ -0,0 +1,8 @@
+include_directories(${INCLUDES} ${MYSQL_INCLUDE_DIR})
+
+mad_module(UserDBBackendMysql
+ Module.cpp Module.h
+ UserDBBackendMysql.cpp UserDBBackendMysql.h
+)
+
+mad_module_libraries(UserDBBackendMysql ${MYSQL_LIBRARIES}) \ No newline at end of file
diff --git a/src/modules/UserBackendMysql/Module.cpp b/src/modules/UserDBBackendMysql/Module.cpp
index 9b9839b..a4b51c4 100644
--- a/src/modules/UserBackendMysql/Module.cpp
+++ b/src/modules/UserDBBackendMysql/Module.cpp
@@ -21,8 +21,8 @@
extern "C" {
-Mad::Common::Module* UserBackendMysql_create(Mad::Common::Application *application) {
- return new Mad::Modules::UserBackendMysql::Module(application);
+Mad::Common::Module* UserDBBackendMysql_create(Mad::Common::Application *application) {
+ return new Mad::Modules::UserDBBackendMysql::Module(application);
}
}
diff --git a/src/modules/UserBackendMysql/Module.h b/src/modules/UserDBBackendMysql/Module.h
index 93396a7..ee04409 100644
--- a/src/modules/UserBackendMysql/Module.h
+++ b/src/modules/UserDBBackendMysql/Module.h
@@ -17,26 +17,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef MAD_MODULES_USERBACKENDMYSQL_MODULE_H_
-#define MAD_MODULES_USERBACKENDMYSQL_MODULE_H_
+#ifndef MAD_MODULES_USERDBBACKENDMYSQL_MODULE_H_
+#define MAD_MODULES_USERDBBACKENDMYSQL_MODULE_H_
-#include "UserBackendMysql.h"
+#include "UserDBBackendMysql.h"
#include <Common/Module.h>
#include <Common/UserManager.h>
namespace Mad {
namespace Modules {
-namespace UserBackendMysql {
+namespace UserDBBackendMysql {
class Module : public Common::Module {
private:
Common::Application *application;
- boost::shared_ptr<UserBackendMysql> backend;
+ boost::shared_ptr<UserDBBackendMysql> backend;
public:
- Module(Common::Application *application0) : application(application0), backend(new UserBackendMysql(application)) {
+ Module(Common::Application *application0) : application(application0), backend(new UserDBBackendMysql(application)) {
application->getUserManager()->registerBackend(backend);
}
@@ -49,4 +49,4 @@ class Module : public Common::Module {
}
}
-#endif /* MAD_MODULES_USERBACKENDMYSQL_MODULE_H_ */
+#endif /* MAD_MODULES_USERDBBACKENDMYSQL_MODULE_H_ */
diff --git a/src/modules/UserBackendMysql/UserBackendMysql.cpp b/src/modules/UserDBBackendMysql/UserDBBackendMysql.cpp
index f2729ab..7ca3db2 100644
--- a/src/modules/UserBackendMysql/UserBackendMysql.cpp
+++ b/src/modules/UserDBBackendMysql/UserDBBackendMysql.cpp
@@ -1,5 +1,5 @@
/*
- * UserBackendMysql.cpp
+ * UserDBBackendMysql.cpp
*
* Copyright (C) 2008 Matthias Schiffer <matthias@gamezock.de>
*
@@ -17,7 +17,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "UserBackendMysql.h"
+#include "UserDBBackendMysql.h"
#include <Core/ConfigEntry.h>
#include <Core/ConfigManager.h>
#include <Core/ThreadManager.h>
@@ -32,11 +32,11 @@
namespace Mad {
namespace Modules {
-namespace UserBackendMysql {
+namespace UserDBBackendMysql {
-const std::string UserBackendMysql::name("UserBackendMysql");
+const std::string UserDBBackendMysql::name("UserDBBackendMysql");
-bool UserBackendMysql::handleConfigEntry(const Core::ConfigEntry &entry, bool /*handled*/) {
+bool UserDBBackendMysql::handleConfigEntry(const Core::ConfigEntry &entry, bool /*handled*/) {
if(!entry[0].getKey().matches("UserManager"))
return false;
@@ -70,7 +70,7 @@ bool UserBackendMysql::handleConfigEntry(const Core::ConfigEntry &entry, bool /*
val = strtol(entry[2][0].c_str(), &endptr, 10);
if(endptr != 0 || val < 0 || val > 65535)
- application->log(Core::LoggerBase::WARNING, "UserBackendMysql: Invalid port");
+ application->log(Core::LoggerBase::WARNING, "UserDBBackendMysql: Invalid port");
else
port = val;
}
@@ -157,9 +157,9 @@ bool UserBackendMysql::handleConfigEntry(const Core::ConfigEntry &entry, bool /*
return true;
}
-void UserBackendMysql::configFinished() {
+void UserDBBackendMysql::configFinished() {
if(db.empty()) {
- application->log(Core::LoggerBase::ERROR, "UserBackendMysql: No database name given");
+ application->log(Core::LoggerBase::ERROR, "UserDBBackendMysql: No database name given");
return;
}
@@ -169,7 +169,7 @@ void UserBackendMysql::configFinished() {
}
-UserBackendMysql::Result UserBackendMysql::query(const std::string &query, const ArgumentMap &args) throw(Core::Exception) {
+UserDBBackendMysql::Result UserDBBackendMysql::query(const std::string &query, const ArgumentMap &args) throw(Core::Exception) {
if(!mysql || mysql_ping(mysql))
throw Core::Exception(Core::Exception::NOT_AVAILABLE);
@@ -204,7 +204,7 @@ UserBackendMysql::Result UserBackendMysql::query(const std::string &query, const
}
-boost::shared_ptr<const std::map<unsigned long, Common::UserInfo> > UserBackendMysql::getUserList(boost::posix_time::ptime *timestamp) throw(Core::Exception) {
+boost::shared_ptr<const std::map<unsigned long, Common::UserInfo> > UserDBBackendMysql::getUserList(boost::posix_time::ptime *timestamp) throw(Core::Exception) {
application->getThreadManager()->detach();
boost::unique_lock<boost::mutex> lock(mutex);
@@ -237,7 +237,7 @@ boost::shared_ptr<const std::map<unsigned long, Common::UserInfo> > UserBackendM
return users;
}
-boost::shared_ptr<const Common::UserInfo> UserBackendMysql::getUserInfo(unsigned long uid, boost::posix_time::ptime *timestamp) throw(Core::Exception) {
+boost::shared_ptr<const Common::UserInfo> UserDBBackendMysql::getUserInfo(unsigned long uid, boost::posix_time::ptime *timestamp) throw(Core::Exception) {
application->getThreadManager()->detach();
boost::unique_lock<boost::mutex> lock(mutex);
@@ -273,7 +273,7 @@ boost::shared_ptr<const Common::UserInfo> UserBackendMysql::getUserInfo(unsigned
throw Core::Exception(Core::Exception::NOT_FOUND);
}
-boost::shared_ptr<const Common::UserInfo> UserBackendMysql::getUserInfoByName(const std::string &name, boost::posix_time::ptime *timestamp) throw(Core::Exception) {
+boost::shared_ptr<const Common::UserInfo> UserDBBackendMysql::getUserInfoByName(const std::string &name, boost::posix_time::ptime *timestamp) throw(Core::Exception) {
application->getThreadManager()->detach();
boost::unique_lock<boost::mutex> lock(mutex);
@@ -309,7 +309,7 @@ boost::shared_ptr<const Common::UserInfo> UserBackendMysql::getUserInfoByName(co
throw Core::Exception(Core::Exception::NOT_FOUND);
}
-boost::shared_ptr<const std::set<unsigned long> > UserBackendMysql::getUserGroupList(unsigned long uid, boost::posix_time::ptime *timestamp) throw(Core::Exception) {
+boost::shared_ptr<const std::set<unsigned long> > UserDBBackendMysql::getUserGroupList(unsigned long uid, boost::posix_time::ptime *timestamp) throw(Core::Exception) {
application->getThreadManager()->detach();
boost::unique_lock<boost::mutex> lock(mutex);
@@ -340,7 +340,7 @@ boost::shared_ptr<const std::set<unsigned long> > UserBackendMysql::getUserGroup
}
-boost::shared_ptr<const std::map<unsigned long, Common::GroupInfo> > UserBackendMysql::getGroupList(boost::posix_time::ptime *timestamp) throw(Core::Exception) {
+boost::shared_ptr<const std::map<unsigned long, Common::GroupInfo> > UserDBBackendMysql::getGroupList(boost::posix_time::ptime *timestamp) throw(Core::Exception) {
application->getThreadManager()->detach();
boost::unique_lock<boost::mutex> lock(mutex);
@@ -370,7 +370,7 @@ boost::shared_ptr<const std::map<unsigned long, Common::GroupInfo> > UserBackend
return groups;
}
-boost::shared_ptr<const Common::GroupInfo> UserBackendMysql::getGroupInfo(unsigned long gid, boost::posix_time::ptime *timestamp) throw(Core::Exception) {
+boost::shared_ptr<const Common::GroupInfo> UserDBBackendMysql::getGroupInfo(unsigned long gid, boost::posix_time::ptime *timestamp) throw(Core::Exception) {
application->getThreadManager()->detach();
boost::unique_lock<boost::mutex> lock(mutex);
@@ -400,7 +400,7 @@ boost::shared_ptr<const Common::GroupInfo> UserBackendMysql::getGroupInfo(unsign
throw Core::Exception(Core::Exception::NOT_FOUND);
}
-boost::shared_ptr<const Common::GroupInfo> UserBackendMysql::getGroupInfoByName(const std::string &name, boost::posix_time::ptime *timestamp) throw(Core::Exception) {
+boost::shared_ptr<const Common::GroupInfo> UserDBBackendMysql::getGroupInfoByName(const std::string &name, boost::posix_time::ptime *timestamp) throw(Core::Exception) {
application->getThreadManager()->detach();
boost::unique_lock<boost::mutex> lock(mutex);
@@ -430,7 +430,7 @@ boost::shared_ptr<const Common::GroupInfo> UserBackendMysql::getGroupInfoByName(
throw Core::Exception(Core::Exception::NOT_FOUND);
}
-boost::shared_ptr<const std::set<unsigned long> > UserBackendMysql::getGroupUserList(unsigned long gid, boost::posix_time::ptime *timestamp) throw(Core::Exception) {
+boost::shared_ptr<const std::set<unsigned long> > UserDBBackendMysql::getGroupUserList(unsigned long gid, boost::posix_time::ptime *timestamp) throw(Core::Exception) {
application->getThreadManager()->detach();
boost::unique_lock<boost::mutex> lock(mutex);
@@ -460,7 +460,7 @@ boost::shared_ptr<const std::set<unsigned long> > UserBackendMysql::getGroupUser
return users;
}
-boost::shared_ptr<const std::multimap<unsigned long, unsigned long> > UserBackendMysql::getFullUserGroupList(boost::posix_time::ptime *timestamp) throw(Core::Exception) {
+boost::shared_ptr<const std::multimap<unsigned long, unsigned long> > UserDBBackendMysql::getFullUserGroupList(boost::posix_time::ptime *timestamp) throw(Core::Exception) {
application->getThreadManager()->detach();
boost::unique_lock<boost::mutex> lock(mutex);
@@ -487,7 +487,7 @@ boost::shared_ptr<const std::multimap<unsigned long, unsigned long> > UserBacken
return usergroups;
}
-void UserBackendMysql::addUser(const Common::UserInfo &userInfo) throw(Core::Exception) {
+void UserDBBackendMysql::addUser(const Common::UserInfo &userInfo) throw(Core::Exception) {
application->getThreadManager()->detach();
boost::lock_guard<boost::mutex> lock(mutex);
@@ -510,7 +510,7 @@ void UserBackendMysql::addUser(const Common::UserInfo &userInfo) throw(Core::Exc
lastUpdate = boost::posix_time::microsec_clock::universal_time();
}
-void UserBackendMysql::updateUser(unsigned long uid, const Common::UserInfo &userInfo) throw(Core::Exception) {
+void UserDBBackendMysql::updateUser(unsigned long uid, const Common::UserInfo &userInfo) throw(Core::Exception) {
application->getThreadManager()->detach();
boost::lock_guard<boost::mutex> lock(mutex);
@@ -534,7 +534,7 @@ void UserBackendMysql::updateUser(unsigned long uid, const Common::UserInfo &use
lastUpdate = boost::posix_time::microsec_clock::universal_time();
}
-void UserBackendMysql::deleteUser(unsigned long uid) throw(Core::Exception) {
+void UserDBBackendMysql::deleteUser(unsigned long uid) throw(Core::Exception) {
application->getThreadManager()->detach();
boost::lock_guard<boost::mutex> lock(mutex);
@@ -550,7 +550,7 @@ void UserBackendMysql::deleteUser(unsigned long uid) throw(Core::Exception) {
lastUpdate = boost::posix_time::microsec_clock::universal_time();
}
-void UserBackendMysql::addGroup(const Common::GroupInfo &groupInfo) throw(Core::Exception) {
+void UserDBBackendMysql::addGroup(const Common::GroupInfo &groupInfo) throw(Core::Exception) {
application->getThreadManager()->detach();
boost::lock_guard<boost::mutex> lock(mutex);
@@ -571,7 +571,7 @@ void UserBackendMysql::addGroup(const Common::GroupInfo &groupInfo) throw(Core::
lastUpdate = boost::posix_time::microsec_clock::universal_time();
}
-void UserBackendMysql::updateGroup(unsigned long gid, const Common::GroupInfo &groupInfo) throw(Core::Exception) {
+void UserDBBackendMysql::updateGroup(unsigned long gid, const Common::GroupInfo &groupInfo) throw(Core::Exception) {
application->getThreadManager()->detach();
boost::lock_guard<boost::mutex> lock(mutex);
@@ -593,7 +593,7 @@ void UserBackendMysql::updateGroup(unsigned long gid, const Common::GroupInfo &g
lastUpdate = boost::posix_time::microsec_clock::universal_time();
}
-void UserBackendMysql::deleteGroup(unsigned long gid) throw(Core::Exception) {
+void UserDBBackendMysql::deleteGroup(unsigned long gid) throw(Core::Exception) {
application->getThreadManager()->detach();
boost::lock_guard<boost::mutex> lock(mutex);
@@ -609,7 +609,7 @@ void UserBackendMysql::deleteGroup(unsigned long gid) throw(Core::Exception) {
lastUpdate = boost::posix_time::microsec_clock::universal_time();
}
-void UserBackendMysql::addUserToGroup(unsigned long uid, unsigned long gid) throw(Core::Exception) {
+void UserDBBackendMysql::addUserToGroup(unsigned long uid, unsigned long gid) throw(Core::Exception) {
application->getThreadManager()->detach();
boost::lock_guard<boost::mutex> lock(mutex);
@@ -630,7 +630,7 @@ void UserBackendMysql::addUserToGroup(unsigned long uid, unsigned long gid) thro
lastUpdate = boost::posix_time::microsec_clock::universal_time();
}
-void UserBackendMysql::deleteUserFromGroup(unsigned long uid, unsigned long gid) throw(Core::Exception) {
+void UserDBBackendMysql::deleteUserFromGroup(unsigned long uid, unsigned long gid) throw(Core::Exception) {
application->getThreadManager()->detach();
boost::lock_guard<boost::mutex> lock(mutex);
diff --git a/src/modules/UserBackendMysql/UserBackendMysql.h b/src/modules/UserDBBackendMysql/UserDBBackendMysql.h
index c3848c0..959e133 100644
--- a/src/modules/UserBackendMysql/UserBackendMysql.h
+++ b/src/modules/UserDBBackendMysql/UserDBBackendMysql.h
@@ -1,5 +1,5 @@
/*
- * UserBackendMysql.h
+ * UserDBBackendMysql.h
*
* Copyright (C) 2008 Matthias Schiffer <matthias@gamezock.de>
*
@@ -17,8 +17,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef MAD_MODULES_USERBACKENDMYSQL_USERBACKENDMYSQL_H_
-#define MAD_MODULES_USERBACKENDMYSQL_USERBACKENDMYSQL_H_
+#ifndef MAD_MODULES_USERDBBACKENDMYSQL_USERDBBACKENDMYSQL_H_
+#define MAD_MODULES_USERDBBACKENDMYSQL_USERDBBACKENDMYSQL_H_
#include <Common/UserDBBackend.h>
#include <Common/Application.h>
@@ -33,9 +33,9 @@
namespace Mad {
namespace Modules {
-namespace UserBackendMysql {
+namespace UserDBBackendMysql {
-class UserBackendMysql : public Common::UserDBBackend, private Core::Configurable, private boost::noncopyable {
+class UserDBBackendMysql : public Common::UserDBBackend, private Core::Configurable, private boost::noncopyable {
private:
typedef std::map<std::string, boost::variant<std::string, unsigned long> > ArgumentMap;
@@ -44,7 +44,7 @@ class UserBackendMysql : public Common::UserDBBackend, private Core::Configurabl
class Result {
private:
- friend Result UserBackendMysql::query(const std::string &query, const ArgumentMap &args) throw(Core::Exception);
+ friend Result UserDBBackendMysql::query(const std::string &query, const ArgumentMap &args) throw(Core::Exception);
boost::shared_ptr<MYSQL_RES> result;
@@ -134,11 +134,11 @@ class UserBackendMysql : public Common::UserDBBackend, private Core::Configurabl
virtual void deleteUserFromGroup(unsigned long uid, unsigned long gid) throw(Core::Exception);
public:
- UserBackendMysql(Common::Application *application0) : application(application0), port(0), mysql(0), lastUpdate(boost::posix_time::microsec_clock::universal_time()) {
+ UserDBBackendMysql(Common::Application *application0) : application(application0), port(0), mysql(0), lastUpdate(boost::posix_time::microsec_clock::universal_time()) {
application->getConfigManager()->registerConfigurable(this);
}
- virtual ~UserBackendMysql() {
+ virtual ~UserDBBackendMysql() {
application->getConfigManager()->unregisterConfigurable(this);
if(mysql) {
@@ -156,4 +156,4 @@ class UserBackendMysql : public Common::UserDBBackend, private Core::Configurabl
}
}
-#endif /* MAD_MODULES_USERBACKENDMYSQL_USERBACKENDMYSQL_H_ */
+#endif /* MAD_MODULES_USERDBBACKENDMYSQL_USERBACKENDMYSQL_H_ */