42 #ifndef QNETWORKPROXY_H
43 #define QNETWORKPROXY_H
48 #ifndef QT_NO_NETWORKPROXY
59 class QNetworkProxyQueryPrivate;
71 QNetworkProxyQuery(
const QUrl &requestUrl, QueryType queryType = UrlRequest);
73 QueryType queryType = TcpSocket);
75 QueryType queryType = TcpServer);
76 QNetworkProxyQuery(
const QNetworkProxyQuery &other);
77 #ifndef QT_NO_BEARERMANAGEMENT
78 QNetworkProxyQuery(
const QNetworkConfiguration &networkConfiguration,
79 const QUrl &requestUrl, QueryType queryType = UrlRequest);
80 QNetworkProxyQuery(
const QNetworkConfiguration &networkConfiguration,
82 QueryType queryType = TcpSocket);
83 QNetworkProxyQuery(
const QNetworkConfiguration &networkConfiguration,
85 QueryType queryType = TcpServer);
87 ~QNetworkProxyQuery();
88 QNetworkProxyQuery &operator=(
const QNetworkProxyQuery &other);
89 bool operator==(
const QNetworkProxyQuery &other)
const;
90 inline bool operator!=(
const QNetworkProxyQuery &other)
const
91 {
return !(*
this == other); }
93 QueryType queryType()
const;
94 void setQueryType(QueryType
type);
97 void setPeerPort(
int port);
100 void setPeerHostName(
const QString &hostname);
102 int localPort()
const;
103 void setLocalPort(
int port);
106 void setProtocolTag(
const QString &protocolTag);
109 void setUrl(
const QUrl &url);
111 #ifndef QT_NO_BEARERMANAGEMENT
112 QNetworkConfiguration networkConfiguration()
const;
113 void setNetworkConfiguration(
const QNetworkConfiguration &networkConfiguration);
121 class QNetworkProxyPrivate;
136 TunnelingCapability = 0x0001,
137 ListeningCapability = 0x0002,
138 UdpTunnelingCapability = 0x0004,
139 CachingCapability = 0x0008,
140 HostNameLookupCapability = 0x0010
142 Q_DECLARE_FLAGS(Capabilities, Capability)
146 const QString &user = QString(), const QString &password = QString());
147 QNetworkProxy(const QNetworkProxy &other);
148 QNetworkProxy &operator=(const QNetworkProxy &other);
150 bool operator==(const QNetworkProxy &other) const;
151 inline bool operator!=(const QNetworkProxy &other)
const
152 {
return !(*
this == other); }
157 void setCapabilities(Capabilities capab);
158 Capabilities capabilities()
const;
159 bool isCachingProxy()
const;
160 bool isTransparentProxy()
const;
162 void setUser(
const QString &userName);
165 void setPassword(
const QString &password);
168 void setHostName(
const QString &hostName);
180 Q_DECLARE_OPERATORS_FOR_FLAGS(QNetworkProxy::Capabilities)
185 QNetworkProxyFactory();
186 virtual ~QNetworkProxyFactory();
188 virtual QList<QNetworkProxy> queryProxy(
const QNetworkProxyQuery &query = QNetworkProxyQuery()) = 0;
190 static void setUseSystemConfiguration(
bool enable);
191 static void setApplicationProxyFactory(QNetworkProxyFactory *factory);
193 static QList<QNetworkProxy> systemProxyForQuery(
const QNetworkProxyQuery &query = QNetworkProxyQuery());
200 #endif // QT_NO_NETWORKPROXY
202 #endif // QHOSTINFO_H
GLuint GLuint GLsizei GLenum type
bool operator!=(const QNetworkProxyQuery &other) const
bool operator==(const Attribute &cA, const AttributeInstance< type > &cB)
This operator compares the two attributes and NOT their values.
#define QT_BEGIN_NAMESPACE
Q_DECLARE_TYPEINFO(QNetworkProxyQuery, Q_MOVABLE_TYPE)