GluonPlayer::Authentication Class Reference

Maintains authentication information for a Gluon Player. More...

#include <authentication.h>

Inheritance diagram for GluonPlayer::Authentication:
GluonCore::Singleton< T > QObject

List of all members.

Signals

void initialized ()
void initFailed ()
void registered ()
void loggedIn ()
void loginFailed ()

Public Member Functions

void init ()
bool isInitialized ()
Q_INVOKABLE bool login (const QString &username, const QString &password)
bool isLoggedIn ()
bool hasCredentials ()
QString username ()
QString password ()

Protected Slots

void finishInit ()
void checkLoginResult (Attica::BaseJob *)
void onRegisterClicked (const QString &username, const QString &password, const QString &mail, const QString &firstName, const QString &lastName)
void onRegisterAccountFinished (Attica::BaseJob *job)

Friends

class GluonCore::Singleton< Authentication >

Detailed Description

Maintains authentication information for a Gluon Player.

This singleton maintains authentication credentials to access the online OCS server and provides a way to Gluon Player implementations to login, save credentials, load credentials etc.

Definition at line 45 of file authentication.h.


Member Function Documentation

void Authentication::checkLoginResult ( Attica::BaseJob *  baseJob  )  [protected, slot]

Definition at line 175 of file authentication.cpp.

void Authentication::finishInit (  )  [protected, slot]

Definition at line 104 of file authentication.cpp.

bool Authentication::hasCredentials (  ) 

use to check if saved credentials are available

Returns:
true if credentials are available

Definition at line 99 of file authentication.cpp.

void Authentication::init (  ) 

function to initialize the Authentication module. Must be called before using the library

Definition at line 41 of file authentication.cpp.

void GluonPlayer::Authentication::initFailed (  )  [signal]

signal which is emitted if the initialization failed

void GluonPlayer::Authentication::initialized (  )  [signal]

signal which is emitted when the initialization is complete

bool Authentication::isInitialized (  ) 

returns if the library is initialized and ready to use

Definition at line 50 of file authentication.cpp.

bool Authentication::isLoggedIn (  ) 

use to check if we are logged in

Returns:
true if logged in, false otherwise

Definition at line 94 of file authentication.cpp.

void GluonPlayer::Authentication::loggedIn (  )  [signal]

signal which is emitted if the login is complete

bool Authentication::login ( const QString &  username,
const QString &  password 
)

use to perform a login. Connect to the signal loggedIn() and loginFailed() to know the result.

Parameters:
username The username to be used
Parameters:
password The password to be used
Returns:
true if login was successfully initiated, false otherwise.

Definition at line 78 of file authentication.cpp.

void GluonPlayer::Authentication::loginFailed (  )  [signal]

signal which is emitted when the login failed

void Authentication::onRegisterAccountFinished ( Attica::BaseJob *  job  )  [protected, slot]

Definition at line 158 of file authentication.cpp.

void Authentication::onRegisterClicked ( const QString &  username,
const QString &  password,
const QString &  mail,
const QString &  firstName,
const QString &  lastName 
) [protected, slot]

Definition at line 65 of file authentication.cpp.

QString Authentication::password (  ) 

use to retrieve the password

Returns:
a QString containing the password, empty string if not available

Definition at line 60 of file authentication.cpp.

void GluonPlayer::Authentication::registered (  )  [signal]

signal which is emitted if the new account is registered

QString Authentication::username (  ) 

use to retrieve the username

Returns:
a QString containing the username, empty string if not available

Definition at line 55 of file authentication.cpp.


Friends And Related Function Documentation

friend class GluonCore::Singleton< Authentication > [friend]

Definition at line 112 of file authentication.h.


The documentation for this class was generated from the following files:
Generated on Mon Dec 27 13:13:44 2010 for Gluon by  doxygen 1.6.3