Skip to content
Permalink
Browse files

Dox++

  • Loading branch information
nyalldawson committed Feb 1, 2019
1 parent 18941a1 commit dcb6104f47650830bd50ef926d88cddfe981995a
Showing with 104 additions and 18 deletions.
  1. +46 −9 python/core/auto_generated/qgsnetworkaccessmanager.sip.in
  2. +58 −9 src/core/qgsnetworkaccessmanager.h
@@ -147,42 +147,79 @@ need to be handled on the main thread. See in-depth discussion below.

void insertProxyFactory( QNetworkProxyFactory *factory /Transfer/ );
%Docstring
insert a factory into the proxy factories list
Inserts a ``factory`` into the proxy factories list.

Ownership of ``factory`` is transferred to the manager.

.. seealso:: :py:func:`removeProxyFactory`

.. seealso:: :py:func:`proxyFactories`
%End

void removeProxyFactory( QNetworkProxyFactory *factory /TransferBack/ );
%Docstring
remove a factory from the proxy factories list
Removes a ``factory`` from the proxy factories list.

.. seealso:: :py:func:`insertProxyFactory`

.. seealso:: :py:func:`proxyFactories`
%End

const QList<QNetworkProxyFactory *> proxyFactories() const;
%Docstring
retrieve proxy factory list
Returns a list of proxy factories used by the manager.

.. seealso:: :py:func:`insertProxyFactory`

.. seealso:: :py:func:`proxyFactories`
%End

const QNetworkProxy &fallbackProxy() const;
%Docstring
retrieve fall back proxy (for urls that no factory returned proxies for)
Returns the fallback proxy used by the manager.

The fallback proxy is used for URLs which no other proxy factory returned proxies for.

.. seealso:: :py:func:`proxyFactories`

.. seealso:: :py:func:`setFallbackProxyAndExcludes`
%End

QStringList excludeList() const;
%Docstring
retrieve exclude list (urls shouldn't use the fallback proxy)
Returns the proxy exclude list.

This list consists of the beginning of URL strings which will not use the fallback proxy.

.. seealso:: :py:func:`fallbackProxy`

.. seealso:: :py:func:`setFallbackProxyAndExcludes`
%End

void setFallbackProxyAndExcludes( const QNetworkProxy &proxy, const QStringList &excludes );
%Docstring
Sets fallback proxy and URL that shouldn't use it.
Sets the fallback ``proxy`` and URLs which shouldn't use it.

The fallback proxy is used for URLs which no other proxy factory returned proxies for.
The ``excludes`` list specifies the beginning of URL strings which will not use this fallback proxy.

.. seealso:: :py:func:`fallbackProxy`

.. seealso:: :py:func:`excludeList`
%End

static QString cacheLoadControlName( QNetworkRequest::CacheLoadControl control );
%Docstring
Gets name for QNetworkRequest.CacheLoadControl
Returns the name for QNetworkRequest.CacheLoadControl.

.. seealso:: :py:func:`cacheLoadControlFromName`
%End

static QNetworkRequest::CacheLoadControl cacheLoadControlFromName( const QString &name );
%Docstring
Gets QNetworkRequest.CacheLoadControl from name
Returns QNetworkRequest.CacheLoadControl from a ``name``.

.. seealso:: :py:func:`cacheLoadControlName`
%End

void setupDefaultProxyAndCache( Qt::ConnectionType connectionType = Qt::BlockingQueuedConnection );
@@ -196,7 +233,7 @@ for the constructor of this class.

bool useSystemProxy() const;
%Docstring
Returns whether the system proxy should be used
Returns whether the system proxy should be used.
%End

signals:
@@ -313,28 +313,75 @@ class CORE_EXPORT QgsNetworkAccessManager : public QNetworkAccessManager
void setAuthHandler( std::unique_ptr< QgsNetworkAuthenticationHandler > handler );
#endif

//! insert a factory into the proxy factories list
/**
* Inserts a \a factory into the proxy factories list.
*
* Ownership of \a factory is transferred to the manager.
*
* \see removeProxyFactory()
* \see proxyFactories()
*/
void insertProxyFactory( QNetworkProxyFactory *factory SIP_TRANSFER );

//! remove a factory from the proxy factories list
/**
* Removes a \a factory from the proxy factories list.
*
* \see insertProxyFactory()
* \see proxyFactories()
*/
void removeProxyFactory( QNetworkProxyFactory *factory SIP_TRANSFERBACK );

//! retrieve proxy factory list
/**
* Returns a list of proxy factories used by the manager.
*
* \see insertProxyFactory()
* \see proxyFactories()
*/
const QList<QNetworkProxyFactory *> proxyFactories() const;

//! retrieve fall back proxy (for urls that no factory returned proxies for)
/**
* Returns the fallback proxy used by the manager.
*
* The fallback proxy is used for URLs which no other proxy factory returned proxies for.
*
* \see proxyFactories()
* \see setFallbackProxyAndExcludes()
*/
const QNetworkProxy &fallbackProxy() const;

//! retrieve exclude list (urls shouldn't use the fallback proxy)
/**
* Returns the proxy exclude list.
*
* This list consists of the beginning of URL strings which will not use the fallback proxy.
*
* \see fallbackProxy()
* \see setFallbackProxyAndExcludes()
*/
QStringList excludeList() const;

//! Sets fallback proxy and URL that shouldn't use it.
/**
* Sets the fallback \a proxy and URLs which shouldn't use it.
*
* The fallback proxy is used for URLs which no other proxy factory returned proxies for.
* The \a excludes list specifies the beginning of URL strings which will not use this fallback proxy.
*
* \see fallbackProxy()
* \see excludeList()
*/
void setFallbackProxyAndExcludes( const QNetworkProxy &proxy, const QStringList &excludes );

//! Gets name for QNetworkRequest::CacheLoadControl
/**
* Returns the name for QNetworkRequest::CacheLoadControl.
*
* \see cacheLoadControlFromName()
*/
static QString cacheLoadControlName( QNetworkRequest::CacheLoadControl control );

//! Gets QNetworkRequest::CacheLoadControl from name
/**
* Returns QNetworkRequest::CacheLoadControl from a \a name.
*
* \see cacheLoadControlName()
*/
static QNetworkRequest::CacheLoadControl cacheLoadControlFromName( const QString &name );

/**
@@ -346,7 +393,9 @@ class CORE_EXPORT QgsNetworkAccessManager : public QNetworkAccessManager
*/
void setupDefaultProxyAndCache( Qt::ConnectionType connectionType = Qt::BlockingQueuedConnection );

//! Returns whether the system proxy should be used
/**
* Returns whether the system proxy should be used.
*/
bool useSystemProxy() const { return mUseSystemProxy; }

signals:

0 comments on commit dcb6104

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