QMdnsEngine  0.1.0
Multicast DNS library for Qt applications
Public Member Functions | List of all members
QMdnsEngine::Query Class Reference

DNS query. More...

#include <qmdnsengine/query.h>

Public Member Functions

 Query ()
 Create an empty query.
 
 Query (const Query &other)
 Create a copy of an existing query.
 
virtual ~Query ()
 Destroy the query.
 
QByteArray name () const
 Retrieve the name being queried.
 
Queryoperator= (const Query &other)
 Assignment operator.
 
void setName (const QByteArray &name)
 Set the name to query.
 
void setType (quint16 type)
 Set the type of record to query. More...
 
void setUnicastResponse (bool unicastResponse)
 Set whether a unicast response is desired.
 
quint16 type () const
 Retrieve the type of record being queried.
 
bool unicastResponse () const
 Determine if a unicast response is desired.
 

Detailed Description

This class represents a query for a DNS record. For example, to query for the IPv4 address of a local host:

query.setName("myserver.local.");
query.setType(QMdnsEngine::A);
message.addQuery(query);

Member Function Documentation

◆ setType()

void QMdnsEngine::Query::setType ( quint16  type)

Constants, such as QMdnsEngine::SRV are provided for convenience.


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