Interface for requesting credentials in QGIS in GUI independent way.
More...
#include <qgscredentials.h>
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) |
void | lock () |
| Lock the instance against access from multiple threads.
|
void | unlock () |
| Unlock the instance after being locked.
|
QMutex * | mutex () |
| Return pointer to mutex.
|
Protected Member Functions |
| QgsCredentials () |
virtual bool | request (QString realm, QString &username, QString &password, QString message=QString::null)=0 |
| request a password
|
void | setInstance (QgsCredentials *theInstance) |
| register 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
Constructor & Destructor Documentation
QgsCredentials::~QgsCredentials |
( |
| ) |
|
|
virtual |
QgsCredentials::QgsCredentials |
( |
| ) |
|
|
protected |
Member Function Documentation
bool QgsCredentials::get |
( |
QString |
realm, |
|
|
QString & |
username, |
|
|
QString & |
password, |
|
|
QString |
message = QString::null |
|
) |
| |
void QgsCredentials::lock |
( |
| ) |
|
Lock the instance against access from multiple threads.
This does not really lock access to get/put methds, it will just prevent other threads to lock the instance and continue the execution. When the class is used from non-GUI threads, they should call lock() before the get/put calls to avoid race conditions.
- Note
- added in 2.4
QMutex* QgsCredentials::mutex |
( |
| ) |
|
|
inline |
Return pointer to mutex.
- Note
- added in 2.4
void QgsCredentials::put |
( |
QString |
realm, |
|
|
QString |
username, |
|
|
QString |
password |
|
) |
| |
virtual bool QgsCredentials::request |
( |
QString |
realm, |
|
|
QString & |
username, |
|
|
QString & |
password, |
|
|
QString |
message = QString::null |
|
) |
| |
|
protectedpure virtual |
void QgsCredentials::unlock |
( |
| ) |
|
Unlock the instance after being locked.
- Note
- added in 2.4
The documentation for this class was generated from the following files: