Q3Dns Class Reference |
Constant | Value | Description |
---|---|---|
Q3Dns::None | 0 | No information. This exists only so that Q3Dns can have a default. |
Q3Dns::A | 1 | IPv4 addresses. By far the most common type. |
Q3Dns::Aaaa | 2 | IPv6 addresses. So far mostly unused. |
Q3Dns::Mx | 3 | Mail eXchanger names. Used for mail delivery. |
Q3Dns::Srv | 4 | SeRVer names. Generic record type for finding servers. So far mostly unused. |
Q3Dns::Cname | 5 | Canonical names. Maps from nicknames to the true name (the canonical name) for a host. |
Q3Dns::Ptr | 6 | name PoinTeRs. Maps from IPv4 or IPv6 addresses to hostnames. |
Q3Dns::Txt | 7 | arbitrary TeXT for domains. |
We expect that some support for the RFC 2535 extensions will be added in future versions.
Constructs a DNS query object with invalid settings for both the label and the search type.
Constructs a DNS query object that will return record type rr information about label.
The DNS lookup is started the next time the application enters the event loop. When the result is found the signal resultsReady() is emitted.
rr defaults to A, IPv4 addresses.
Constructs a DNS query object that will return record type rr information about host address address. The label is set to the IN-ADDR.ARPA domain name. This is useful in combination with the Ptr record type (e.g. if you want to look up a hostname for a given address).
The DNS lookup is started the next time the application enters the event loop. When the result is found the signal resultsReady() is emitted.
rr defaults to Ptr, that maps addresses to hostnames.
Destroys the DNS query object and frees its allocated resources.
Returns a list of the addresses for this name if this Q3Dns object has a recordType() of Q3Dns::A or Q3Dns::Aaaa and the answer is available; otherwise returns an empty list.
As a special case, if label() is a valid numeric IP address, this function returns that address.
Note that if you want to iterate over the list, you should iterate over a copy, e.g.
Q3ValueList<QHostAddress> list = myDns.addresses(); Q3ValueList<QHostAddress>::Iterator it = list.begin(); while( it != list.end() ) { myProcessing( *it ); ++it; }
Returns the canonical name for this DNS node. (This works regardless of what recordType() is set to.)
If the canonical name isn't known, this function returns a null string.
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 Q3Dns is "trolltech.com", then the canonical name for all of "lillian", "l", "lillian.troll.no." and "l.trolltech.com" is "lillian.troll.no.".
Returns a list of host names if the record type is Ptr.
Note that if you want to iterate over the list, you should iterate over a copy, e.g.
QStringList list = myDns.hostNames(); QStringList::Iterator it = list.begin(); while( it != list.end() ) { myProcessing( *it ); ++it; }
Returns true if Q3Dns is doing a lookup for this object (i.e. if it does not already have the necessary information); otherwise returns false.
Q3Dns emits the resultsReady() signal when the status changes to false.
Returns the domain name for which this object returns information.
See also setLabel().
Returns a list of mail servers if the record type is Mx. The class Q3Dns::MailServer contains the following public variables:
Note that if you want to iterate over the list, you should iterate over a copy, e.g.
Q3ValueList<Q3Dns::MailServer> list = myDns.mailServers(); Q3ValueList<Q3Dns::MailServer>::Iterator it = list.begin(); while( it != list.end() ) { myProcessing( *it ); ++it; }
Returns a list of the fully qualified names label() maps to.
Note that if you want to iterate over the list, you should iterate over a copy, e.g.
QStringList list = myDns.qualifiedNames(); QStringList::Iterator it = list.begin(); while( it != list.end() ) { myProcessing( *it ); ++it; }
Returns the record type of this DNS query object.
See also setRecordType() and RecordType.
This signal is emitted when results are available for one of the qualifiedNames().
Returns a list of servers if the record type is Srv. The class Q3Dns::Server contains the following public variables:
Note that if you want to iterate over the list, you should iterate over a copy, e.g.
Q3ValueList<Q3Dns::Server> list = myDns.servers(); Q3ValueList<Q3Dns::Server>::Iterator it = list.begin(); while( it != list.end() ) { myProcessing( *it ); ++it; }
Sets this DNS query object to query for information about label.
This does not change the recordType(), but its isWorking() status will probably change as a result.
The DNS lookup is started the next time the application enters the event loop. When the result is found the signal resultsReady() is emitted.
See also label().
This is an overloaded member function, provided for convenience.
Sets this DNS query object to query for information about the host address address. The label is set to the IN-ADDR.ARPA domain name. This is useful in combination with the Ptr record type (e.g. if you want to look up a hostname for a given address).
Sets this object to query for record type rr records.
The DNS lookup is started the next time the application enters the event loop. When the result is found the signal resultsReady() is emitted.
See also recordType() and RecordType.
Returns a list of texts if the record type is Txt.
Note that if you want to iterate over the list, you should iterate over a copy, e.g.
QStringList list = myDns.texts(); QStringList::Iterator it = list.begin(); while( it != list.end() ) { myProcessing( *it ); ++it; }
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.1 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com