QgsCredentials Class Reference
[QGIS core library]

Interface for requesting credentials in QGIS in GUI independent way. More...

#include <qgscredentials.h>

Inheritance diagram for QgsCredentials:

Inheritance graph
[legend]
Collaboration diagram for QgsCredentials:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ~QgsCredentials ()
 virtual destructor
bool get (QString realm, QString &username, QString &password, QString message=QString::null)
void put (QString realm, QString username, QString password)

Static Public Member Functions

static QgsCredentialsinstance ()
 retrieves instance

Protected Member Functions

virtual bool request (QString realm, QString &username, QString &password, QString message=QString::null)=0
 request a password
void setInstance (QgsCredentials *theInstance)
 register instance

Private Attributes

QMap< QString, QPair< QString,
QString > > 
mCredentialCache
 cache for already requested credentials in this session

Static Private Attributes

static QgsCredentialssmInstance = 0
 Pointer to the credential instance.


Detailed Description

Interface for requesting credentials in QGIS in GUI independent way.

This class provides abstraction of a dialog for requesting credentials to the user. By default QgsCredentials will be used if not overridden with other credential creator function.

QGIS application uses QgsCredentialDialog class for displaying a dialog to the user.

Object deletes itself when it's not needed anymore. Children should use signal destroyed() to be notified of the deletion

Definition at line 37 of file qgscredentials.h.


Constructor & Destructor Documentation

QgsCredentials::~QgsCredentials (  )  [virtual]

virtual destructor

Definition at line 41 of file qgscredentials.cpp.


Member Function Documentation

bool QgsCredentials::get ( QString  realm,
QString &  username,
QString &  password,
QString  message = QString::null 
)

Definition at line 45 of file qgscredentials.cpp.

References mCredentialCache, QgsDebugMsg, and request().

void QgsCredentials::put ( QString  realm,
QString  username,
QString  password 
)

Definition at line 67 of file qgscredentials.cpp.

References mCredentialCache, and QgsDebugMsg.

QgsCredentials * QgsCredentials::instance (  )  [static]

retrieves instance

Definition at line 33 of file qgscredentials.cpp.

References smInstance.

virtual bool QgsCredentials::request ( QString  realm,
QString &  username,
QString &  password,
QString  message = QString::null 
) [protected, pure virtual]

request a password

Implemented in QgsCredentialsConsole, and QgsCredentialDialog.

Referenced by get().

void QgsCredentials::setInstance ( QgsCredentials theInstance  )  [protected]

register instance

Definition at line 25 of file qgscredentials.cpp.

References QgsDebugMsg, and smInstance.

Referenced by QgsCredentialDialog::QgsCredentialDialog(), and QgsCredentialsConsole::QgsCredentialsConsole().


Member Data Documentation

QMap< QString, QPair<QString, QString> > QgsCredentials::mCredentialCache [private]

cache for already requested credentials in this session

Definition at line 58 of file qgscredentials.h.

Referenced by get(), and put().

QgsCredentials * QgsCredentials::smInstance = 0 [static, private]

Pointer to the credential instance.

Definition at line 61 of file qgscredentials.h.

Referenced by instance(), and setInstance().


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

Generated on Sat Feb 4 19:17:31 2012 for Quantum GIS API Documentation by  doxygen 1.5.6