summaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-07-15 23:11:54 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-07-15 23:11:54 +0200
commitcaeb73a2cdf6db24490bbe3657372fb1ba52b78e (patch)
treeadf4f812f7a18fe35d8bc49cb7b1ef6e8ea513a8 /src/modules
parent5c18630e1c81ac5267c9356e27c1a8f81b4ef6f7 (diff)
downloadmad-caeb73a2cdf6db24490bbe3657372fb1ba52b78e.tar
mad-caeb73a2cdf6db24490bbe3657372fb1ba52b78e.zip
UserManager überarbeitet
UserConfigBackend eingeführt
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/UserBackendMysql/Module.h2
-rw-r--r--src/modules/UserBackendMysql/UserBackendMysql.cpp1
-rw-r--r--src/modules/UserBackendMysql/UserBackendMysql.h12
3 files changed, 11 insertions, 4 deletions
diff --git a/src/modules/UserBackendMysql/Module.h b/src/modules/UserBackendMysql/Module.h
index 7cd963a..93396a7 100644
--- a/src/modules/UserBackendMysql/Module.h
+++ b/src/modules/UserBackendMysql/Module.h
@@ -22,8 +22,8 @@
#include "UserBackendMysql.h"
-#include <Common/UserManager.h>
#include <Common/Module.h>
+#include <Common/UserManager.h>
namespace Mad {
namespace Modules {
diff --git a/src/modules/UserBackendMysql/UserBackendMysql.cpp b/src/modules/UserBackendMysql/UserBackendMysql.cpp
index e076b10..e7c656b 100644
--- a/src/modules/UserBackendMysql/UserBackendMysql.cpp
+++ b/src/modules/UserBackendMysql/UserBackendMysql.cpp
@@ -36,6 +36,7 @@ namespace Mad {
namespace Modules {
namespace UserBackendMysql {
+const std::string UserBackendMysql::name("UserBackendMysql");
bool UserBackendMysql::handleConfigEntry(const Core::ConfigEntry &entry, bool handled) {
if(handled)
diff --git a/src/modules/UserBackendMysql/UserBackendMysql.h b/src/modules/UserBackendMysql/UserBackendMysql.h
index 5ed8480..85bc678 100644
--- a/src/modules/UserBackendMysql/UserBackendMysql.h
+++ b/src/modules/UserBackendMysql/UserBackendMysql.h
@@ -20,7 +20,7 @@
#ifndef MAD_MODULES_USERBACKENDMYSQL_USERBACKENDMYSQL_H_
#define MAD_MODULES_USERBACKENDMYSQL_USERBACKENDMYSQL_H_
-#include <Common/UserBackend.h>
+#include <Common/UserDBBackend.h>
#include <Common/Application.h>
#include <Core/Configurable.h>
@@ -35,7 +35,7 @@ namespace Mad {
namespace Modules {
namespace UserBackendMysql {
-class UserBackendMysql : public Common::UserBackend, private Core::Configurable, private boost::noncopyable {
+class UserBackendMysql : public Common::UserDBBackend, private Core::Configurable, private boost::noncopyable {
private:
typedef std::map<std::string, boost::variant<std::string, unsigned long> > ArgumentMap;
@@ -84,6 +84,8 @@ class UserBackendMysql : public Common::UserBackend, private Core::Configurable,
}
};
+ static const std::string name;
+
Common::Application *application;
std::string host, username, passwd, db, unixSocket;
@@ -104,7 +106,7 @@ class UserBackendMysql : public Common::UserBackend, private Core::Configurable,
boost::mutex mutex;
protected:
- virtual bool handleConfigEntry(const Core::ConfigEntry &entry, bool);
+ virtual bool handleConfigEntry(const Core::ConfigEntry &entry, bool handled);
virtual void configFinished();
virtual boost::shared_ptr<const std::map<unsigned long, Common::UserInfo> > getUserList(boost::posix_time::ptime *timestamp) throw(Core::Exception);
@@ -139,6 +141,10 @@ class UserBackendMysql : public Common::UserBackend, private Core::Configurable,
mysql = 0;
}
}
+
+ virtual const std::string& getName() {
+ return name;
+ }
};
}