📄 qdns.html
字号:
<p> <h3 class=fn><a href="qstring.html">QString</a> <a name="canonicalName"></a>QDns::canonicalName () const</h3>Returns the canonical name for this DNS node. (This worksregardless of what <a href="#recordType">recordType</a>() is set to.)<p> If the canonical name isn't known, this function returns a nullstring.<p> The canonical name of a DNS node is its full name, or the full name ofthe target of its CNAME. For example, if l.trolltech.com is a CNAME tolupinella.troll.no, and the search path for QDns is "trolltech.com", thenthe canonical name for all of "lupinella", "l", "lupinella.troll.no."and "l.trolltech.com" is "lupinella.troll.no.".<h3 class=fn><a href="qstringlist.html">QStringList</a> <a name="hostNames"></a>QDns::hostNames () const</h3>Returns a list of host names if the record type is <a href="#RecordType-enum">Ptr</a>.<p> Note that if you want to iterate over the list, you shoulditerate over a copy, e.g.<pre> <a href="qstringlist.html">QStringList</a> list = myDns.hostNames(); QStringList::Iterator it = list.<a href="qvaluelist.html#begin">begin</a>(); while( it != list.<a href="qvaluelist.html#end">end</a>() ) { myProcessing( *it ); ++it; } </pre> <p> <h3 class=fn>bool <a name="isWorking"></a>QDns::isWorking () const</h3>Returns TRUE if QDns is doing a lookup for this object, and FALSEif this object already has the information it wants.<p> QDns emits the <a href="#resultsReady">resultsReady</a>() signal when the status changes to FALSE.<p>Example: <a href="mail-example.html#x751">network/mail/smtp.cpp</a>.<h3 class=fn><a href="qstring.html">QString</a> <a name="label"></a>QDns::label () const</h3> <p> Returns the domain name for which this object returns information.<p> <p>See also <a href="#setLabel">setLabel</a>().<h3 class=fn><a href="qvaluelist.html">QValueList</a><MailServer> <a name="mailServers"></a>QDns::mailServers () const</h3>Returns a list of mail servers if the record type is <a href="#RecordType-enum">Mx</a>. The class<tt>QDns::MailServer</tt> contains the following public variables:<ul><li> <a href="qstring.html">QString</a> QDns::MailServer::name<li> Q_UINT16 QDns::MailServer::priority</ul><p> Note that if you want to iterate over the list, you shoulditerate over a copy, e.g.<pre> <a href="qvaluelist.html">QValueList</a><QDns::MailServer> list = myDns.mailServers(); QValueList<QDns::MailServer>::Iterator it = list.<a href="qvaluelist.html#begin">begin</a>(); while( it != list.<a href="qvaluelist.html#end">end</a>() ) { myProcessing( *it ); ++it; } </pre> <p> <p>Example: <a href="mail-example.html#x752">network/mail/smtp.cpp</a>.<h3 class=fn><a href="qstringlist.html">QStringList</a> <a name="qualifiedNames"></a>QDns::qualifiedNames () const</h3><p> Returns a list of the fully qualified names <a href="#label">label</a>() maps to.<p> Note that if you want to iterate over the list, you shoulditerate over a copy, e.g.<pre> <a href="qstringlist.html">QStringList</a> list = myDns.qualifiedNames(); QStringList::Iterator it = list.<a href="qvaluelist.html#begin">begin</a>(); while( it != list.<a href="qvaluelist.html#end">end</a>() ) { myProcessing( *it ); ++it; } </pre> <p> <h3 class=fn><a href="qdns.html#RecordType-enum">RecordType</a> <a name="recordType"></a>QDns::recordType () const</h3><p> Returns the record type of this DNS query object.<p> <p>See also <a href="#setRecordType">setRecordType</a>() and <a href="#RecordType-enum">RecordType</a>.<h3 class=fn>void <a name="resultsReady"></a>QDns::resultsReady ()<tt> [signal]</tt></h3><p> This signal is emitted when results are available for one ofthe <a href="#qualifiedNames">qualifiedNames</a>().<p>Example: <a href="mail-example.html#x753">network/mail/smtp.cpp</a>.<h3 class=fn><a href="qvaluelist.html">QValueList</a><Server> <a name="servers"></a>QDns::servers () const</h3>Returns a list of servers if the record type is <a href="#RecordType-enum">Srv</a>. The class <tt>QDns::Server</tt> contains the following public variables:<ul><li> <a href="qstring.html">QString</a> QDns::Server::name<li> Q_UINT16 QDns::Server::priority<li> Q_UINT16 QDns::Server::weight<li> Q_UINT16 QDns::Server::port</ul><p> Note that if you want to iterate over the list, you shoulditerate over a copy, e.g.<pre> <a href="qvaluelist.html">QValueList</a><QDns::Server> list = myDns.servers(); QValueList<QDns::Server>::Iterator it = list.<a href="qvaluelist.html#begin">begin</a>(); while( it != list.<a href="qvaluelist.html#end">end</a>() ) { myProcessing( *it ); ++it; } </pre> <h3 class=fn>void <a name="setLabel"></a>QDns::setLabel ( const <a href="qstring.html">QString</a> & label )<tt> [virtual]</tt></h3>Sets this DNS query object to query for information about <em>label</em>.<p> This does not change the <a href="#recordType">recordType</a>(), but its <a href="#isWorking">isWorking</a>() status willprobably change as a result.<p> The DNS lookup is started the next time the application enters the eventloop. When the result is found the signal <a href="#resultsReady">resultsReady</a>() is emitted.<h3 class=fn>void <a name="setLabel-2"></a>QDns::setLabel ( const <a href="qhostaddress.html">QHostAddress</a> & address )<tt> [virtual]</tt></h3> This is an overloaded member function, provided for convenience. It behaves essentially like the above function.<p> Sets this DNS query object to query for information about the host address <em>address</em>. The label is set to the IN-ADDR.ARPA domain name. This is useful incombination with the Ptr record type (e.g. if you want to look up a hostnamefor a given address).<h3 class=fn>void <a name="setRecordType"></a>QDns::setRecordType ( <a href="qdns.html#RecordType-enum">RecordType</a> rr = A )<tt> [virtual]</tt></h3>Sets this object to query for record type <em>rr</em> records.<p> The DNS lookup is started the next time the application enters the eventloop. When the result is found the signal <a href="#resultsReady">resultsReady</a>() is emitted.<p> <p>See also <a href="#RecordType-enum">RecordType</a>.<h3 class=fn><a href="qstringlist.html">QStringList</a> <a name="texts"></a>QDns::texts () const</h3>Returns a list of texts if the record type is <a href="#RecordType-enum">Txt</a>.<p> Note that if you want to iterate over the list, you shoulditerate over a copy, e.g.<pre> <a href="qstringlist.html">QStringList</a> list = myDns.texts(); QStringList::Iterator it = list.<a href="qvaluelist.html#begin">begin</a>(); while( it != list.<a href="qvaluelist.html#end">end</a>() ) { myProcessing( *it ); ++it; } </pre> <!-- eof --><hr><p>This file is part of the <a href="index.html">Qt toolkit</a>.Copyright © 1995-2002<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center><table width=100% cellspacing=0 border=0><tr><td>Copyright © 2002 <a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a><td align=right><div align=right>Qt version 3.0.5</div></table></div></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -