CopperSpice API  1.7.2
QDnsServiceRecord Class Reference

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

Public Methods

 QDnsServiceRecord ()
 
 QDnsServiceRecord (const QDnsServiceRecord &other)
 
 ~QDnsServiceRecord ()
 
QString name () const
 
QDnsServiceRecord & operator= (const QDnsServiceRecord &other)
 
QDnsServiceRecord & operator= (QDnsServiceRecord &&other)
 
quint16 port () const
 
quint16 priority () const
 
void swap (QDnsServiceRecord &other)
 
QString target () const
 
quint32 timeToLive () const
 
quint16 weight () const
 

Detailed Description

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 RFC 2782.

See also
QDnsLookup

Constructor & Destructor Documentation

QDnsServiceRecord::QDnsServiceRecord ( )

Constructs an empty service record object.

QDnsServiceRecord::QDnsServiceRecord ( const QDnsServiceRecord &  other)

Constructs a copy of other.

QDnsServiceRecord::~QDnsServiceRecord ( )

Destroys a service record.

Method Documentation

QString QDnsServiceRecord::name ( ) const

Returns the name for this text record.

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

Copy assigns from other and returns a reference to this object.

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

Move assigns from other and returns a reference to this object.

quint16 QDnsServiceRecord::port ( ) const

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

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.

void QDnsServiceRecord::swap ( QDnsServiceRecord &  other)
inline

Swaps this service record instance with other. This method is very fast and never fails.

QString QDnsServiceRecord::target ( ) const

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

quint32 QDnsServiceRecord::timeToLive ( ) const

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

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.