Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
 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
 

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 97 of file qdnslookup.h.

Constructor & Destructor Documentation

◆ QDnsServiceRecord() [1/2]

QDnsServiceRecord::QDnsServiceRecord ( )

Constructs an empty service record object.

Definition at line 1094 of file qdnslookup.cpp.

◆ QDnsServiceRecord() [2/2]

QDnsServiceRecord::QDnsServiceRecord ( const QDnsServiceRecord & other)

Constructs a copy of other.

Definition at line 1103 of file qdnslookup.cpp.

◆ ~QDnsServiceRecord()

QDnsServiceRecord::~QDnsServiceRecord ( )

Destroys a service record.

Definition at line 1112 of file qdnslookup.cpp.

Member Function Documentation

◆ name()

QString QDnsServiceRecord::name ( ) const

Returns the name for this record.

Definition at line 1120 of file qdnslookup.cpp.

References QDnsRecordPrivate::name.

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

References other().

+ Here is the call graph for this function:

◆ operator=() [2/2]

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

Definition at line 102 of file qdnslookup.h.

References other(), and swap().

+ Here is the call graph for this function:

◆ port()

quint16 QDnsServiceRecord::port ( ) const

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

Definition at line 1129 of file qdnslookup.cpp.

References QDnsServiceRecordPrivate::port.

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

References QDnsServiceRecordPrivate::priority.

◆ swap()

void QDnsServiceRecord::swap ( QDnsServiceRecord & other)
inlinenoexcept

Swaps this service record instance with other.

This function is very fast and never fails.

Definition at line 106 of file qdnslookup.h.

References d, and other().

+ Here is the call graph for this function:

◆ target()

QString QDnsServiceRecord::target ( ) const

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

Definition at line 1150 of file qdnslookup.cpp.

References QDnsServiceRecordPrivate::target.

◆ timeToLive()

quint32 QDnsServiceRecord::timeToLive ( ) const

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

Definition at line 1159 of file qdnslookup.cpp.

References QDnsRecordPrivate::timeToLive.

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

References QDnsServiceRecordPrivate::weight.

Friends And Related Symbol Documentation

◆ QDnsLookupRunnable

friend class QDnsLookupRunnable
friend

Definition at line 117 of file qdnslookup.h.


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