![]() |
Qt 6.x
The Qt SDK
|
The QDnsServiceRecord class stores information about a DNS SRV record. More...
#include <qdnslookup.h>
Public Member Functions | |
QDnsServiceRecord () | |
Constructs an empty service record object. | |
QDnsServiceRecord (const QDnsServiceRecord &other) | |
Constructs a copy of other. | |
QDnsServiceRecord & | operator= (QDnsServiceRecord &&other) noexcept |
QDnsServiceRecord & | operator= (const QDnsServiceRecord &other) |
Assigns the data of the other object to this record object, and returns a reference to it. | |
~QDnsServiceRecord () | |
Destroys a service record. | |
void | swap (QDnsServiceRecord &other) noexcept |
Swaps this service record instance with other. | |
QString | name () const |
Returns the name for this record. | |
quint16 | port () const |
Returns the port on the target host for this service record. | |
quint16 | priority () const |
Returns the priority for this service record. | |
QString | target () const |
Returns the domain name of the target host for this service record. | |
quint32 | timeToLive () const |
Returns the duration in seconds for which this record is valid. | |
quint16 | weight () const |
Returns the weight for this service record. | |
Friends | |
class | QDnsLookupRunnable |
The QDnsServiceRecord class stores information about a DNS SRV record.
\inmodule QtNetwork
When performing a lookup on a service, zero or more records will be returned. Each record is represented by a QDnsServiceRecord instance.
The meaning of the fields is defined in \l{http://www.rfc-editor.org/rfc/rfc2782.txt}{RFC 2782}.
Definition at line 93 of file qdnslookup.h.
QDnsServiceRecord::QDnsServiceRecord | ( | ) |
Constructs an empty service record object.
Definition at line 868 of file qdnslookup.cpp.
QDnsServiceRecord::QDnsServiceRecord | ( | const QDnsServiceRecord & | other | ) |
Constructs a copy of other.
Definition at line 877 of file qdnslookup.cpp.
QDnsServiceRecord::~QDnsServiceRecord | ( | ) |
Destroys a service record.
Definition at line 886 of file qdnslookup.cpp.
QString QDnsServiceRecord::name | ( | ) | const |
Returns the name for this record.
Definition at line 894 of file qdnslookup.cpp.
References QDnsRecordPrivate::name.
QDnsServiceRecord & QDnsServiceRecord::operator= | ( | const QDnsServiceRecord & | other | ) |
Assigns the data of the other object to this record object, and returns a reference to it.
Definition at line 956 of file qdnslookup.cpp.
References other().
|
inlinenoexcept |
Definition at line 98 of file qdnslookup.h.
References other(), and swap().
quint16 QDnsServiceRecord::port | ( | ) | const |
Returns the port on the target host for this service record.
Definition at line 903 of file qdnslookup.cpp.
References QDnsServiceRecordPrivate::port.
quint16 QDnsServiceRecord::priority | ( | ) | const |
Returns the priority for this service record.
A client must attempt to contact the target host with the lowest-numbered priority.
Definition at line 915 of file qdnslookup.cpp.
References QDnsServiceRecordPrivate::priority.
|
inlinenoexcept |
Swaps this service record instance with other.
This function is very fast and never fails.
Definition at line 102 of file qdnslookup.h.
QString QDnsServiceRecord::target | ( | ) | const |
Returns the domain name of the target host for this service record.
Definition at line 924 of file qdnslookup.cpp.
References QDnsServiceRecordPrivate::target.
quint32 QDnsServiceRecord::timeToLive | ( | ) | const |
Returns the duration in seconds for which this record is valid.
Definition at line 933 of file qdnslookup.cpp.
References QDnsRecordPrivate::timeToLive.
quint16 QDnsServiceRecord::weight | ( | ) | const |
Returns the weight for this service record.
The weight field specifies a relative weight for entries with the same priority. Entries with higher weights should be selected with a higher probability.
Definition at line 946 of file qdnslookup.cpp.
References QDnsServiceRecordPrivate::weight.
|
friend |
Definition at line 113 of file qdnslookup.h.