From f7d433e6e8559b4584263cae025d3addd1342df4 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 5 Aug 2009 23:55:44 +0200 Subject: =?UTF-8?q?UserManager:=20Check-Funktionen=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Common/Backends/NetworkUserBackend.h | 37 ++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) (limited to 'src/Common/Backends/NetworkUserBackend.h') diff --git a/src/Common/Backends/NetworkUserBackend.h b/src/Common/Backends/NetworkUserBackend.h index 6c0e94d..a3fa1a6 100644 --- a/src/Common/Backends/NetworkUserBackend.h +++ b/src/Common/Backends/NetworkUserBackend.h @@ -74,13 +74,14 @@ class NetworkUserBackend : public UserDBBackend { class UserAddRequest : public Request { private: UserInfo userInfo; + bool check; protected: virtual void sendRequest(); public: - UserAddRequest(Application *application, const UserInfo &userInfo0) - : Request(application), userInfo(userInfo0) {} + UserAddRequest(Application *application, const UserInfo &userInfo0, bool checkOnly) + : Request(application), userInfo(userInfo0), check(checkOnly) {} }; class UserUpdateRequest : public Request { @@ -96,6 +97,32 @@ class NetworkUserBackend : public UserDBBackend { : Request(application), uid(uid0), userInfo(userInfo0) {} }; + class GroupAddRequest : public Request { + private: + GroupInfo groupInfo; + bool check; + + protected: + virtual void sendRequest(); + + public: + GroupAddRequest(Application *application, const GroupInfo &groupInfo0, bool checkOnly) + : Request(application), groupInfo(groupInfo0), check(checkOnly) {} + }; + + class GroupUpdateRequest : public Request { + private: + unsigned long gid; + GroupInfo groupInfo; + + protected: + virtual void sendRequest(); + + public: + GroupUpdateRequest(Application *application, unsigned long gid0, const GroupInfo &groupInfo0) + : Request(application), gid(gid0), groupInfo(groupInfo0) {} + }; + class UserGroupRequest : public Request { private: std::string type; @@ -130,10 +157,16 @@ class NetworkUserBackend : public UserDBBackend { //virtual void setPassword(unsigned long uid, const std::string &password) throw(Core::Exception); + virtual void checkUserInfo(const UserInfo &userInfo) throw(Core::Exception); virtual void addUser(const UserInfo &userInfo) throw(Core::Exception); virtual void updateUser(unsigned long uid, const Common::UserInfo &userInfo) throw(Core::Exception); virtual void deleteUser(unsigned long uid) throw(Core::Exception); + virtual void checkGroupInfo(const GroupInfo &groupInfo) throw(Core::Exception); + virtual void addGroup(const GroupInfo &groupInfo) throw(Core::Exception); + virtual void updateGroup(unsigned long gid, const GroupInfo &groupInfo) throw(Core::Exception); + virtual void deleteGroup(unsigned long gid) throw(Core::Exception); + virtual void addUserToGroup(unsigned long uid, unsigned long gid) throw(Core::Exception); virtual void deleteUserFromGroup(unsigned long uid, unsigned long gid) throw(Core::Exception); -- cgit v1.2.3