]> SALOME platform Git repositories - modules/gde.git/blob - projects/GDE_API_CPP/api/src/UserService.hpp
Salome HOME
UserService + tests
[modules/gde.git] / projects / GDE_API_CPP / api / src / UserService.hpp
1 #ifndef GDE_USER_SERVICE_HPP
2 #define GDE_USER_SERVICE_HPP
3
4 #include "User.hpp"
5 #include "Group.hpp"
6 #include "GDESession.hpp"
7
8 #include <string>
9
10 namespace gde {
11
12   class UserService {
13     friend class GDESession;
14
15   public:
16     const User createUser(const std::string& name, const std::string& password);
17     bool deleteUser(const User&);
18     const User findUser(const std::string& name);
19
20     const Group createGroup(const std::string& name);
21     bool deleteGroup(const Group&);
22     const Group findGroup(const std::string& name);
23
24     bool addToGroup(const Group&, const User&);
25     bool removeFromGroup(const Group&, const User&);
26
27   private:
28     UserService(const GDESession& session) : _session(session) {}
29     ~UserService() {}
30     UserService(const UserService&); // non copyable
31     UserService& operator=(const UserService&); // non copyable
32
33   private:
34     static std::string _servletName;
35     const GDESession& _session;
36
37   };
38
39 };
40
41 #endif