-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add QgsNetworkAccessManager to core as singleton - add support for multiple proxy factories - remove qgisNetworkAccessManager property hack - python bindings wms provider: - use QgsNetworkAccessManager - some precision changes git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13443 c8812cc2-4d05-0410-92ff-de0c093fc19c
- Loading branch information
jef
committed
May 8, 2010
1 parent
6e5f318
commit 564b7b4
Showing
14 changed files
with
300 additions
and
228 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,51 @@ | ||
/* | ||
* \class QgsNetworkAccessManager | ||
* \brief network access manager for QGIS | ||
* \ingroup core | ||
* \since 1.5 | ||
* | ||
* This class implements the QGIS network access manager. It's a singleton | ||
* that can be used across QGIS. | ||
* | ||
* Plugins can insert proxy factories and thereby redirect requests to | ||
* individual proxies. | ||
* | ||
* If no proxy factories are there or none returns a proxy for an URL a | ||
* fallback proxy can be set. There's also a exclude list that defines URLs | ||
* that the fallback proxy should not be used for, then no proxy will be used. | ||
* | ||
*/ | ||
|
||
class QgsNetworkAccessManager : QNetworkAccessManager | ||
{ | ||
%TypeHeaderCode | ||
#include <qgsnetworkaccessmanager.h> | ||
%End | ||
//! returns a point to the single instance | ||
// and creates that instance on the first call. | ||
static QgsNetworkAccessManager *instance(); | ||
|
||
//! destructor | ||
~QgsNetworkAccessManager(); | ||
|
||
//! insert a factory into the proxy factories list | ||
void insertProxyFactory(QNetworkProxyFactory *factory /TransferTo/); | ||
|
||
//! remove a factory from the proxy factories list | ||
void removeProxyFactory(QNetworkProxyFactory *factory /TransferBack/); | ||
|
||
//! retrieve proxy factory list | ||
void setDiskCache( QString directory, qint64 size ); | ||
|
||
//! retrieve fall back proxy (for urls that no factory returned proxies for) | ||
const QList<QNetworkProxyFactory *> proxyFactories() const; | ||
|
||
//! retrieve exclude list (urls shouldn't use the fallback proxy) | ||
const QStringList &excludeList() const; | ||
|
||
//! retrieve fall back proxy (for urls that no factory returned proxies for) | ||
const QNetworkProxy &fallbackProxy() const; | ||
|
||
//! set fallback proxy and URL that shouldn't use it. | ||
void setFallbackProxyAndExcludes( const QNetworkProxy &proxy, const QStringList &excludes ); | ||
}; |
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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.