MagicSmoke  $VERSION$
MTLogin Class Reference

Attempt to log into the server. Both the user and the host the user is using are verified. The login will fail if the authentication of either of them fails or the user does not have the righ to login from this host. More...

#include <srcMTLogin.h>

Inheritance diagram for MTLogin:
MTransaction

Public Member Functions

 MTLogin ()
 default constructor: generates an invalid transaction More...
 
 MTLogin (const MTLogin &)
 copy constructor: the two copies share their state More...
 
virtual ~MTLogin ()
 deletes this instance More...
 
Q_SLOT Nullable< QString > getsessionid () const
 
Q_SLOT Nullable< qint64 > getvalidtill () const
 
MTLoginoperator= (const MTLogin &)
 copy assignment: the copy shares the state of the original object More...
 

Static Public Member Functions

static MTLogin asyncQuery (const QString &ausername, const QString &apassword, const QString &ahostname, const QString &ahostkey, QString iface="MagicSmoke")
 emits the query over the network and returns the transaction object, use isFinished() to check for the transaction's state More...
 
static MTLogin query (const QString &ausername, const QString &apassword, const QString &ahostname, const QString &ahostkey, QString iface="MagicSmoke")
 emits the query over the network and returns the finished transaction object More...
 
- Static Public Member Functions inherited from MTransaction
static void setStartStopActions (const MTStartStop &start, const MTStartStop &stop)
 set actions to be executed at start/stop More...
 

Protected Member Functions

 MTLogin (const QString &ausername, const QString &apassword, const QString &ahostname, const QString &ahostkey, QString iface)
 generates an instance from its properties More...
 
virtual bool canLogRequest () const
 
virtual void endQuery ()
 
- Protected Member Functions inherited from MTransaction
 MTransaction (QString iface=QString())
 internal: construct the transaction More...
 
 MTransaction (const WTransaction &)
 internal: copy the transaction More...
 
 MTransaction (const MTransaction &)
 internal: copy the transaction More...
 
QByteArray executeQuery (QString, QByteArray)
 internal: extend executeQuery to show a wait cursor More...
 

Friends

class MTLogin_Private
 

Detailed Description

Attempt to log into the server. Both the user and the host the user is using are verified. The login will fail if the authentication of either of them fails or the user does not have the righ to login from this host.

Constructor & Destructor Documentation

MTLogin::MTLogin ( const QString &  ausername,
const QString &  apassword,
const QString &  ahostname,
const QString &  ahostkey,
QString  iface 
)
explicitprotected

generates an instance from its properties

Parameters
ausernamename of the user
apasswordpassword of the user
ahostnamename of the host
ahostkeythe authentication key of the host
ifaceID of the interface that the transaction will be sent on

References MTLogin_Private::in_hostkey, MTLogin_Private::in_hostname, MTLogin_Private::in_password, MTLogin_Private::in_username, and MTLogin_Private.

MTLogin::MTLogin ( )

default constructor: generates an invalid transaction

References MTLogin_Private.

MTLogin::MTLogin ( const MTLogin t)

copy constructor: the two copies share their state

References MTLogin_Private::attach().

MTLogin::~MTLogin ( )
virtual

deletes this instance

References MTLogin_Private::detach().

Member Function Documentation

MTLogin MTLogin::asyncQuery ( const QString &  ausername,
const QString &  apassword,
const QString &  ahostname,
const QString &  ahostkey,
QString  iface = "MagicSmoke" 
)
static

emits the query over the network and returns the transaction object, use isFinished() to check for the transaction's state

Parameters
ausernamename of the user
apasswordpassword of the user
ahostnamename of the host
ahostkeythe authentication key of the host
ifaceID of the interface that the transaction will be sent on
virtual bool MTLogin::canLogRequest ( ) const
inlineprotectedvirtual
void MTLogin::endQuery ( )
protectedvirtual
Nullable< QString > MTLogin::getsessionid ( ) const
Nullable< qint64 > MTLogin::getvalidtill ( ) const
MTLogin & MTLogin::operator= ( const MTLogin t)

copy assignment: the copy shares the state of the original object

References MTLogin_Private::attach(), and MTLogin_Private::detach().

MTLogin MTLogin::query ( const QString &  ausername,
const QString &  apassword,
const QString &  ahostname,
const QString &  ahostkey,
QString  iface = "MagicSmoke" 
)
static

emits the query over the network and returns the finished transaction object

Parameters
ausernamename of the user
apasswordpassword of the user
ahostnamename of the host
ahostkeythe authentication key of the host
ifaceID of the interface that the transaction will be sent on

Referenced by MSInterface::login(), and MInterface::queryLogin().

Friends And Related Function Documentation

friend class MTLogin_Private
friend

Referenced by MTLogin().


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