Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QDnsServiceRecord Class Reference

The QDnsServiceRecord class stores information about a DNS SRV record. More...

#include <qdnslookup.h>

Collaboration diagram for QDnsServiceRecord:

Public Member Functions

 QDnsServiceRecord ()
 Constructs an empty service record object.
 QDnsServiceRecord (const QDnsServiceRecord &other)
 Constructs a copy of other.
QDnsServiceRecordoperator= (QDnsServiceRecord &&other) noexcept
QDnsServiceRecordoperator= (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
 \memberswap{service record instance}
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

Detailed Description

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}.

See also
QDnsLookup

Definition at line 98 of file qdnslookup.h.

Constructor & Destructor Documentation

◆ QDnsServiceRecord() [1/2]

QDnsServiceRecord::QDnsServiceRecord ( )

Constructs an empty service record object.

Definition at line 1091 of file qdnslookup.cpp.

◆ QDnsServiceRecord() [2/2]

QDnsServiceRecord::QDnsServiceRecord ( const QDnsServiceRecord & other)

Constructs a copy of other.

Definition at line 1100 of file qdnslookup.cpp.

◆ ~QDnsServiceRecord()

QDnsServiceRecord::~QDnsServiceRecord ( )

Destroys a service record.

Definition at line 1109 of file qdnslookup.cpp.

Member Function Documentation

◆ name()

QString QDnsServiceRecord::name ( ) const

Returns the name for this record.

Definition at line 1117 of file qdnslookup.cpp.

◆ operator=() [1/2]

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 1179 of file qdnslookup.cpp.

◆ operator=() [2/2]

QDnsServiceRecord & QDnsServiceRecord::operator= ( QDnsServiceRecord && other)
inlinenoexcept

Definition at line 103 of file qdnslookup.h.

◆ port()

quint16 QDnsServiceRecord::port ( ) const

Returns the port on the target host for this service record.

Definition at line 1126 of file qdnslookup.cpp.

◆ priority()

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 1138 of file qdnslookup.cpp.

◆ swap()

void QDnsServiceRecord::swap ( QDnsServiceRecord & other)
inlinenoexcept

\memberswap{service record instance}

Definition at line 107 of file qdnslookup.h.

◆ target()

QString QDnsServiceRecord::target ( ) const

Returns the domain name of the target host for this service record.

Definition at line 1147 of file qdnslookup.cpp.

◆ timeToLive()

quint32 QDnsServiceRecord::timeToLive ( ) const

Returns the duration in seconds for which this record is valid.

Definition at line 1156 of file qdnslookup.cpp.

◆ weight()

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 1169 of file qdnslookup.cpp.

◆ QDnsLookupRunnable

friend class QDnsLookupRunnable
friend

Definition at line 118 of file qdnslookup.h.


The documentation for this class was generated from the following files: