CUser.h
Go to the documentation of this file.
1 #ifndef iauth_CUser_included
2 #define iauth_CUser_included
3 
4 
5 // Qt includes
6 #include <QtCore/QString>
7 
8 // ACF includes
9 #include <iser/ISerializable.h>
10 
11 
12 namespace iauth
13 {
14 
15 
16 class CUser: virtual public iser::ISerializable
17 {
18 public:
19  CUser(const QString& userName = "", const QString& password = "", int userGroup = 0);
20  CUser(const CUser& user);
21 
25  const QString& GetUserName() const;
26 
30  const QString& GetPassword() const;
31 
36  bool SetUserName(const QString& name);
37 
42  int GetUserGroup() const;
43 
48  void SetUserGroup(int group);
49 
54  bool SetPassword(const QString& password);
55 
59  bool CheckPassword(const QString& password) const;
60 
64  void ResetPassword();
65 
66  // reimplemented (iser::ISerializable)
67  virtual bool Serialize(iser::IArchive& archive);
68 
69 private:
70  QString m_userName;
71  QString m_password;
72  int m_userGroup;
73 };
74 
75 
76 } // namespace iauth
77 
78 
79 #endif //iauth_CUser_included
80 
81 
82 
int GetUserGroup() const
Get group number this user belongs.
bool SetPassword(const QString &password)
Set password of this user.
const QString & GetPassword() const
Get user's password.
void SetUserGroup(int group)
Set group number this user belongs.
bool CheckPassword(const QString &password) const
Check, if password is correct.
bool SetUserName(const QString &name)
Set name of user.
void ResetPassword()
Set password to be reseted.
CUser(const QString &userName="", const QString &password="", int userGroup=0)
virtual bool Serialize(iser::IArchive &archive)
const QString & GetUserName() const
Get name of user.

© 2007-2017 Witold Gantzke and Kirill Lepskiy