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 
31  bool SetUserName(const QString& name);
32 
37  int GetUserGroup() const;
38 
43  void SetUserGroup(int group);
44 
49  bool SetPassword(const QString& password);
50 
54  bool CheckPassword(const QString& password) const;
55 
59  void ResetPassword();
60 
61  // reimplemented (iser::ISerializable)
62  virtual bool Serialize(iser::IArchive& archive);
63 
64 private:
65  QString m_userName;
66  QString m_password;
67  int m_userGroup;
68 };
69 
70 
71 } // namespace iauth
72 
73 
74 #endif //iauth_CUser_included
75 
76 
77 
int GetUserGroup() const
Get group number this user belongs.
bool SetPassword(const QString &password)
Set password of this user.
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-2011 Witold Gantzke and Kirill Lepskiy