Public Types | Public Member Functions | Protected Member Functions | List of all members
iauth::CSimpleLoginComp Class Reference

#include <CSimpleLoginComp.h>

Inheritance diagram for iauth::CSimpleLoginComp:
icomp::CComponentBase iauth::ILogin iauth::IRightsProvider iser::ISerializable icomp::IComponent istd::IChangeable istd::IChangeable istd::IChangeable istd::IPolymorphic istd::IPolymorphic istd::IPolymorphic istd::IPolymorphic

Public Types

typedef icomp::CComponentBase BaseClass
 
 Data model change notification flags. More...

Public Member Functions

 CSimpleLoginComp ()
 
virtual int GetUsersCount () const
 
virtual CUserGetUser (int index) const
 
virtual int FindUserIndex (const QString &name) const
 
virtual bool AddUser (const CUser &user)
 
virtual CUserGetLoggedUser () const
 Returns the currently logged on user. More...
 
virtual bool Login (const QString &userName, const QString &password)
 Log in user. More...
 
virtual bool Logout ()
 Log in user. More...
 
virtual bool HasRight (const QByteArray &operationId, bool beQuiet=false) const
 Checks if user has rights for specific operation. More...
 
virtual bool Serialize (iser::IArchive &archive)
 
- Public Member Functions inherited from icomp::IComponent
virtual const ICompositeComponentGetParentComponent (bool ownerOnly=false) const =0
 
virtual void * GetInterface (const istd::CClassInfo &interfaceType, const QByteArray &subId="")=0
 
virtual const IComponentContextGetComponentContext () const =0
 
virtual void SetComponentContext (const icomp::IComponentContext *contextPtr, const ICompositeComponent *parentPtr, bool isParentOwner)=0
 

Protected Member Functions

virtual void OnComponentCreated ()
 

Detailed Description

Definition at line 21 of file CSimpleLoginComp.h.

Member Typedef Documentation

Definition at line 28 of file CSimpleLoginComp.h.

Constructor & Destructor Documentation

iauth::CSimpleLoginComp::CSimpleLoginComp ( )

Member Function Documentation

virtual bool iauth::CSimpleLoginComp::AddUser ( const CUser user)
virtual
virtual int iauth::CSimpleLoginComp::FindUserIndex ( const QString &  name) const
virtual
virtual CUser* iauth::CSimpleLoginComp::GetLoggedUser ( ) const
virtual

Returns the currently logged on user.

Returns
user is currently logged on, or NULL, if no user is logged.

Implements iauth::ILogin.

virtual CUser& iauth::CSimpleLoginComp::GetUser ( int  index) const
virtual
virtual int iauth::CSimpleLoginComp::GetUsersCount ( ) const
virtual
virtual bool iauth::CSimpleLoginComp::HasRight ( const QByteArray &  operationId,
bool  beQuiet = false 
) const
virtual

Checks if user has rights for specific operation.

Parameters
operationIdid of operation.
beQuietif it is true, user can not be asked for password during this check.

Implements iauth::IRightsProvider.

virtual bool iauth::CSimpleLoginComp::Login ( const QString &  userName,
const QString &  password 
)
virtual

Log in user.

Returns
true, if user is accepted.

Implements iauth::ILogin.

virtual bool iauth::CSimpleLoginComp::Logout ( )
virtual

Log in user.

Returns
true, if logout successful.

Implements iauth::ILogin.

virtual void iauth::CSimpleLoginComp::OnComponentCreated ( )
protectedvirtual
virtual bool iauth::CSimpleLoginComp::Serialize ( iser::IArchive archive)
virtual

The documentation for this class was generated from the following file:

© 2007-2017 Witold Gantzke and Kirill Lepskiy