Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 6073

qt-doc-4.8.5-10.fc18.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qnetworkproxy.cpp -->
  <title>Qt 4.8: QNetworkProxyQuery Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtnetwork.html">QtNetwork</a></li>
<li>QNetworkProxyQuery</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QNetworkProxyQuery Class Reference</h1>
<!-- $$$QNetworkProxyQuery-brief -->
<p>The QNetworkProxyQuery class is used to query the proxy settings for a socket <a href="#details">More...</a></p>
<!-- @@@QNetworkProxyQuery -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QNetworkProxyQuery&gt;</span></pre><p>This class was introduced in Qt 4.5.</p>
<ul>
<li><a href="qnetworkproxyquery-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a></b> { TcpSocket, UdpSocket, TcpServer, UrlRequest }</td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#QNetworkProxyQuery">QNetworkProxyQuery</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#QNetworkProxyQuery-2">QNetworkProxyQuery</a></b> ( const QUrl &amp; <i>requestUrl</i>, QueryType <i>queryType</i> = UrlRequest )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#QNetworkProxyQuery-3">QNetworkProxyQuery</a></b> ( const QString &amp; <i>hostname</i>, int <i>port</i>, const QString &amp; <i>protocolTag</i> = QString(), QueryType <i>queryType</i> = TcpSocket )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#QNetworkProxyQuery-4">QNetworkProxyQuery</a></b> ( quint16 <i>bindPort</i>, const QString &amp; <i>protocolTag</i> = QString(), QueryType <i>queryType</i> = TcpServer )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#QNetworkProxyQuery-5">QNetworkProxyQuery</a></b> ( const QNetworkProxyQuery &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#QNetworkProxyQuery-6">QNetworkProxyQuery</a></b> ( const QNetworkConfiguration &amp; <i>networkConfiguration</i>, const QUrl &amp; <i>requestUrl</i>, QueryType <i>queryType</i> = UrlRequest )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#QNetworkProxyQuery-7">QNetworkProxyQuery</a></b> ( const QNetworkConfiguration &amp; <i>networkConfiguration</i>, const QString &amp; <i>hostname</i>, int <i>port</i>, const QString &amp; <i>protocolTag</i> = QString(), QueryType <i>queryType</i> = TcpSocket )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#QNetworkProxyQuery-8">QNetworkProxyQuery</a></b> ( const QNetworkConfiguration &amp; <i>networkConfiguration</i>, quint16 <i>bindPort</i>, const QString &amp; <i>protocolTag</i> = QString(), QueryType <i>queryType</i> = TcpServer )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#dtor.QNetworkProxyQuery">~QNetworkProxyQuery</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#localPort">localPort</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QNetworkConfiguration </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#networkConfiguration">networkConfiguration</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#peerHostName">peerHostName</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#peerPort">peerPort</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#protocolTag">protocolTag</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QueryType </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#queryType">queryType</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#setLocalPort">setLocalPort</a></b> ( int <i>port</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#setNetworkConfiguration">setNetworkConfiguration</a></b> ( const QNetworkConfiguration &amp; <i>networkConfiguration</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#setPeerHostName">setPeerHostName</a></b> ( const QString &amp; <i>hostname</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#setPeerPort">setPeerPort</a></b> ( int <i>port</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#setProtocolTag">setProtocolTag</a></b> ( const QString &amp; <i>protocolTag</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#setQueryType">setQueryType</a></b> ( QueryType <i>type</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#setUrl">setUrl</a></b> ( const QUrl &amp; <i>url</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QUrl </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#url">url</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#operator-not-eq">operator!=</a></b> ( const QNetworkProxyQuery &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QNetworkProxyQuery &amp; </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#operator-eq">operator=</a></b> ( const QNetworkProxyQuery &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qnetworkproxyquery.html#operator-eq-eq">operator==</a></b> ( const QNetworkProxyQuery &amp; <i>other</i> ) const</td></tr>
</table>
<a name="details"></a>
<!-- $$$QNetworkProxyQuery-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QNetworkProxyQuery class is used to query the proxy settings for a socket</p>
<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>
<p>QNetworkProxyQuery supports the following criteria for selecting the proxy:</p>
<ul>
<li>the type of query</li>
<li>the local port number to use</li>
<li>the destination host name</li>
<li>the destination port number</li>
<li>the protocol name, such as &quot;http&quot; or &quot;ftp&quot;</li>
<li>the URL being requested</li>
</ul>
<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>
<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>
<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 &quot;http&quot;, &quot;https&quot; and &quot;ftp&quot;. 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>
<p>The network configuration specifies which configuration to use, when bearer management is used. For example on a mobile phone the proxy settings are likely to be different for the cellular network vs WLAN.</p>
<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>
<table class="generic">
<thead><tr class="qt-style"><th >Query type</th><th >Description</th></tr></thead>
<tr valign="top" class="odd"><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>
<tr valign="top" class="even"><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>
<tr valign="top" class="odd"><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>
<tr valign="top" class="even"><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>
</table>
<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>
</div>
<p><b>See also </b><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>
<!-- @@@QNetworkProxyQuery -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$QueryType$$$TcpSocket$$$UdpSocket$$$TcpServer$$$UrlRequest -->
<h3 class="fn"><a name="QueryType-enum"></a>enum QNetworkProxyQuery::<span class="name">QueryType</span></h3>
<p>Describes the type of one <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> query.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QNetworkProxyQuery::TcpSocket</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">a normal, outgoing TCP socket</td></tr>
<tr><td class="topAlign"><tt>QNetworkProxyQuery::UdpSocket</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">a datagram-based UDP socket, which could send to multiple destinations</td></tr>
<tr><td class="topAlign"><tt>QNetworkProxyQuery::TcpServer</tt></td><td class="topAlign"><tt>100</tt></td><td class="topAlign">a TCP server that listens for incoming connections from the network</td></tr>
<tr><td class="topAlign"><tt>QNetworkProxyQuery::UrlRequest</tt></td><td class="topAlign"><tt>101</tt></td><td class="topAlign">a more complex request which involves loading of a URL</td></tr>
</table>
<p><b>See also </b><a href="qnetworkproxyquery.html#queryType">queryType</a>() and <a href="qnetworkproxyquery.html#setQueryType">setQueryType</a>().</p>
<!-- @@@QueryType -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QNetworkProxyQuery[overload1]$$$QNetworkProxyQuery -->
<h3 class="fn"><a name="QNetworkProxyQuery"></a>QNetworkProxyQuery::<span class="name">QNetworkProxyQuery</span> ()</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>
<!-- @@@QNetworkProxyQuery -->
<!-- $$$QNetworkProxyQuery$$$QNetworkProxyQueryconstQUrl&QueryType -->
<h3 class="fn"><a name="QNetworkProxyQuery-2"></a>QNetworkProxyQuery::<span class="name">QNetworkProxyQuery</span> ( const <span class="type"><a href="qurl.html">QUrl</a></span> &amp; <i>requestUrl</i>, <span class="type"><a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a></span> <i>queryType</i> = 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>
<p><b>See also </b><a href="qnetworkproxyquery.html#protocolTag">protocolTag</a>(), <a href="qnetworkproxyquery.html#peerHostName">peerHostName</a>(), and <a href="qnetworkproxyquery.html#peerPort">peerPort</a>().</p>
<!-- @@@QNetworkProxyQuery -->
<!-- $$$QNetworkProxyQuery$$$QNetworkProxyQueryconstQString&intconstQString&QueryType -->
<h3 class="fn"><a name="QNetworkProxyQuery-3"></a>QNetworkProxyQuery::<span class="name">QNetworkProxyQuery</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>hostname</i>, <span class="type">int</span> <i>port</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>protocolTag</i> = QString(), <span class="type"><a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a></span> <i>queryType</i> = 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>
<!-- @@@QNetworkProxyQuery -->
<!-- $$$QNetworkProxyQuery$$$QNetworkProxyQueryquint16constQString&QueryType -->
<h3 class="fn"><a name="QNetworkProxyQuery-4"></a>QNetworkProxyQuery::<span class="name">QNetworkProxyQuery</span> ( <span class="type"><a href="qtglobal.html#quint16-typedef">quint16</a></span> <i>bindPort</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>protocolTag</i> = QString(), <span class="type"><a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a></span> <i>queryType</i> = 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>
<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>
<p><b>See also </b><a href="qnetworkproxyquery.html#localPort">localPort</a>().</p>
<!-- @@@QNetworkProxyQuery -->
<!-- $$$QNetworkProxyQuery$$$QNetworkProxyQueryconstQNetworkProxyQuery& -->
<h3 class="fn"><a name="QNetworkProxyQuery-5"></a>QNetworkProxyQuery::<span class="name">QNetworkProxyQuery</span> ( const <span class="type">QNetworkProxyQuery</span> &amp; <i>other</i> )</h3>
<p>Constructs a <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object that is a copy of <i>other</i>.</p>
<!-- @@@QNetworkProxyQuery -->
<!-- $$$QNetworkProxyQuery$$$QNetworkProxyQueryconstQNetworkConfiguration&constQUrl&QueryType -->
<h3 class="fn"><a name="QNetworkProxyQuery-6"></a>QNetworkProxyQuery::<span class="name">QNetworkProxyQuery</span> ( const <span class="type"><a href="qnetworkconfiguration.html">QNetworkConfiguration</a></span> &amp; <i>networkConfiguration</i>, const <span class="type"><a href="qurl.html">QUrl</a></span> &amp; <i>requestUrl</i>, <span class="type"><a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a></span> <i>queryType</i> = 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>. The specified <i>networkConfiguration</i> is used to resolve the proxy settings.</p>
<p>This function was introduced in Qt 4.8.</p>
<p><b>See also </b><a href="qnetworkproxyquery.html#protocolTag">protocolTag</a>(), <a href="qnetworkproxyquery.html#peerHostName">peerHostName</a>(), <a href="qnetworkproxyquery.html#peerPort">peerPort</a>(), and <a href="qnetworkproxyquery.html#networkConfiguration">networkConfiguration</a>().</p>
<!-- @@@QNetworkProxyQuery -->
<!-- $$$QNetworkProxyQuery$$$QNetworkProxyQueryconstQNetworkConfiguration&constQString&intconstQString&QueryType -->
<h3 class="fn"><a name="QNetworkProxyQuery-7"></a>QNetworkProxyQuery::<span class="name">QNetworkProxyQuery</span> ( const <span class="type"><a href="qnetworkconfiguration.html">QNetworkConfiguration</a></span> &amp; <i>networkConfiguration</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>hostname</i>, <span class="type">int</span> <i>port</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>protocolTag</i> = QString(), <span class="type"><a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a></span> <i>queryType</i> = 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>. The specified <i>networkConfiguration</i> is used to resolve the proxy settings.</p>
<p>This function was introduced in Qt 4.8.</p>
<p><b>See also </b><a href="qnetworkproxyquery.html#networkConfiguration">networkConfiguration</a>().</p>
<!-- @@@QNetworkProxyQuery -->
<!-- $$$QNetworkProxyQuery$$$QNetworkProxyQueryconstQNetworkConfiguration&quint16constQString&QueryType -->
<h3 class="fn"><a name="QNetworkProxyQuery-8"></a>QNetworkProxyQuery::<span class="name">QNetworkProxyQuery</span> ( const <span class="type"><a href="qnetworkconfiguration.html">QNetworkConfiguration</a></span> &amp; <i>networkConfiguration</i>, <span class="type"><a href="qtglobal.html#quint16-typedef">quint16</a></span> <i>bindPort</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>protocolTag</i> = QString(), <span class="type"><a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a></span> <i>queryType</i> = 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>. The specified <i>networkConfiguration</i> is used to resolve the proxy settings.</p>
<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>
<p>This function was introduced in Qt 4.8.</p>
<p><b>See also </b><a href="qnetworkproxyquery.html#localPort">localPort</a>() and <a href="qnetworkproxyquery.html#networkConfiguration">networkConfiguration</a>().</p>
<!-- @@@QNetworkProxyQuery -->
<!-- $$$~QNetworkProxyQuery[overload1]$$$~QNetworkProxyQuery -->
<h3 class="fn"><a name="dtor.QNetworkProxyQuery"></a>QNetworkProxyQuery::<span class="name">~QNetworkProxyQuery</span> ()</h3>
<p>Destroys this <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object.</p>
<!-- @@@~QNetworkProxyQuery -->
<!-- $$$localPort[overload1]$$$localPort -->
<h3 class="fn"><a name="localPort"></a><span class="type">int</span> QNetworkProxyQuery::<span class="name">localPort</span> () const</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>
<p><b>See also </b><a href="qnetworkproxyquery.html#peerPort">peerPort</a>(), <a href="qnetworkproxyquery.html#peerHostName">peerHostName</a>(), and <a href="qnetworkproxyquery.html#setLocalPort">setLocalPort</a>().</p>
<!-- @@@localPort -->
<!-- $$$networkConfiguration[overload1]$$$networkConfiguration -->
<h3 class="fn"><a name="networkConfiguration"></a><span class="type"><a href="qnetworkconfiguration.html">QNetworkConfiguration</a></span> QNetworkProxyQuery::<span class="name">networkConfiguration</span> () const</h3>
<p>Returns the network configuration of the proxy query.</p>
<p><b>See also </b><a href="qnetworkproxyquery.html#setNetworkConfiguration">setNetworkConfiguration</a>().</p>
<!-- @@@networkConfiguration -->
<!-- $$$peerHostName[overload1]$$$peerHostName -->
<h3 class="fn"><a name="peerHostName"></a><span class="type"><a href="qstring.html">QString</a></span> QNetworkProxyQuery::<span class="name">peerHostName</span> () const</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>
<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>
<p><b>See also </b><a href="qnetworkproxyquery.html#peerPort">peerPort</a>(), <a href="qnetworkproxyquery.html#localPort">localPort</a>(), and <a href="qnetworkproxyquery.html#setPeerHostName">setPeerHostName</a>().</p>
<!-- @@@peerHostName -->
<!-- $$$peerPort[overload1]$$$peerPort -->
<h3 class="fn"><a name="peerPort"></a><span class="type">int</span> QNetworkProxyQuery::<span class="name">peerPort</span> () const</h3>
<p>Returns the port number for the outgoing request or -1 if the port number is not known.</p>
<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>
<p><b>See also </b><a href="qnetworkproxyquery.html#peerHostName">peerHostName</a>(), <a href="qnetworkproxyquery.html#localPort">localPort</a>(), and <a href="qnetworkproxyquery.html#setPeerPort">setPeerPort</a>().</p>
<!-- @@@peerPort -->
<!-- $$$protocolTag[overload1]$$$protocolTag -->
<h3 class="fn"><a name="protocolTag"></a><span class="type"><a href="qstring.html">QString</a></span> QNetworkProxyQuery::<span class="name">protocolTag</span> () const</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>
<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>
<p><b>See also </b><a href="qnetworkproxyquery.html#setProtocolTag">setProtocolTag</a>() and <a href="qnetworkproxyquery.html#url">url</a>().</p>
<!-- @@@protocolTag -->
<!-- $$$queryType[overload1]$$$queryType -->
<h3 class="fn"><a name="queryType"></a><span class="type"><a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a></span> QNetworkProxyQuery::<span class="name">queryType</span> () const</h3>
<p>Returns the query type.</p>
<p><b>See also </b><a href="qnetworkproxyquery.html#setQueryType">setQueryType</a>().</p>
<!-- @@@queryType -->
<!-- $$$setLocalPort[overload1]$$$setLocalPortint -->
<h3 class="fn"><a name="setLocalPort"></a><span class="type">void</span> QNetworkProxyQuery::<span class="name">setLocalPort</span> ( <span class="type">int</span> <i>port</i> )</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>
<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>
<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>
<p><b>See also </b><a href="qnetworkproxyquery.html#localPort">localPort</a>(), <a href="qnetworkproxyquery.html#setPeerPort">setPeerPort</a>(), and <a href="qnetworkproxyquery.html#setPeerHostName">setPeerHostName</a>().</p>
<!-- @@@setLocalPort -->
<!-- $$$setNetworkConfiguration[overload1]$$$setNetworkConfigurationconstQNetworkConfiguration& -->
<h3 class="fn"><a name="setNetworkConfiguration"></a><span class="type">void</span> QNetworkProxyQuery::<span class="name">setNetworkConfiguration</span> ( const <span class="type"><a href="qnetworkconfiguration.html">QNetworkConfiguration</a></span> &amp; <i>networkConfiguration</i> )</h3>
<p>Sets the network configuration component of this <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object to be <i>networkConfiguration</i>. The network configuration can be used to return different proxy settings based on the network in use, for example WLAN vs cellular networks on a mobile phone.</p>
<p>In the case of &quot;user choice&quot; or &quot;service network&quot; configurations, you should first start the <a href="qnetworksession.html">QNetworkSession</a> and obtain the active configuration from its properties.</p>
<p>This function was introduced in Qt 4.8.</p>
<p><b>See also </b><a href="qnetworkproxyquery.html#networkConfiguration">networkConfiguration</a>().</p>
<!-- @@@setNetworkConfiguration -->
<!-- $$$setPeerHostName[overload1]$$$setPeerHostNameconstQString& -->
<h3 class="fn"><a name="setPeerHostName"></a><span class="type">void</span> QNetworkProxyQuery::<span class="name">setPeerHostName</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>hostname</i> )</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>
<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>
<p><b>See also </b><a href="qnetworkproxyquery.html#peerHostName">peerHostName</a>(), <a href="qnetworkproxyquery.html#setPeerPort">setPeerPort</a>(), and <a href="qnetworkproxyquery.html#setLocalPort">setLocalPort</a>().</p>
<!-- @@@setPeerHostName -->
<!-- $$$setPeerPort[overload1]$$$setPeerPortint -->
<h3 class="fn"><a name="setPeerPort"></a><span class="type">void</span> QNetworkProxyQuery::<span class="name">setPeerPort</span> ( <span class="type">int</span> <i>port</i> )</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>
<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>
<p><b>See also </b><a href="qnetworkproxyquery.html#peerPort">peerPort</a>(), <a href="qnetworkproxyquery.html#setPeerHostName">setPeerHostName</a>(), and <a href="qnetworkproxyquery.html#setLocalPort">setLocalPort</a>().</p>
<!-- @@@setPeerPort -->
<!-- $$$setProtocolTag[overload1]$$$setProtocolTagconstQString& -->
<h3 class="fn"><a name="setProtocolTag"></a><span class="type">void</span> QNetworkProxyQuery::<span class="name">setProtocolTag</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>protocolTag</i> )</h3>
<p>Sets the protocol tag for this <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object to be <i>protocolTag</i>.</p>
<p>The protocol tag is an arbitrary string that indicates which protocol is being talked over the socket, such as &quot;http&quot;, &quot;xmpp&quot;, &quot;telnet&quot;, 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>
<p><b>See also </b><a href="qnetworkproxyquery.html#protocolTag">protocolTag</a>().</p>
<!-- @@@setProtocolTag -->
<!-- $$$setQueryType[overload1]$$$setQueryTypeQueryType -->
<h3 class="fn"><a name="setQueryType"></a><span class="type">void</span> QNetworkProxyQuery::<span class="name">setQueryType</span> ( <span class="type"><a href="qnetworkproxyquery.html#QueryType-enum">QueryType</a></span> <i>type</i> )</h3>
<p>Sets the query type of this object to be <i>type</i>.</p>
<p><b>See also </b><a href="qnetworkproxyquery.html#queryType">queryType</a>().</p>
<!-- @@@setQueryType -->
<!-- $$$setUrl[overload1]$$$setUrlconstQUrl& -->
<h3 class="fn"><a name="setUrl"></a><span class="type">void</span> QNetworkProxyQuery::<span class="name">setUrl</span> ( const <span class="type"><a href="qurl.html">QUrl</a></span> &amp; <i>url</i> )</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>
<p><b>See also </b><a href="qnetworkproxyquery.html#url">url</a>(), <a href="qnetworkproxyquery.html#peerHostName">peerHostName</a>(), and <a href="qnetworkproxyquery.html#peerPort">peerPort</a>().</p>
<!-- @@@setUrl -->
<!-- $$$url[overload1]$$$url -->
<h3 class="fn"><a name="url"></a><span class="type"><a href="qurl.html">QUrl</a></span> QNetworkProxyQuery::<span class="name">url</span> () const</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>
<p><b>See also </b><a href="qnetworkproxyquery.html#setUrl">setUrl</a>().</p>
<!-- @@@url -->
<!-- $$$operator!=[overload1]$$$operator!=constQNetworkProxyQuery& -->
<h3 class="fn"><a name="operator-not-eq"></a><span class="type">bool</span> QNetworkProxyQuery::<span class="name">operator!=</span> ( const <span class="type">QNetworkProxyQuery</span> &amp; <i>other</i> ) const</h3>
<p>Returns true if this <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object does not contain the same data as <i>other</i>.</p>
<!-- @@@operator!= -->
<!-- $$$operator=[overload1]$$$operator=constQNetworkProxyQuery& -->
<h3 class="fn"><a name="operator-eq"></a><span class="type">QNetworkProxyQuery</span> &amp; QNetworkProxyQuery::<span class="name">operator=</span> ( const <span class="type">QNetworkProxyQuery</span> &amp; <i>other</i> )</h3>
<p>Copies the contents of <i>other</i>.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQNetworkProxyQuery& -->
<h3 class="fn"><a name="operator-eq-eq"></a><span class="type">bool</span> QNetworkProxyQuery::<span class="name">operator==</span> ( const <span class="type">QNetworkProxyQuery</span> &amp; <i>other</i> ) const</h3>
<p>Returns true if this <a href="qnetworkproxyquery.html">QNetworkProxyQuery</a> object contains the same data as <i>other</i>.</p>
<!-- @@@operator== -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>