summaryrefslogtreecommitdiffstats
path: root/src/Core/UserBackend.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Core/UserBackend.h')
-rw-r--r--src/Core/UserBackend.h39
1 files changed, 11 insertions, 28 deletions
diff --git a/src/Core/UserBackend.h b/src/Core/UserBackend.h
index aad9ace..415f6bf 100644
--- a/src/Core/UserBackend.h
+++ b/src/Core/UserBackend.h
@@ -20,12 +20,12 @@
#ifndef MAD_CORE_USERBACKEND_H_
#define MAD_CORE_USERBACKEND_H_
+#include <config.h>
+
#include <Common/UserInfo.h>
#include <map>
-#include <set>
#include <string>
-#include <vector>
#include <sigc++/signal.h>
@@ -33,39 +33,27 @@
namespace Mad {
namespace Core {
-class UserBackend {
- private:
- struct Compare {
- bool operator() (const UserBackend *b1, const UserBackend *b2) {
- if(b1->getPriority() == b2->getPriority())
- return (b1 > b2);
- else
- return (b1->getPriority() > b2->getPriority());
- }
- };
-
- static std::set<UserBackend*, Compare> backends;
+class UserManager;
+class UserBackend {
protected:
- UserBackend() {}
+ friend class UserManager;
- static void registerBackend(UserBackend *backend) {
- backends.insert(backend);
- }
+ UserBackend() {}
- static void unregisterBackend(UserBackend *backend) {
- backends.erase(backend);
+ virtual bool getUserList(const sigc::slot<void, const std::map<unsigned long, Common::UserInfo>& > &callback _UNUSED_PARAMETER_) {
+ return false;
}
- virtual bool userList(const sigc::slot<void, const std::map<unsigned long, Common::UserInfo>& >&) {
+ virtual bool getUserInfo(unsigned long uid _UNUSED_PARAMETER_, const sigc::slot<void, const Common::UserInfo&> &callback _UNUSED_PARAMETER_) {
return false;
}
- virtual bool userInfo(unsigned long, const sigc::slot<void, const Common::UserInfo&>&) {
+ virtual bool setPassword(unsigned long uid _UNUSED_PARAMETER_, const std::string&, const sigc::slot<void, bool> &callback _UNUSED_PARAMETER_) {
return false;
}
- virtual bool password(unsigned long, const std::string&, const sigc::slot<void, bool>&) {
+ virtual bool addUser(const Common::UserInfo &userInfo _UNUSED_PARAMETER_, const sigc::slot<void, bool> &callback _UNUSED_PARAMETER_) {
return false;
}
@@ -75,11 +63,6 @@ class UserBackend {
public:
virtual ~UserBackend() {}
-
- static bool getUserList(const sigc::slot<void, const std::map<unsigned long, Common::UserInfo>& > &callback);
- static bool getUserInfo(unsigned long uid, const sigc::slot<void, const Common::UserInfo&> &callback);
-
- static bool setPassword(unsigned long uid, const std::string &password, const sigc::slot<void, bool> &callback);
};
}