Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 4522

qt4-doc-4.8.7-26.2.mga7.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" />
<!-- q3dns.cpp -->
  <title>Qt 4.8: Q3Dns 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="qt3support.html">Qt3Support</a></li>
<li>Q3Dns</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="#signals">Signals</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">Q3Dns Class Reference</h1>
<!-- $$$Q3Dns-brief -->
<p>The Q3Dns class provides asynchronous DNS lookups. <a href="#details">More...</a></p>
<!-- @@@Q3Dns -->
<pre class="cpp"> <span class="preprocessor">#include &lt;Q3Dns&gt;</span></pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See <a href="porting4.html#qdns">Porting to Qt 4</a> for more information.</p>
<p><b>Inherits: </b><a href="qobject.html">QObject</a>.</p>
<ul>
<li><a href="q3dns-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"> class </td><td class="memItemRight bottomAlign"><b><a href="q3dns-mailserver.html">MailServer</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> class </td><td class="memItemRight bottomAlign"><b><a href="q3dns-server.html">Server</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="q3dns.html#RecordType-enum">RecordType</a></b> { None, A, Aaaa, Mx, ..., Txt }</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="q3dns.html#Q3Dns">Q3Dns</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3dns.html#Q3Dns-2">Q3Dns</a></b> ( const QString &amp; <i>label</i>, RecordType <i>rr</i> = A )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3dns.html#Q3Dns-3">Q3Dns</a></b> ( const QHostAddress &amp; <i>address</i>, RecordType <i>rr</i> = Ptr )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="q3dns.html#dtor.Q3Dns">~Q3Dns</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ValueList&lt;QHostAddress&gt; </td><td class="memItemRight bottomAlign"><b><a href="q3dns.html#addresses">addresses</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="q3dns.html#canonicalName">canonicalName</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="q3dns.html#hostNames">hostNames</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3dns.html#isWorking">isWorking</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="q3dns.html#label">label</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ValueList&lt;MailServer&gt; </td><td class="memItemRight bottomAlign"><b><a href="q3dns.html#mailServers">mailServers</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="q3dns.html#qualifiedNames">qualifiedNames</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> RecordType </td><td class="memItemRight bottomAlign"><b><a href="q3dns.html#recordType">recordType</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ValueList&lt;Server&gt; </td><td class="memItemRight bottomAlign"><b><a href="q3dns.html#servers">servers</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3dns.html#setLabel">setLabel</a></b> ( const QString &amp; <i>label</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3dns.html#setLabel-2">setLabel</a></b> ( const QHostAddress &amp; <i>address</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3dns.html#setRecordType">setRecordType</a></b> ( RecordType <i>rr</i> = A )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="q3dns.html#texts">texts</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3dns.html#resultsReady">resultsReady</a></b> ()</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$Q3Dns-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The Q3Dns class provides asynchronous DNS lookups.</p>
<p>Both Windows and Unix provide synchronous DNS lookups; Windows provides some asynchronous support too. At the time of writing neither operating system provides asynchronous support for anything other than hostname-to-address mapping.</p>
<p>Q3Dns rectifies this shortcoming, by providing asynchronous caching lookups for the record types that we expect modern GUI applications to need in the near future.</p>
<p>The class is <i>not</i> straightforward to use (although it is much simpler than the native APIs); <a href="q3socket.html">Q3Socket</a> provides much easier to use TCP connection facilities. The aim of Q3Dns is to provide a correct and small API to the DNS and nothing more. (We use &quot;correctness&quot; to mean that the DNS information is correctly cached, and correctly timed out.)</p>
<p>The API comprises a constructor, functions to set the DNS node (the domain in DNS terminology) and record type (<a href="q3dns.html#setLabel">setLabel</a>() and <a href="q3dns.html#setRecordType">setRecordType</a>()), the corresponding get functions, an <a href="q3dns.html#isWorking">isWorking</a>() function to determine whether Q3Dns is working or reading, a <a href="q3dns.html#resultsReady">resultsReady</a>() signal and query functions for the result.</p>
<p>There is one query function for each <a href="q3dns.html#RecordType-enum">RecordType</a>, namely <a href="q3dns.html#addresses">addresses</a>(), <a href="q3dns.html#mailServers">mailServers</a>(), <a href="q3dns.html#servers">servers</a>(), <a href="q3dns.html#hostNames">hostNames</a>() and <a href="q3dns.html#texts">texts</a>(). There are also two generic query functions: <a href="q3dns.html#canonicalName">canonicalName</a>() returns the name you'll presumably end up using (the exact meaning of this depends on the record type) and <a href="q3dns.html#qualifiedNames">qualifiedNames</a>() returns a list of the fully qualified names <a href="q3dns.html#label">label</a>() maps to.</p>
</div>
<p><b>See also </b><a href="q3socket.html">Q3Socket</a>.</p>
<!-- @@@Q3Dns -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$RecordType$$$None$$$A$$$Aaaa$$$Mx$$$Srv$$$Cname$$$Ptr$$$Txt -->
<h3 class="fn"><a name="RecordType-enum"></a>enum Q3Dns::<span class="name">RecordType</span></h3>
<p>This enum type defines the record types <a href="q3dns.html" class="compat">Q3Dns</a> can handle. The DNS provides many more; these are the ones we've judged to be in current use, useful for GUI programs and important enough to support right away:</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>Q3Dns::None</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">No information. This exists only so that <a href="q3dns.html" class="compat">Q3Dns</a> can have a default.</td></tr>
<tr><td class="topAlign"><tt>Q3Dns::A</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">IPv4 addresses. By far the most common type.</td></tr>
<tr><td class="topAlign"><tt>Q3Dns::Aaaa</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">IPv6 addresses. So far mostly unused.</td></tr>
<tr><td class="topAlign"><tt>Q3Dns::Mx</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">Mail eXchanger names. Used for mail delivery.</td></tr>
<tr><td class="topAlign"><tt>Q3Dns::Srv</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">SeRVer names. Generic record type for finding servers. So far mostly unused.</td></tr>
<tr><td class="topAlign"><tt>Q3Dns::Cname</tt></td><td class="topAlign"><tt>5</tt></td><td class="topAlign">Canonical names. Maps from nicknames to the true name (the canonical name) for a host.</td></tr>
<tr><td class="topAlign"><tt>Q3Dns::Ptr</tt></td><td class="topAlign"><tt>6</tt></td><td class="topAlign">name PoinTeRs. Maps from IPv4 or IPv6 addresses to hostnames.</td></tr>
<tr><td class="topAlign"><tt>Q3Dns::Txt</tt></td><td class="topAlign"><tt>7</tt></td><td class="topAlign">arbitrary TeXT for domains.</td></tr>
</table>
<p>We expect that some support for the <a href="http://www.rfc-editor.org/rfc/rfc2535.txt">RFC 2535</a> extensions will be added in future versions.</p>
<!-- @@@RecordType -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$Q3Dns[overload1]$$$Q3Dns -->
<h3 class="fn"><a name="Q3Dns"></a>Q3Dns::<span class="name">Q3Dns</span> ()</h3>
<p>Constructs a DNS query object with invalid settings for both the label and the search type.</p>
<!-- @@@Q3Dns -->
<!-- $$$Q3Dns$$$Q3DnsconstQString&RecordType -->
<h3 class="fn"><a name="Q3Dns-2"></a>Q3Dns::<span class="name">Q3Dns</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label</i>, <span class="type"><a href="q3dns.html#RecordType-enum">RecordType</a></span> <i>rr</i> = A )</h3>
<p>Constructs a DNS query object that will return record type <i>rr</i> information about <i>label</i>.</p>
<p>The DNS lookup is started the next time the application enters the event loop. When the result is found the signal <a href="q3dns.html#resultsReady">resultsReady</a>() is emitted.</p>
<p><i>rr</i> defaults to <tt>A</tt>, IPv4 addresses.</p>
<!-- @@@Q3Dns -->
<!-- $$$Q3Dns$$$Q3DnsconstQHostAddress&RecordType -->
<h3 class="fn"><a name="Q3Dns-3"></a>Q3Dns::<span class="name">Q3Dns</span> ( const <span class="type"><a href="qhostaddress.html">QHostAddress</a></span> &amp; <i>address</i>, <span class="type"><a href="q3dns.html#RecordType-enum">RecordType</a></span> <i>rr</i> = Ptr )</h3>
<p>Constructs a DNS query object that will return record type <i>rr</i> information about host address <i>address</i>. The label is set to the IN-ADDR.ARPA domain name. This is useful in combination with the <tt>Ptr</tt> record type (e.g&#x2e; if you want to look up a hostname for a given address).</p>
<p>The DNS lookup is started the next time the application enters the event loop. When the result is found the signal <a href="q3dns.html#resultsReady">resultsReady</a>() is emitted.</p>
<p><i>rr</i> defaults to <tt>Ptr</tt>, that maps addresses to hostnames.</p>
<!-- @@@Q3Dns -->
<!-- $$$~Q3Dns[overload1]$$$~Q3Dns -->
<h3 class="fn"><a name="dtor.Q3Dns"></a>Q3Dns::<span class="name">~Q3Dns</span> ()<tt> [virtual]</tt></h3>
<p>Destroys the DNS query object and frees its allocated resources.</p>
<!-- @@@~Q3Dns -->
<!-- $$$addresses[overload1]$$$addresses -->
<h3 class="fn"><a name="addresses"></a><span class="type"><a href="q3valuelist.html">Q3ValueList</a></span>&lt;<span class="type"><a href="qhostaddress.html">QHostAddress</a></span>&gt; Q3Dns::<span class="name">addresses</span> () const</h3>
<p>Returns a list of the addresses for this name if this <a href="q3dns.html" class="compat">Q3Dns</a> object has a <a href="q3dns.html#recordType">recordType</a>() of <a href="q3dns.html#RecordType-enum">Q3Dns::A</a> or <a href="q3dns.html#RecordType-enum">Q3Dns::Aaaa</a> and the answer is available; otherwise returns an empty list.</p>
<p>As a special case, if <a href="q3dns.html#label">label</a>() is a valid numeric IP address, this function returns that address.</p>
<p>Note that if you want to iterate over the list, you should iterate over a copy, e.g&#x2e;</p>
<pre class="cpp"> <span class="type"><a href="q3valuelist.html">Q3ValueList</a></span><span class="operator">&lt;</span><span class="type"><a href="qhostaddress.html">QHostAddress</a></span><span class="operator">&gt;</span> list <span class="operator">=</span> myDns<span class="operator">.</span>addresses();
 <span class="type"><a href="q3valuelist.html">Q3ValueList</a></span><span class="operator">&lt;</span><span class="type"><a href="qhostaddress.html">QHostAddress</a></span><span class="operator">&gt;</span><span class="operator">::</span>Iterator it <span class="operator">=</span> list<span class="operator">.</span>begin();
 <span class="keyword">while</span>( it <span class="operator">!</span><span class="operator">=</span> list<span class="operator">.</span>end() ) {
     myProcessing( <span class="operator">*</span>it );
     <span class="operator">+</span><span class="operator">+</span>it;
 }</pre>
<!-- @@@addresses -->
<!-- $$$canonicalName[overload1]$$$canonicalName -->
<h3 class="fn"><a name="canonicalName"></a><span class="type"><a href="qstring.html">QString</a></span> Q3Dns::<span class="name">canonicalName</span> () const</h3>
<p>Returns the canonical name for this DNS node. (This works regardless of what <a href="q3dns.html#recordType">recordType</a>() is set to.)</p>
<p>If the canonical name isn't known, this function returns a null string.</p>
<p>The canonical name of a DNS node is its full name, or the full name of the target of its CNAME. For example, if l.trolltech.com is a CNAME to lillian.troll.no, and the search path for <a href="q3dns.html" class="compat">Q3Dns</a> is &quot;trolltech.com&quot;, then the canonical name for all of &quot;lillian&quot;, &quot;l&quot;, &quot;lillian.troll.no.&quot; and &quot;l.trolltech.com&quot; is &quot;lillian.troll.no.&quot;&#x2e;</p>
<!-- @@@canonicalName -->
<!-- $$$hostNames[overload1]$$$hostNames -->
<h3 class="fn"><a name="hostNames"></a><span class="type"><a href="qstringlist.html">QStringList</a></span> Q3Dns::<span class="name">hostNames</span> () const</h3>
<p>Returns a list of host names if the record type is <tt>Ptr</tt>.</p>
<p>Note that if you want to iterate over the list, you should iterate over a copy, e.g&#x2e;</p>
<pre class="cpp"> <span class="type"><a href="qstringlist.html">QStringList</a></span> list <span class="operator">=</span> myDns<span class="operator">.</span>hostNames();
 <span class="type"><a href="qstringlist.html">QStringList</a></span><span class="operator">::</span>Iterator it <span class="operator">=</span> list<span class="operator">.</span>begin();
 <span class="keyword">while</span>( it <span class="operator">!</span><span class="operator">=</span> list<span class="operator">.</span>end() ) {
     myProcessing( <span class="operator">*</span>it );
     <span class="operator">+</span><span class="operator">+</span>it;
 }</pre>
<!-- @@@hostNames -->
<!-- $$$isWorking[overload1]$$$isWorking -->
<h3 class="fn"><a name="isWorking"></a><span class="type">bool</span> Q3Dns::<span class="name">isWorking</span> () const</h3>
<p>Returns true if <a href="q3dns.html" class="compat">Q3Dns</a> is doing a lookup for this object (i.e&#x2e; if it does not already have the necessary information); otherwise returns false.</p>
<p><a href="q3dns.html" class="compat">Q3Dns</a> emits the <a href="q3dns.html#resultsReady">resultsReady</a>() signal when the status changes to false.</p>
<!-- @@@isWorking -->
<!-- $$$label[overload1]$$$label -->
<h3 class="fn"><a name="label"></a><span class="type"><a href="qstring.html">QString</a></span> Q3Dns::<span class="name">label</span> () const</h3>
<p>Returns the domain name for which this object returns information.</p>
<p><b>See also </b><a href="q3dns.html#setLabel">setLabel</a>().</p>
<!-- @@@label -->
<!-- $$$mailServers[overload1]$$$mailServers -->
<h3 class="fn"><a name="mailServers"></a><span class="type"><a href="q3valuelist.html">Q3ValueList</a></span>&lt;<span class="type"><a href="q3dns-mailserver.html">MailServer</a></span>&gt; Q3Dns::<span class="name">mailServers</span> () const</h3>
<p>Returns a list of mail servers if the record type is <tt>Mx</tt>. The class <a href="q3dns-mailserver.html">Q3Dns::MailServer</a> contains the following public variables:</p>
<ul>
<li><a href="qstring.html">QString</a> <a href="q3dns-mailserver.html#name-var">Q3Dns::MailServer::name</a></li>
<li><a href="qtglobal-qt3.html#Q_UINT16-typedef" class="compat">Q_UINT16</a> <a href="q3dns-mailserver.html#priority-var">Q3Dns::MailServer::priority</a></li>
</ul>
<p>Note that if you want to iterate over the list, you should iterate over a copy, e.g&#x2e;</p>
<pre class="cpp"> <span class="type"><a href="q3valuelist.html">Q3ValueList</a></span><span class="operator">&lt;</span><span class="type"><a href="q3dns.html">Q3Dns</a></span><span class="operator">::</span>MailServer<span class="operator">&gt;</span> list <span class="operator">=</span> myDns<span class="operator">.</span>mailServers();
 <span class="type"><a href="q3valuelist.html">Q3ValueList</a></span><span class="operator">&lt;</span><span class="type"><a href="q3dns.html">Q3Dns</a></span><span class="operator">::</span>MailServer<span class="operator">&gt;</span><span class="operator">::</span>Iterator it <span class="operator">=</span> list<span class="operator">.</span>begin();
 <span class="keyword">while</span>( it <span class="operator">!</span><span class="operator">=</span> list<span class="operator">.</span>end() ) {
     myProcessing( <span class="operator">*</span>it );
     <span class="operator">+</span><span class="operator">+</span>it;
 }</pre>
<!-- @@@mailServers -->
<!-- $$$qualifiedNames[overload1]$$$qualifiedNames -->
<h3 class="fn"><a name="qualifiedNames"></a><span class="type"><a href="qstringlist.html">QStringList</a></span> Q3Dns::<span class="name">qualifiedNames</span> () const</h3>
<p>Returns a list of the fully qualified names <a href="q3dns.html#label">label</a>() maps to.</p>
<p>Note that if you want to iterate over the list, you should iterate over a copy, e.g&#x2e;</p>
<pre class="cpp"> <span class="type"><a href="qstringlist.html">QStringList</a></span> list <span class="operator">=</span> myDns<span class="operator">.</span>qualifiedNames();
 <span class="type"><a href="qstringlist.html">QStringList</a></span><span class="operator">::</span>Iterator it <span class="operator">=</span> list<span class="operator">.</span>begin();
 <span class="keyword">while</span>( it <span class="operator">!</span><span class="operator">=</span> list<span class="operator">.</span>end() ) {
     myProcessing( <span class="operator">*</span>it );
     <span class="operator">+</span><span class="operator">+</span>it;
 }</pre>
<!-- @@@qualifiedNames -->
<!-- $$$recordType[overload1]$$$recordType -->
<h3 class="fn"><a name="recordType"></a><span class="type"><a href="q3dns.html#RecordType-enum">RecordType</a></span> Q3Dns::<span class="name">recordType</span> () const</h3>
<p>Returns the record type of this DNS query object.</p>
<p><b>See also </b><a href="q3dns.html#setRecordType">setRecordType</a>() and <a href="q3dns.html#RecordType-enum">RecordType</a>.</p>
<!-- @@@recordType -->
<!-- $$$resultsReady[overload1]$$$resultsReady -->
<h3 class="fn"><a name="resultsReady"></a><span class="type">void</span> Q3Dns::<span class="name">resultsReady</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted when results are available for one of the <a href="q3dns.html#qualifiedNames">qualifiedNames</a>().</p>
<!-- @@@resultsReady -->
<!-- $$$servers[overload1]$$$servers -->
<h3 class="fn"><a name="servers"></a><span class="type"><a href="q3valuelist.html">Q3ValueList</a></span>&lt;<span class="type"><a href="q3dns-server.html">Server</a></span>&gt; Q3Dns::<span class="name">servers</span> () const</h3>
<p>Returns a list of servers if the record type is <tt>Srv</tt>. The class <a href="q3dns-server.html">Q3Dns::Server</a> contains the following public variables:</p>
<ul>
<li><a href="qstring.html">QString</a> <a href="q3dns-server.html#name-var">Q3Dns::Server::name</a></li>
<li><a href="qtglobal-qt3.html#Q_UINT16-typedef" class="compat">Q_UINT16</a> <a href="q3dns-server.html#priority-var">Q3Dns::Server::priority</a></li>
<li><a href="qtglobal-qt3.html#Q_UINT16-typedef" class="compat">Q_UINT16</a> <a href="q3dns-server.html#weight-var">Q3Dns::Server::weight</a></li>
<li><a href="qtglobal-qt3.html#Q_UINT16-typedef" class="compat">Q_UINT16</a> <a href="q3dns-server.html#port-var">Q3Dns::Server::port</a></li>
</ul>
<p>Note that if you want to iterate over the list, you should iterate over a copy, e.g&#x2e;</p>
<pre class="cpp"> <span class="type"><a href="q3valuelist.html">Q3ValueList</a></span><span class="operator">&lt;</span><span class="type"><a href="q3dns.html">Q3Dns</a></span><span class="operator">::</span>Server<span class="operator">&gt;</span> list <span class="operator">=</span> myDns<span class="operator">.</span>servers();
 <span class="type"><a href="q3valuelist.html">Q3ValueList</a></span><span class="operator">&lt;</span><span class="type"><a href="q3dns.html">Q3Dns</a></span><span class="operator">::</span>Server<span class="operator">&gt;</span><span class="operator">::</span>Iterator it <span class="operator">=</span> list<span class="operator">.</span>begin();
 <span class="keyword">while</span>( it <span class="operator">!</span><span class="operator">=</span> list<span class="operator">.</span>end() ) {
     myProcessing( <span class="operator">*</span>it );
     <span class="operator">+</span><span class="operator">+</span>it;
 }</pre>
<!-- @@@servers -->
<!-- $$$setLabel[overload1]$$$setLabelconstQString& -->
<h3 class="fn"><a name="setLabel"></a><span class="type">void</span> Q3Dns::<span class="name">setLabel</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label</i> )<tt> [virtual]</tt></h3>
<p>Sets this DNS query object to query for information about <i>label</i>.</p>
<p>This does not change the <a href="q3dns.html#recordType">recordType</a>(), but its <a href="q3dns.html#isWorking">isWorking</a>() status will probably change as a result.</p>
<p>The DNS lookup is started the next time the application enters the event loop. When the result is found the signal <a href="q3dns.html#resultsReady">resultsReady</a>() is emitted.</p>
<p><b>See also </b><a href="q3dns.html#label">label</a>().</p>
<!-- @@@setLabel -->
<!-- $$$setLabel$$$setLabelconstQHostAddress& -->
<h3 class="fn"><a name="setLabel-2"></a><span class="type">void</span> Q3Dns::<span class="name">setLabel</span> ( const <span class="type"><a href="qhostaddress.html">QHostAddress</a></span> &amp; <i>address</i> )<tt> [virtual]</tt></h3>
<p>This is an overloaded function.</p>
<p>Sets this DNS query object to query for information about the host address <i>address</i>. The label is set to the IN-ADDR.ARPA domain name. This is useful in combination with the <tt>Ptr</tt> record type (e.g&#x2e; if you want to look up a hostname for a given address).</p>
<!-- @@@setLabel -->
<!-- $$$setRecordType[overload1]$$$setRecordTypeRecordType -->
<h3 class="fn"><a name="setRecordType"></a><span class="type">void</span> Q3Dns::<span class="name">setRecordType</span> ( <span class="type"><a href="q3dns.html#RecordType-enum">RecordType</a></span> <i>rr</i> = A )<tt> [virtual]</tt></h3>
<p>Sets this object to query for record type <i>rr</i> records.</p>
<p>The DNS lookup is started the next time the application enters the event loop. When the result is found the signal <a href="q3dns.html#resultsReady">resultsReady</a>() is emitted.</p>
<p><b>See also </b><a href="q3dns.html#recordType">recordType</a>() and <a href="q3dns.html#RecordType-enum">RecordType</a>.</p>
<!-- @@@setRecordType -->
<!-- $$$texts[overload1]$$$texts -->
<h3 class="fn"><a name="texts"></a><span class="type"><a href="qstringlist.html">QStringList</a></span> Q3Dns::<span class="name">texts</span> () const</h3>
<p>Returns a list of texts if the record type is <tt>Txt</tt>.</p>
<p>Note that if you want to iterate over the list, you should iterate over a copy, e.g&#x2e;</p>
<pre class="cpp"> <span class="type"><a href="qstringlist.html">QStringList</a></span> list <span class="operator">=</span> myDns<span class="operator">.</span>texts();
 <span class="type"><a href="qstringlist.html">QStringList</a></span><span class="operator">::</span>Iterator it <span class="operator">=</span> list<span class="operator">.</span>begin();
 <span class="keyword">while</span>( it <span class="operator">!</span><span class="operator">=</span> list<span class="operator">.</span>end() ) {
     myProcessing( <span class="operator">*</span>it );
     <span class="operator">+</span><span class="operator">+</span>it;
 }</pre>
<!-- @@@texts -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      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>
      Qt and respective logos are trademarks of The Qt Company Ltd 
      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>