IUsersManager.h
Go to the documentation of this file.
1 #ifndef iauth_IUsersManager_included
2 #define iauth_IUsersManager_included
3 
4 
5 // Qt includes
6 #include <QtCore/QString>
7 
8 // ACF includes
9 #include <iser/ISerializable.h>
10 
11 // ACF-Solutions includes
12 #include <iauth/CUser.h>
13 
14 
15 namespace iauth
16 {
17 
18 
22 class IUsersManager: virtual public iser::ISerializable
23 {
24 public:
29  {
30  CF_USER_ADDED = 0x36e7c73,
33  };
34 
38  virtual int GetUsersCount() const = 0;
39 
44  virtual int FindUserIndex(const QString& name) const = 0;
45 
49  virtual const CUser& GetUser(int index) const = 0;
50 
54  virtual CUser& GetUserRef(int index) = 0;
55 
61  virtual CUser* AddUser(const QString& userName) = 0;
62 
68  virtual bool DeleteUser(const QString& userName) = 0;
69 
78  virtual bool RenameUser(int userIndex, const QString& userName) = 0;
79 
83  virtual int GetUserGroupsCount() const = 0;
84 
88  virtual const QString& GetUserGroupName(int groupIndex) const = 0;
89 };
90 
91 
92 } // namespace iauth
93 
94 
95 #endif // !iauth_IUsersManager_included
96 
97 
virtual const CUser & GetUser(int index) const =0
Get user using its index.
virtual const QString & GetUserGroupName(int groupIndex) const =0
Get number of user groups.
virtual int GetUsersCount() const =0
Get number of users in this collection.
virtual bool RenameUser(int userIndex, const QString &userName)=0
The method renames the user.
virtual CUser * AddUser(const QString &userName)=0
Add a new user to the user list.
virtual int FindUserIndex(const QString &name) const =0
Search for user with specified name.
virtual CUser & GetUserRef(int index)=0
Get reference to user object using its index.
ChangeFlags
Data model change notification flags.
Definition: IUsersManager.h:28
virtual bool DeleteUser(const QString &userName)=0
Delete the user with the user name.
virtual int GetUserGroupsCount() const =0
Get number of user groups.
Provide management of users.
Definition: IUsersManager.h:22

© 2007-2017 Witold Gantzke and Kirill Lepskiy