QGIS API Documentation  2.3.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Slots | Private Attributes | List of all members
QgsNetworkAccessManager Class Reference

#include <qgsnetworkaccessmanager.h>

Inheritance diagram for QgsNetworkAccessManager:
Inheritance graph
[legend]
Collaboration diagram for QgsNetworkAccessManager:
Collaboration graph
[legend]

Signals

void requestAboutToBeCreated (QNetworkAccessManager::Operation, const QNetworkRequest &, QIODevice *)
 
void requestCreated (QNetworkReply *)
 
void requestTimedOut (QNetworkReply *)
 

Public Member Functions

 QgsNetworkAccessManager (QObject *parent=0)
 
 ~QgsNetworkAccessManager ()
 destructor More...
 
void insertProxyFactory (QNetworkProxyFactory *factory)
 insert a factory into the proxy factories list More...
 
void removeProxyFactory (QNetworkProxyFactory *factory)
 remove a factory from the proxy factories list More...
 
const QList
< QNetworkProxyFactory * > 
proxyFactories () const
 retrieve proxy factory list More...
 
const QNetworkProxy & fallbackProxy () const
 retrieve fall back proxy (for urls that no factory returned proxies for) More...
 
const QStringList & excludeList () const
 retrieve exclude list (urls shouldn't use the fallback proxy) More...
 
void setFallbackProxyAndExcludes (const QNetworkProxy &proxy, const QStringList &excludes)
 set fallback proxy and URL that shouldn't use it. More...
 
void setupDefaultProxyAndCache ()
 Setup the NAM according to the user's settings. More...
 

Static Public Member Functions

static QgsNetworkAccessManagerinstance ()
 returns a pointer to the single instance More...
 
static QString cacheLoadControlName (QNetworkRequest::CacheLoadControl theControl)
 Get name for QNetworkRequest::CacheLoadControl. More...
 
static
QNetworkRequest::CacheLoadControl 
cacheLoadControlFromName (const QString &theName)
 Get QNetworkRequest::CacheLoadControl from name. More...
 

Protected Member Functions

virtual QNetworkReply * createRequest (QNetworkAccessManager::Operation op, const QNetworkRequest &req, QIODevice *outgoingData=0)
 

Private Slots

void abortRequest ()
 

Private Attributes

QList< QNetworkProxyFactory * > mProxyFactories
 
QNetworkProxy mFallbackProxy
 
QStringList mExcludedURLs
 

Detailed Description

Definition at line 44 of file qgsnetworkaccessmanager.h.

Constructor & Destructor Documentation

QgsNetworkAccessManager::QgsNetworkAccessManager ( QObject *  parent = 0)

Definition at line 84 of file qgsnetworkaccessmanager.cpp.

QgsNetworkAccessManager::~QgsNetworkAccessManager ( )

destructor

Definition at line 90 of file qgsnetworkaccessmanager.cpp.

Member Function Documentation

void QgsNetworkAccessManager::abortRequest ( )
privateslot

Definition at line 167 of file qgsnetworkaccessmanager.cpp.

References QgsMessageLog::logMessage(), requestTimedOut(), and tr.

Referenced by createRequest().

QNetworkRequest::CacheLoadControl QgsNetworkAccessManager::cacheLoadControlFromName ( const QString &  theName)
static

Get QNetworkRequest::CacheLoadControl from name.

Definition at line 205 of file qgsnetworkaccessmanager.cpp.

QString QgsNetworkAccessManager::cacheLoadControlName ( QNetworkRequest::CacheLoadControl  theControl)
static

Get name for QNetworkRequest::CacheLoadControl.

Definition at line 183 of file qgsnetworkaccessmanager.cpp.

QNetworkReply * QgsNetworkAccessManager::createRequest ( QNetworkAccessManager::Operation  op,
const QNetworkRequest &  req,
QIODevice *  outgoingData = 0 
)
protectedvirtual
const QStringList & QgsNetworkAccessManager::excludeList ( ) const

retrieve exclude list (urls shouldn't use the fallback proxy)

Definition at line 109 of file qgsnetworkaccessmanager.cpp.

References mExcludedURLs.

Referenced by QgsNetworkProxyFactory::queryProxy().

const QNetworkProxy & QgsNetworkAccessManager::fallbackProxy ( ) const

retrieve fall back proxy (for urls that no factory returned proxies for)

Definition at line 114 of file qgsnetworkaccessmanager.cpp.

References mFallbackProxy.

Referenced by QgsNetworkProxyFactory::queryProxy().

void QgsNetworkAccessManager::insertProxyFactory ( QNetworkProxyFactory *  factory)

insert a factory into the proxy factories list

Definition at line 94 of file qgsnetworkaccessmanager.cpp.

References mProxyFactories.

QgsNetworkAccessManager * QgsNetworkAccessManager::instance ( )
static
const QList< QNetworkProxyFactory * > QgsNetworkAccessManager::proxyFactories ( ) const

retrieve proxy factory list

Definition at line 104 of file qgsnetworkaccessmanager.cpp.

References mProxyFactories.

Referenced by QgsNetworkProxyFactory::queryProxy().

void QgsNetworkAccessManager::removeProxyFactory ( QNetworkProxyFactory *  factory)

remove a factory from the proxy factories list

Definition at line 99 of file qgsnetworkaccessmanager.cpp.

References mProxyFactories.

void QgsNetworkAccessManager::requestAboutToBeCreated ( QNetworkAccessManager::Operation  ,
const QNetworkRequest &  ,
QIODevice *   
)
signal

Referenced by createRequest().

void QgsNetworkAccessManager::requestCreated ( QNetworkReply *  )
signal

Referenced by createRequest().

void QgsNetworkAccessManager::requestTimedOut ( QNetworkReply *  )
signal

Referenced by abortRequest().

void QgsNetworkAccessManager::setFallbackProxyAndExcludes ( const QNetworkProxy &  proxy,
const QStringList &  excludes 
)

set fallback proxy and URL that shouldn't use it.

Definition at line 119 of file qgsnetworkaccessmanager.cpp.

References mExcludedURLs, mFallbackProxy, and QgsDebugMsg.

Referenced by setupDefaultProxyAndCache().

void QgsNetworkAccessManager::setupDefaultProxyAndCache ( )

Setup the NAM according to the user's settings.

Definition at line 226 of file qgsnetworkaccessmanager.cpp.

References QgsApplication::qgisSettingsDirPath(), QgsDebugMsg, and setFallbackProxyAndExcludes().

Member Data Documentation

QStringList QgsNetworkAccessManager::mExcludedURLs
private

Definition at line 99 of file qgsnetworkaccessmanager.h.

Referenced by excludeList(), and setFallbackProxyAndExcludes().

QNetworkProxy QgsNetworkAccessManager::mFallbackProxy
private

Definition at line 98 of file qgsnetworkaccessmanager.h.

Referenced by fallbackProxy(), and setFallbackProxyAndExcludes().

QList<QNetworkProxyFactory*> QgsNetworkAccessManager::mProxyFactories
private

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