~ubuntu-branches/ubuntu/precise/python-qt4/precise-proposed

« back to all changes in this revision

Viewing changes to doc/html/qnetworkproxyquery.html

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell, Jonathan Riddell
  • Date: 2010-11-08 16:13:33 UTC
  • mfrom: (1.5.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20101108161333-0nec4wu0nz3wpf9r
Tags: 4.8.1-0ubuntu1
[ Jonathan Riddell ]
* New upstream release
* Build against python-sip-dev 4.11.2
* Remove kubuntu_02_fix-scpk-and-flag-issue.diff merged upstream
* Install __init__.py into /usr/lib/python3.2/dist-packages/PyQt4,
  fixes Python 3 support
* Add QtDeclarative to python-qt4
* Add kubuntu_03_uiparser.diff from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
td.postheader { font-family: sans-serif }
7
7
tr.address { font-family: sans-serif }
8
8
body { background: #ffffff; color: black; }
9
 
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QNetworkProxyQuery Class Reference<br /><sup><sup>[<a href="qtnetwork.html">QtNetwork</a> module]</sup></sup></h1><p>The QNetworkProxyQuery class is used to query the proxy settings for a socket <a href="#details">More...</a></p>
10
 
<h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a></b> { TcpSocket, UdpSocket, TcpServer, UrlRequest }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qnetworkproxyquery.html#QNetworkProxyQuery">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qnetworkproxyquery.html#QNetworkProxyQuery-2">__init__</a></b> (<i>self</i>, QUrl, QueryType&#160;<i>type</i>&#160;=&#160;QNetworkProxyQuery.UrlRequest)</li><li><div class="fn" /><b><a href="qnetworkproxyquery.html#QNetworkProxyQuery-3">__init__</a></b> (<i>self</i>, QString, int, QString&#160;<i>protocolTag</i>&#160;=&#160;QString(), QueryType&#160;<i>type</i>&#160;=&#160;QNetworkProxyQuery.TcpSocket)</li><li><div class="fn" /><b><a href="qnetworkproxyquery.html#QNetworkProxyQuery-4">__init__</a></b> (<i>self</i>, int, QString&#160;<i>protocolTag</i>&#160;=&#160;QString(), QueryType&#160;<i>type</i>&#160;=&#160;QNetworkProxyQuery.TcpServer)</li><li><div class="fn" /><b><a href="qnetworkproxyquery.html#QNetworkProxyQuery-5">__init__</a></b> (<i>self</i>, QNetworkProxyQuery)</li><li><div class="fn" />int <b><a href="qnetworkproxyquery.html#localPort">localPort</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qnetworkproxyquery.html#peerHostName">peerHostName</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qnetworkproxyquery.html#peerPort">peerPort</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qnetworkproxyquery.html#protocolTag">protocolTag</a></b> (<i>self</i>)</li><li><div class="fn" />QueryType <b><a href="qnetworkproxyquery.html#queryType">queryType</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qnetworkproxyquery.html#setLocalPort">setLocalPort</a></b> (<i>self</i>, int)</li><li><div class="fn" /><b><a href="qnetworkproxyquery.html#setPeerHostName">setPeerHostName</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qnetworkproxyquery.html#setPeerPort">setPeerPort</a></b> (<i>self</i>, int)</li><li><div class="fn" /><b><a href="qnetworkproxyquery.html#setProtocolTag">setProtocolTag</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qnetworkproxyquery.html#setQueryType">setQueryType</a></b> (<i>self</i>, QueryType)</li><li><div class="fn" /><b><a href="qnetworkproxyquery.html#setUrl">setUrl</a></b> (<i>self</i>, QUrl)</li><li><div class="fn" />QUrl <b><a href="qnetworkproxyquery.html#url">url</a></b> (<i>self</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />bool <b><a href="qnetworkproxyquery.html#__eq__">__eq__</a></b> (<i>self</i>, QNetworkProxyQuery)</li><li><div class="fn" />bool <b><a href="qnetworkproxyquery.html#__ne__">__ne__</a></b> (<i>self</i>, QNetworkProxyQuery)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QNetworkProxyQuery class is used to query the proxy settings for a socket</p>
11
 
<p>QNetworkProxyQuery holds the details of a socket being created or request being made. It is used by <a href="qnetworkproxy.html">QNetworkProxy</a> and <a href="qnetworkproxyfactory.html">QNetworkProxyFactory</a> to allow applications to have a more fine-grained control over which proxy servers are used, depending on the details of the query. This allows an application to apply different settings, according to the protocol or destination hostname, for instance.</p>
12
 
<p>QNetworkProxyQuery supports the following criteria for selecting the proxy:</p>
 
9
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QNetworkProxyQuery Class Reference<br /><sup><sup>[<a href="qtnetwork.html">QtNetwork</a> module]</sup></sup></h1><p>The QNetworkProxyQuery class is used to query the proxy settings
 
10
for a socket <a href="#details">More...</a></p>
 
11
 
 
12
<h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a></b> { TcpSocket, UdpSocket, TcpServer, UrlRequest }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qnetworkproxyquery.html#QNetworkProxyQuery">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qnetworkproxyquery.html#QNetworkProxyQuery-2">__init__</a></b> (<i>self</i>, QUrl, QueryType&#160;<i>type</i>&#160;=&#160;QNetworkProxyQuery.UrlRequest)</li><li><div class="fn" /><b><a href="qnetworkproxyquery.html#QNetworkProxyQuery-3">__init__</a></b> (<i>self</i>, QString, int, QString&#160;<i>protocolTag</i>&#160;=&#160;QString(), QueryType&#160;<i>type</i>&#160;=&#160;QNetworkProxyQuery.TcpSocket)</li><li><div class="fn" /><b><a href="qnetworkproxyquery.html#QNetworkProxyQuery-4">__init__</a></b> (<i>self</i>, int, QString&#160;<i>protocolTag</i>&#160;=&#160;QString(), QueryType&#160;<i>type</i>&#160;=&#160;QNetworkProxyQuery.TcpServer)</li><li><div class="fn" /><b><a href="qnetworkproxyquery.html#QNetworkProxyQuery-5">__init__</a></b> (<i>self</i>, QNetworkProxyQuery)</li><li><div class="fn" />int <b><a href="qnetworkproxyquery.html#localPort">localPort</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qnetworkproxyquery.html#peerHostName">peerHostName</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qnetworkproxyquery.html#peerPort">peerPort</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qnetworkproxyquery.html#protocolTag">protocolTag</a></b> (<i>self</i>)</li><li><div class="fn" />QueryType <b><a href="qnetworkproxyquery.html#queryType">queryType</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qnetworkproxyquery.html#setLocalPort">setLocalPort</a></b> (<i>self</i>, int)</li><li><div class="fn" /><b><a href="qnetworkproxyquery.html#setPeerHostName">setPeerHostName</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qnetworkproxyquery.html#setPeerPort">setPeerPort</a></b> (<i>self</i>, int)</li><li><div class="fn" /><b><a href="qnetworkproxyquery.html#setProtocolTag">setProtocolTag</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qnetworkproxyquery.html#setQueryType">setQueryType</a></b> (<i>self</i>, QueryType)</li><li><div class="fn" /><b><a href="qnetworkproxyquery.html#setUrl">setUrl</a></b> (<i>self</i>, QUrl)</li><li><div class="fn" />QUrl <b><a href="qnetworkproxyquery.html#url">url</a></b> (<i>self</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />bool <b><a href="qnetworkproxyquery.html#__eq__">__eq__</a></b> (<i>self</i>, QNetworkProxyQuery)</li><li><div class="fn" />bool <b><a href="qnetworkproxyquery.html#__ne__">__ne__</a></b> (<i>self</i>, QNetworkProxyQuery)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QNetworkProxyQuery class is used to query the proxy settings
 
13
for a socket</p>
 
14
<p>QNetworkProxyQuery holds the details of a socket being created
 
15
or request being made. It is used by <a href="qnetworkproxy.html">QNetworkProxy</a> and <a href="qnetworkproxyfactory.html">QNetworkProxyFactory</a> to allow
 
16
applications to have a more fine-grained control over which proxy
 
17
servers are used, depending on the details of the query. This
 
18
allows an application to apply different settings, according to the
 
19
protocol or destination hostname, for instance.</p>
 
20
<p>QNetworkProxyQuery supports the following criteria for selecting
 
21
the proxy:</p>
13
22
<ul>
14
23
<li>the type of query</li>
15
24
<li>the local port number to use</li>
18
27
<li>the protocol name, such as "http" or "ftp"</li>
19
28
<li>the URL being requested</li>
20
29
</ul>
21
 
<p>The destination host name is the host in the connection in the case of outgoing connection sockets. It is the <tt>hostName</tt> parameter passed to <a href="qabstractsocket.html#connectToHost">QTcpSocket.connectToHost</a>() or the host component of a URL requested with <a href="qnetworkrequest.html">QNetworkRequest</a>.</p>
22
 
<p>The destination port number is the requested port to connect to in the case of outgoing sockets, while the local port number is the port the socket wishes to use locally before attempting the external connection. In most cases, the local port number is used by listening sockets only (<a href="qtcpsocket.html">QTcpSocket</a>) or by datagram sockets (<a href="qudpsocket.html">QUdpSocket</a>).</p>
23
 
<p>The protocol name is an arbitrary string that indicates the type of connection being attempted. For example, it can match the scheme of a URL, like "http", "https" and "ftp". In most cases, the proxy selection will not change depending on the protocol, but this information is provided in case a better choice can be made, like choosing an caching HTTP proxy for HTTP-based connections, but a more powerful SOCKSv5 proxy for all others.</p>
24
 
<p>Some of the criteria may not make sense in all of the types of query. The following table lists the criteria that are most commonly used, according to the type of query.</p>
25
 
<p><table align="center" border="0" cellpadding="2" cellspacing="1" class="generic">
26
 
<thead><tr class="qt-style" valign="top"><th>Query type</th><th>Description</th></tr></thead>
27
 
<tr class="odd" valign="top"><td><a href="qnetworkproxyquery.html#QueryType-enum">TcpSocket</a></td><td>Normal sockets requesting a connection to a remote server, like <a href="qtcpsocket.html">QTcpSocket</a>. The peer hostname and peer port match the values passed to <a href="qabstractsocket.html#connectToHost">QTcpSocket.connectToHost</a>(). The local port is usually -1, indicating the socket has no preference in which port should be used. The URL component is not used.</td></tr>
28
 
<tr class="even" valign="top"><td><a href="qnetworkproxyquery.html#QueryType-enum">UdpSocket</a></td><td>Datagram-based sockets, which can both send and receive. The local port, remote host or remote port fields can all be used or be left unused, depending on the characteristics of the socket. The URL component is not used.</td></tr>
29
 
<tr class="odd" valign="top"><td><a href="qnetworkproxyquery.html#QueryType-enum">TcpServer</a></td><td>Passive server sockets that listen on a port and await incoming connections from the network. Normally, only the local port is used, but the remote address could be used in specific circumstances, for example to indicate which remote host a connection is expected from. The URL component is not used.</td></tr>
30
 
<tr class="even" valign="top"><td><a href="qnetworkproxyquery.html#QueryType-enum">UrlRequest</a></td><td>A more high-level request, such as those coming from <a href="qnetworkaccessmanager.html">QNetworkAccessManager</a>. These requests will inevitably use an outgoing TCP socket, but the this query type is provided to indicate that more detailed information is present in the URL component. For ease of implementation, the URL's host and port are set as the destination address.</td></tr>
31
 
</table></p>
32
 
<p>It should be noted that any of the criteria may be missing or unknown (an empty <a href="qstring.html">QString</a> for the hostname or protocol name, -1 for the port numbers). If that happens, the functions executing the query should make their best guess or apply some implementation-defined default values.</p>
33
 
<p>See also <a href="qnetworkproxy.html">QNetworkProxy</a>, <a href="qnetworkproxyfactory.html">QNetworkProxyFactory</a>, <a href="qnetworkaccessmanager.html">QNetworkAccessManager</a>, and <a href="qabstractsocket.html#setProxy">QAbstractSocket.setProxy</a>().</p>
 
30
<p>The destination host name is the host in the connection in the
 
31
case of outgoing connection sockets. It is the <tt>hostName</tt>
 
32
parameter passed to <a href="qabstractsocket.html#connectToHost">QTcpSocket.connectToHost</a>()
 
33
or the host component of a URL requested with <a href="qnetworkrequest.html">QNetworkRequest</a>.</p>
 
34
<p>The destination port number is the requested port to connect to
 
35
in the case of outgoing sockets, while the local port number is the
 
36
port the socket wishes to use locally before attempting the
 
37
external connection. In most cases, the local port number is used
 
38
by listening sockets only (<a href="qtcpsocket.html">QTcpSocket</a>) or by datagram sockets (<a href="qudpsocket.html">QUdpSocket</a>).</p>
 
39
<p>The protocol name is an arbitrary string that indicates the type
 
40
of connection being attempted. For example, it can match the scheme
 
41
of a URL, like "http", "https" and "ftp". In most cases, the proxy
 
42
selection will not change depending on the protocol, but this
 
43
information is provided in case a better choice can be made, like
 
44
choosing an caching HTTP proxy for HTTP-based connections, but a
 
45
more powerful SOCKSv5 proxy for all others.</p>
 
46
<p>Some of the criteria may not make sense in all of the types of
 
47
query. The following table lists the criteria that are most
 
48
commonly used, according to the type of query.</p>
 
49
<table class="generic">
 
50
<thead>
 
51
<tr class="qt-style topAlign">
 
52
<th>Query type</th>
 
53
<th>Description</th>
 
54
</tr>
 
55
</thead>
 
56
<tr class="odd topAlign">
 
57
<td>
 
58
<p><a href="qnetworkproxyquery.html#QueryType-enum">TcpSocket</a></p>
 
59
</td>
 
60
<td>
 
61
<p>Normal sockets requesting a connection to a remote server, like
 
62
<a href="qtcpsocket.html">QTcpSocket</a>. The peer hostname and
 
63
peer port match the values passed to <a href="qabstractsocket.html#connectToHost">QTcpSocket.connectToHost</a>().
 
64
The local port is usually -1, indicating the socket has no
 
65
preference in which port should be used. The URL component is not
 
66
used.</p>
 
67
</td>
 
68
</tr>
 
69
<tr class="even topAlign">
 
70
<td>
 
71
<p><a href="qnetworkproxyquery.html#QueryType-enum">UdpSocket</a></p>
 
72
</td>
 
73
<td>
 
74
<p>Datagram-based sockets, which can both send and receive. The
 
75
local port, remote host or remote port fields can all be used or be
 
76
left unused, depending on the characteristics of the socket. The
 
77
URL component is not used.</p>
 
78
</td>
 
79
</tr>
 
80
<tr class="odd topAlign">
 
81
<td>
 
82
<p><a href="qnetworkproxyquery.html#QueryType-enum">TcpServer</a></p>
 
83
</td>
 
84
<td>
 
85
<p>Passive server sockets that listen on a port and await incoming
 
86
connections from the network. Normally, only the local port is
 
87
used, but the remote address could be used in specific
 
88
circumstances, for example to indicate which remote host a
 
89
connection is expected from. The URL component is not used.</p>
 
90
</td>
 
91
</tr>
 
92
<tr class="even topAlign">
 
93
<td>
 
94
<p><a href="qnetworkproxyquery.html#QueryType-enum">UrlRequest</a></p>
 
95
</td>
 
96
<td>
 
97
<p>A more high-level request, such as those coming from <a href="qnetworkaccessmanager.html">QNetworkAccessManager</a>. These
 
98
requests will inevitably use an outgoing TCP socket, but the this
 
99
query type is provided to indicate that more detailed information
 
100
is present in the URL component. For ease of implementation, the
 
101
URL's host and port are set as the destination address.</p>
 
102
</td>
 
103
</tr>
 
104
</table>
 
105
<p>It should be noted that any of the criteria may be missing or
 
106
unknown (an empty <a href="qstring.html">QString</a> for the
 
107
hostname or protocol name, -1 for the port numbers). If that
 
108
happens, the functions executing the query should make their best
 
109
guess or apply some implementation-defined default values.</p>
34
110
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="QueryType-enum" />QNetworkProxyQuery.QueryType</h3><p>Describes the type of one <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> query.</p>
35
 
<p><table border="1" cellpadding="2" cellspacing="1" class="valuelist" width="100%">
36
 
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
37
 
<tr><td valign="top"><tt>QNetworkProxyQuery.TcpSocket</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">a normal, outgoing TCP socket</td></tr>
38
 
<tr><td valign="top"><tt>QNetworkProxyQuery.UdpSocket</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">a datagram-based UDP socket, which could send to multiple destinations</td></tr>
39
 
<tr><td valign="top"><tt>QNetworkProxyQuery.TcpServer</tt></td><td align="center" valign="top"><tt>100</tt></td><td valign="top">a TCP server that listens for incoming connections from the network</td></tr>
40
 
<tr><td valign="top"><tt>QNetworkProxyQuery.UrlRequest</tt></td><td align="center" valign="top"><tt>101</tt></td><td valign="top">a more complex request which involves loading of a URL</td></tr>
41
 
</table></p>
 
111
<table class="valuelist">
 
112
<tr class="odd">
 
113
<td />
 
114
</tr>
 
115
<tr>
 
116
<th class="tblConst">Constant</th>
 
117
<th class="tblval">Value</th>
 
118
<th class="tbldscr">Description</th>
 
119
</tr>
 
120
<tr>
 
121
<td class="topAlign"><tt>QNetworkProxyQuery.TcpSocket</tt></td>
 
122
<td class=" topAlign"><tt>0</tt></td>
 
123
<td class="topAlign">a normal, outgoing TCP socket</td>
 
124
</tr>
 
125
<tr>
 
126
<td class="topAlign"><tt>QNetworkProxyQuery.UdpSocket</tt></td>
 
127
<td class=" topAlign"><tt>1</tt></td>
 
128
<td class="topAlign">a datagram-based UDP socket, which could send
 
129
to multiple destinations</td>
 
130
</tr>
 
131
<tr>
 
132
<td class="topAlign"><tt>QNetworkProxyQuery.TcpServer</tt></td>
 
133
<td class=" topAlign"><tt>100</tt></td>
 
134
<td class="topAlign">a TCP server that listens for incoming
 
135
connections from the network</td>
 
136
</tr>
 
137
<tr>
 
138
<td class="topAlign"><tt>QNetworkProxyQuery.UrlRequest</tt></td>
 
139
<td class=" topAlign"><tt>101</tt></td>
 
140
<td class="topAlign">a more complex request which involves loading
 
141
of a URL</td>
 
142
</tr>
 
143
</table>
42
144
<p>See also <a href="qnetworkproxyquery.html#queryType">queryType</a>() and <a href="qnetworkproxyquery.html#setQueryType">setQueryType</a>().</p>
43
 
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QNetworkProxyQuery" />QNetworkProxyQuery.__init__ (<i>self</i>)</h3><p>Constructs a default <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object. By default, the query type will be <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpSocket</a>.</p>
44
 
<h3 class="fn"><a name="QNetworkProxyQuery-2" />QNetworkProxyQuery.__init__ (<i>self</i>, <a href="qurl.html">QUrl</a>, <a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a>&#160;<i>type</i>&#160;=&#160;QNetworkProxyQuery.UrlRequest)</h3><p>Constructs a <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> with the URL <i>requestUrl</i> and sets the query type to <i>queryType</i>.</p>
45
 
<p>See also <a href="qnetworkproxyquery.html#protocolTag">protocolTag</a>(), <a href="qnetworkproxyquery.html#peerHostName">peerHostName</a>(), and <a href="qnetworkproxyquery.html#peerPort">peerPort</a>().</p>
46
 
<h3 class="fn"><a name="QNetworkProxyQuery-3" />QNetworkProxyQuery.__init__ (<i>self</i>, QString, int, QString&#160;<i>protocolTag</i>&#160;=&#160;QString(), <a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a>&#160;<i>type</i>&#160;=&#160;QNetworkProxyQuery.TcpSocket)</h3><p>Constructs a <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> of type <i>queryType</i> and sets the protocol tag to be <i>protocolTag</i>. This constructor is suitable for <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpSocket</a> queries, because it sets the peer hostname to <i>hostname</i> and the peer's port number to <i>port</i>.</p>
47
 
<h3 class="fn"><a name="QNetworkProxyQuery-4" />QNetworkProxyQuery.__init__ (<i>self</i>, int, QString&#160;<i>protocolTag</i>&#160;=&#160;QString(), <a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a>&#160;<i>type</i>&#160;=&#160;QNetworkProxyQuery.TcpServer)</h3><p>Constructs a <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> of type <i>queryType</i> and sets the protocol tag to be <i>protocolTag</i>. This constructor is suitable for <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpSocket</a> queries because it sets the local port number to <i>bindPort</i>.</p>
48
 
<p>Note that <i>bindPort</i> is of type quint16 to indicate the exact port number that is requested. The value of -1 (unknown) is not allowed in this context.</p>
 
145
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QNetworkProxyQuery" />QNetworkProxyQuery.__init__ (<i>self</i>)</h3><p>Constructs a default <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object. By
 
146
default, the query type will be <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpSocket</a>.</p>
 
147
 
 
148
 
 
149
<h3 class="fn"><a name="QNetworkProxyQuery-2" />QNetworkProxyQuery.__init__ (<i>self</i>, <a href="qurl.html">QUrl</a>, <a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a>&#160;<i>type</i>&#160;=&#160;QNetworkProxyQuery.UrlRequest)</h3><p>Constructs a <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> with the URL
 
150
<i>requestUrl</i> and sets the query type to <i>queryType</i>.</p>
 
151
<p>See also <a href="qnetworkproxyquery.html#protocolTag">protocolTag</a>(), <a href="qnetworkproxyquery.html#peerHostName">peerHostName</a>(), and
 
152
<a href="qnetworkproxyquery.html#peerPort">peerPort</a>().</p>
 
153
 
 
154
 
 
155
<h3 class="fn"><a name="QNetworkProxyQuery-3" />QNetworkProxyQuery.__init__ (<i>self</i>, QString, int, QString&#160;<i>protocolTag</i>&#160;=&#160;QString(), <a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a>&#160;<i>type</i>&#160;=&#160;QNetworkProxyQuery.TcpSocket)</h3><p>Constructs a <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> of type
 
156
<i>queryType</i> and sets the protocol tag to be
 
157
<i>protocolTag</i>. This constructor is suitable for <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpSocket</a>
 
158
queries, because it sets the peer hostname to <i>hostname</i> and
 
159
the peer's port number to <i>port</i>.</p>
 
160
 
 
161
 
 
162
<h3 class="fn"><a name="QNetworkProxyQuery-4" />QNetworkProxyQuery.__init__ (<i>self</i>, int, QString&#160;<i>protocolTag</i>&#160;=&#160;QString(), <a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a>&#160;<i>type</i>&#160;=&#160;QNetworkProxyQuery.TcpServer)</h3><p>Constructs a <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> of type
 
163
<i>queryType</i> and sets the protocol tag to be
 
164
<i>protocolTag</i>. This constructor is suitable for <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpSocket</a>
 
165
queries because it sets the local port number to
 
166
<i>bindPort</i>.</p>
 
167
<p>Note that <i>bindPort</i> is of type quint16 to indicate the
 
168
exact port number that is requested. The value of -1 (unknown) is
 
169
not allowed in this context.</p>
49
170
<p>See also <a href="qnetworkproxyquery.html#localPort">localPort</a>().</p>
50
 
<h3 class="fn"><a name="QNetworkProxyQuery-5" />QNetworkProxyQuery.__init__ (<i>self</i>, <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a>)</h3><p>Constructs a <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object that is a copy of <i>other</i>.</p>
51
 
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/~QNetworkProxyQuery" />
52
 
<h3 class="fn"><a name="localPort" />int QNetworkProxyQuery.localPort (<i>self</i>)</h3><p>Returns the port number of the socket that will accept incoming packets from remote servers or -1 if the port is not known.</p>
53
 
<p>See also <a href="qnetworkproxyquery.html#peerPort">peerPort</a>(), <a href="qnetworkproxyquery.html#peerHostName">peerHostName</a>(), and <a href="qnetworkproxyquery.html#setLocalPort">setLocalPort</a>().</p>
54
 
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/peerHostName" />
55
 
<h3 class="fn"><a name="peerHostName" />QString QNetworkProxyQuery.peerHostName (<i>self</i>)</h3><p>Returns the host name or IP address being of the outgoing connection being requested, or an empty string if the remote hostname is not known.</p>
56
 
<p>If the query type is <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UrlRequest</a>, this function returns the host component of the URL being requested.</p>
 
171
 
 
172
 
 
173
<h3 class="fn"><a name="QNetworkProxyQuery-5" />QNetworkProxyQuery.__init__ (<i>self</i>, <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a>)</h3><p>Constructs a <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object that is a
 
174
copy of <i>other</i>.</p>
 
175
 
 
176
 
 
177
<h3 class="fn"><a name="localPort" />int QNetworkProxyQuery.localPort (<i>self</i>)</h3><p>Returns the port number of the socket that will accept incoming
 
178
packets from remote servers or -1 if the port is not known.</p>
 
179
<p>See also <a href="qnetworkproxyquery.html#peerPort">peerPort</a>(), <a href="qnetworkproxyquery.html#peerHostName">peerHostName</a>(), and
 
180
<a href="qnetworkproxyquery.html#setLocalPort">setLocalPort</a>().</p>
 
181
 
 
182
 
 
183
<h3 class="fn"><a name="peerHostName" />QString QNetworkProxyQuery.peerHostName (<i>self</i>)</h3><p>Returns the host name or IP address being of the outgoing
 
184
connection being requested, or an empty string if the remote
 
185
hostname is not known.</p>
 
186
<p>If the query type is <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UrlRequest</a>,
 
187
this function returns the host component of the URL being
 
188
requested.</p>
57
189
<p>See also <a href="qnetworkproxyquery.html#peerPort">peerPort</a>(), <a href="qnetworkproxyquery.html#localPort">localPort</a>(), and <a href="qnetworkproxyquery.html#setPeerHostName">setPeerHostName</a>().</p>
58
 
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/peerPort" />
59
 
<h3 class="fn"><a name="peerPort" />int QNetworkProxyQuery.peerPort (<i>self</i>)</h3><p>Returns the port number for the outgoing request or -1 if the port number is not known.</p>
60
 
<p>If the query type is <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UrlRequest</a>, this function returns the port number of the URL being requested. In general, frameworks will fill in the port number from their default values.</p>
 
190
 
 
191
 
 
192
<h3 class="fn"><a name="peerPort" />int QNetworkProxyQuery.peerPort (<i>self</i>)</h3><p>Returns the port number for the outgoing request or -1 if the
 
193
port number is not known.</p>
 
194
<p>If the query type is <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UrlRequest</a>,
 
195
this function returns the port number of the URL being requested.
 
196
In general, frameworks will fill in the port number from their
 
197
default values.</p>
61
198
<p>See also <a href="qnetworkproxyquery.html#peerHostName">peerHostName</a>(), <a href="qnetworkproxyquery.html#localPort">localPort</a>(), and <a href="qnetworkproxyquery.html#setPeerPort">setPeerPort</a>().</p>
62
 
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/protocolTag" />
63
 
<h3 class="fn"><a name="protocolTag" />QString QNetworkProxyQuery.protocolTag (<i>self</i>)</h3><p>Returns the protocol tag for this <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object, or an empty <a href="qstring.html">QString</a> in case the protocol tag is unknown.</p>
64
 
<p>In the case of queries of type <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UrlRequest</a>, this function returns the value of the scheme component of the URL.</p>
65
 
<p>See also <a href="qnetworkproxyquery.html#setProtocolTag">setProtocolTag</a>() and <a href="qnetworkproxyquery.html#url">url</a>().</p>
66
 
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/queryType" />
 
199
 
 
200
 
 
201
<h3 class="fn"><a name="protocolTag" />QString QNetworkProxyQuery.protocolTag (<i>self</i>)</h3><p>Returns the protocol tag for this <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object, or an
 
202
empty <a href="qstring.html">QString</a> in case the protocol tag
 
203
is unknown.</p>
 
204
<p>In the case of queries of type <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UrlRequest</a>,
 
205
this function returns the value of the scheme component of the
 
206
URL.</p>
 
207
<p>See also <a href="qnetworkproxyquery.html#setProtocolTag">setProtocolTag</a>() and
 
208
<a href="qnetworkproxyquery.html#url">url</a>().</p>
 
209
 
 
210
 
67
211
<h3 class="fn"><a name="queryType" /><a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a> QNetworkProxyQuery.queryType (<i>self</i>)</h3><p>Returns the query type.</p>
68
212
<p>See also <a href="qnetworkproxyquery.html#setQueryType">setQueryType</a>().</p>
69
 
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/setLocalPort" />
70
 
<h3 class="fn"><a name="setLocalPort" />QNetworkProxyQuery.setLocalPort (<i>self</i>, int)</h3><p>Sets the port number that the socket wishes to use locally to accept incoming packets from remote servers to <i>port</i>. The local port is most often used with the <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpServer</a> and <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UdpSocket</a> query types.</p>
71
 
<p>Valid values are 0 to 65535 (with 0 indicating that any port number will be acceptable) or -1, which means the local port number is unknown or not applicable.</p>
72
 
<p>In some circumstances, for special protocols, it's the local port number can also be used with a query of type <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpSocket</a>. When that happens, the socket is indicating it wishes to use the port number <i>port</i> when connecting to a remote host.</p>
73
 
<p>See also <a href="qnetworkproxyquery.html#localPort">localPort</a>(), <a href="qnetworkproxyquery.html#setPeerPort">setPeerPort</a>(), and <a href="qnetworkproxyquery.html#setPeerHostName">setPeerHostName</a>().</p>
74
 
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/setPeerHostName" />
75
 
<h3 class="fn"><a name="setPeerHostName" />QNetworkProxyQuery.setPeerHostName (<i>self</i>, QString)</h3><p>Sets the hostname of the outgoing connection being requested to <i>hostname</i>. An empty hostname can be used to indicate that the remote host is unknown.</p>
76
 
<p>The peer host name can also be used to indicate the expected source address of an incoming connection in the case of <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UdpSocket</a> or <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpServer</a> query types.</p>
77
 
<p>See also <a href="qnetworkproxyquery.html#peerHostName">peerHostName</a>(), <a href="qnetworkproxyquery.html#setPeerPort">setPeerPort</a>(), and <a href="qnetworkproxyquery.html#setLocalPort">setLocalPort</a>().</p>
78
 
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/setPeerPort" />
79
 
<h3 class="fn"><a name="setPeerPort" />QNetworkProxyQuery.setPeerPort (<i>self</i>, int)</h3><p>Sets the requested port number for the outgoing connection to be <i>port</i>. Valid values are 1 to 65535, or -1 to indicate that the remote port number is unknown.</p>
80
 
<p>The peer port number can also be used to indicate the expected port number of an incoming connection in the case of <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UdpSocket</a> or <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpServer</a> query types.</p>
81
 
<p>See also <a href="qnetworkproxyquery.html#peerPort">peerPort</a>(), <a href="qnetworkproxyquery.html#setPeerHostName">setPeerHostName</a>(), and <a href="qnetworkproxyquery.html#setLocalPort">setLocalPort</a>().</p>
82
 
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/setProtocolTag" />
83
 
<h3 class="fn"><a name="setProtocolTag" />QNetworkProxyQuery.setProtocolTag (<i>self</i>, QString)</h3><p>Sets the protocol tag for this <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object to be <i>protocolTag</i>.</p>
84
 
<p>The protocol tag is an arbitrary string that indicates which protocol is being talked over the socket, such as "http", "xmpp", "telnet", etc. The protocol tag is used by the backend to return a request that is more specific to the protocol in question: for example, a HTTP connection could be use a caching HTTP proxy server, while all other connections use a more powerful SOCKSv5 proxy server.</p>
 
213
 
 
214
 
 
215
<h3 class="fn"><a name="setLocalPort" />QNetworkProxyQuery.setLocalPort (<i>self</i>, int)</h3><p>Sets the port number that the socket wishes to use locally to
 
216
accept incoming packets from remote servers to <i>port</i>. The
 
217
local port is most often used with the <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpServer</a>
 
218
and <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UdpSocket</a>
 
219
query types.</p>
 
220
<p>Valid values are 0 to 65535 (with 0 indicating that any port
 
221
number will be acceptable) or -1, which means the local port number
 
222
is unknown or not applicable.</p>
 
223
<p>In some circumstances, for special protocols, it's the local
 
224
port number can also be used with a query of type <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpSocket</a>.
 
225
When that happens, the socket is indicating it wishes to use the
 
226
port number <i>port</i> when connecting to a remote host.</p>
 
227
<p>See also <a href="qnetworkproxyquery.html#localPort">localPort</a>(), <a href="qnetworkproxyquery.html#setPeerPort">setPeerPort</a>(), and
 
228
<a href="qnetworkproxyquery.html#setPeerHostName">setPeerHostName</a>().</p>
 
229
 
 
230
 
 
231
<h3 class="fn"><a name="setPeerHostName" />QNetworkProxyQuery.setPeerHostName (<i>self</i>, QString)</h3><p>Sets the hostname of the outgoing connection being requested to
 
232
<i>hostname</i>. An empty hostname can be used to indicate that the
 
233
remote host is unknown.</p>
 
234
<p>The peer host name can also be used to indicate the expected
 
235
source address of an incoming connection in the case of <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UdpSocket</a>
 
236
or <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpServer</a>
 
237
query types.</p>
 
238
<p>See also <a href="qnetworkproxyquery.html#peerHostName">peerHostName</a>(), <a href="qnetworkproxyquery.html#setPeerPort">setPeerPort</a>(), and
 
239
<a href="qnetworkproxyquery.html#setLocalPort">setLocalPort</a>().</p>
 
240
 
 
241
 
 
242
<h3 class="fn"><a name="setPeerPort" />QNetworkProxyQuery.setPeerPort (<i>self</i>, int)</h3><p>Sets the requested port number for the outgoing connection to be
 
243
<i>port</i>. Valid values are 1 to 65535, or -1 to indicate that
 
244
the remote port number is unknown.</p>
 
245
<p>The peer port number can also be used to indicate the expected
 
246
port number of an incoming connection in the case of <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UdpSocket</a>
 
247
or <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.TcpServer</a>
 
248
query types.</p>
 
249
<p>See also <a href="qnetworkproxyquery.html#peerPort">peerPort</a>(), <a href="qnetworkproxyquery.html#setPeerHostName">setPeerHostName</a>(),
 
250
and <a href="qnetworkproxyquery.html#setLocalPort">setLocalPort</a>().</p>
 
251
 
 
252
 
 
253
<h3 class="fn"><a name="setProtocolTag" />QNetworkProxyQuery.setProtocolTag (<i>self</i>, QString)</h3><p>Sets the protocol tag for this <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object to be
 
254
<i>protocolTag</i>.</p>
 
255
<p>The protocol tag is an arbitrary string that indicates which
 
256
protocol is being talked over the socket, such as "http", "xmpp",
 
257
"telnet", etc. The protocol tag is used by the backend to return a
 
258
request that is more specific to the protocol in question: for
 
259
example, a HTTP connection could be use a caching HTTP proxy
 
260
server, while all other connections use a more powerful SOCKSv5
 
261
proxy server.</p>
85
262
<p>See also <a href="qnetworkproxyquery.html#protocolTag">protocolTag</a>().</p>
86
 
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/setQueryType" />
 
263
 
 
264
 
87
265
<h3 class="fn"><a name="setQueryType" />QNetworkProxyQuery.setQueryType (<i>self</i>, <a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a>)</h3><p>Sets the query type of this object to be <i>type</i>.</p>
88
266
<p>See also <a href="qnetworkproxyquery.html#queryType">queryType</a>().</p>
89
 
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/setUrl" />
90
 
<h3 class="fn"><a name="setUrl" />QNetworkProxyQuery.setUrl (<i>self</i>, <a href="qurl.html">QUrl</a>)</h3><p>Sets the URL component of this <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object to be <i>url</i>. Setting the URL will also set the protocol tag, the remote host name and port number. This is done so as to facilitate the implementation of the code that determines the proxy server to be used.</p>
91
 
<p>See also <a href="qnetworkproxyquery.html#url">url</a>(), <a href="qnetworkproxyquery.html#peerHostName">peerHostName</a>(), and <a href="qnetworkproxyquery.html#peerPort">peerPort</a>().</p>
92
 
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/url" />
93
 
<h3 class="fn"><a name="url" /><a href="qurl.html">QUrl</a> QNetworkProxyQuery.url (<i>self</i>)</h3><p>Returns the URL component of this <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object in case of a query of type <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UrlRequest</a>.</p>
 
267
 
 
268
 
 
269
<h3 class="fn"><a name="setUrl" />QNetworkProxyQuery.setUrl (<i>self</i>, <a href="qurl.html">QUrl</a>)</h3><p>Sets the URL component of this <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object to be
 
270
<i>url</i>. Setting the URL will also set the protocol tag, the
 
271
remote host name and port number. This is done so as to facilitate
 
272
the implementation of the code that determines the proxy server to
 
273
be used.</p>
 
274
<p>See also <a href="qnetworkproxyquery.html#url">url</a>(),
 
275
<a href="qnetworkproxyquery.html#peerHostName">peerHostName</a>(),
 
276
and <a href="qnetworkproxyquery.html#peerPort">peerPort</a>().</p>
 
277
 
 
278
 
 
279
<h3 class="fn"><a name="url" /><a href="qurl.html">QUrl</a> QNetworkProxyQuery.url (<i>self</i>)</h3><p>Returns the URL component of this <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object in case of
 
280
a query of type <a href="qnetworkproxyquery.html#QueryType-enum">QNetworkProxyQuery.UrlRequest</a>.</p>
94
281
<p>See also <a href="qnetworkproxyquery.html#setUrl">setUrl</a>().</p>
95
 
<a name="//apple_ref/cpp/instm/QNetworkProxyQuery/operator!=" />
96
 
<h3 class="fn"><a name="__eq__" />bool QNetworkProxyQuery.__eq__ (<i>self</i>, <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a>)</h3><h3 class="fn"><a name="__ne__" />bool QNetworkProxyQuery.__ne__ (<i>self</i>, <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.7.7 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt&#160;4.6.3</td></tr></table></div></address></body></html>
 
 
b'\\ No newline at end of file'
 
282
 
 
283
 
 
284
<h3 class="fn"><a name="__eq__" />bool QNetworkProxyQuery.__eq__ (<i>self</i>, <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a>)</h3><h3 class="fn"><a name="__ne__" />bool QNetworkProxyQuery.__ne__ (<i>self</i>, <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.8.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt&#160;4.7.0</td></tr></table></div></address></body></html>
 
 
b'\\ No newline at end of file'