Skip to content
Permalink
Browse files

add sip bindings to QgsCredentials

  • Loading branch information
jef-n committed Sep 17, 2012
1 parent 9117bf1 commit aad3f4e5a1c440670595e93988318ae855671177
Showing with 41 additions and 0 deletions.
  1. +1 −0 python/core/core.sip
  2. +40 −0 python/core/qgscredentials.sip
@@ -98,6 +98,7 @@
%Include qgsvectorlayer.sip
%Include qgsvectorlayerimport.sip
%Include qgsvectoroverlay.sip
%Include qgscredentials.sip

%Include qgsnetworkaccessmanager.sip

@@ -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 );
};

0 comments on commit aad3f4e

Please sign in to comment.
You can’t perform that action at this time.