From f0f55cd59f72887e4d80ef5ba752400777458be0 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Fri, 15 Apr 2011 14:09:43 +0100 Subject: Allow a network configuration to be included in a proxy query When Qt is compiled with bearer management support, the network configuration can be included as a parameter in QNetworkProxyQuery. This allows QNetworkProxyFactory::systemProxyForQuery to get the right proxy setting for a specific network. For example a mobile phone could have network configurations for home WLAN, work WLAN and 3G data access points, each with different proxy configurations. Task-number: QTBUG-18618 Reviewed-by: Peter Hartmann --- src/network/kernel/qnetworkproxy.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/network/kernel/qnetworkproxy.h') diff --git a/src/network/kernel/qnetworkproxy.h b/src/network/kernel/qnetworkproxy.h index 26562d533f..e16b29e93a 100644 --- a/src/network/kernel/qnetworkproxy.h +++ b/src/network/kernel/qnetworkproxy.h @@ -54,6 +54,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Network) class QUrl; +class QNetworkConfiguration; class QNetworkProxyQueryPrivate; class Q_NETWORK_EXPORT QNetworkProxyQuery @@ -73,6 +74,16 @@ public: QNetworkProxyQuery(quint16 bindPort, const QString &protocolTag = QString(), QueryType queryType = TcpServer); QNetworkProxyQuery(const QNetworkProxyQuery &other); +#ifndef QT_NO_BEARERMANAGEMENT + QNetworkProxyQuery(const QNetworkConfiguration &networkConfiguration, + const QUrl &requestUrl, QueryType queryType = UrlRequest); + QNetworkProxyQuery(const QNetworkConfiguration &networkConfiguration, + const QString &hostname, int port, const QString &protocolTag = QString(), + QueryType queryType = TcpSocket); + QNetworkProxyQuery(const QNetworkConfiguration &networkConfiguration, + quint16 bindPort, const QString &protocolTag = QString(), + QueryType queryType = TcpServer); +#endif ~QNetworkProxyQuery(); QNetworkProxyQuery &operator=(const QNetworkProxyQuery &other); bool operator==(const QNetworkProxyQuery &other) const; @@ -97,6 +108,11 @@ public: QUrl url() const; void setUrl(const QUrl &url); +#ifndef QT_NO_BEARERMANAGEMENT + QNetworkConfiguration networkConfiguration() const; + void setNetworkConfiguration(const QNetworkConfiguration &networkConfiguration); +#endif + private: QSharedDataPointer d; }; -- cgit v1.2.3