Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
class QgsCredentials | ||
{ | ||
%TypeHeaderCode | ||
#include <qgscredentials.h> | ||
%End | ||
public: | ||
//! virtual destructor | ||
virtual ~QgsCredentials(); | ||
|
||
bool get( QString realm, QString &username, QString &password, QString message = QString::null ); | ||
void put( QString realm, QString username, QString password ); | ||
|
||
//! retrieves instance | ||
static QgsCredentials *instance(); | ||
|
||
protected: | ||
//! request a password | ||
virtual bool request( QString realm, QString &username, QString &password, QString message = QString::null ) = 0; | ||
|
||
//! register instance | ||
void setInstance( QgsCredentials *theInstance ); | ||
}; | ||
|
||
|
||
class QgsCredentialsConsole : QObject, QgsCredentials | ||
{ | ||
%TypeHeaderCode | ||
#include <qgscredentials.h> | ||
%End | ||
|
||
public: | ||
QgsCredentialsConsole(); | ||
|
||
signals: | ||
//! signals that object will be destroyed and shouldn't be used anymore | ||
void destroyed(); | ||
|
||
protected: | ||
virtual bool request( QString realm, QString &username, QString &password, QString message = QString::null ); | ||
}; |