struct DnsName

Defined at line 109 of file ../../src/connectivity/network/mdns/service/encoding/dns_message.h

Domain name.

Public Methods

void DnsName (std::string dotted_string)

Constructs a DnsName given the complete dotted string, assuming that no labels contain '.'s.

Defined at line 9 of file ../../src/connectivity/network/mdns/service/encoding/dns_message.cc

void DnsName (std::string dotted_string, size_t first_label_size)

Constructs a DnsName given the complete dotted string and the length of the first label,

assuming that no other labels contain '.'s.

Defined at line 21 of file ../../src/connectivity/network/mdns/service/encoding/dns_message.cc

DnsName append (const DnsLabel & label)

Returns a copy of this DnsName with `label` appended to the end.

Defined at line 29 of file ../../src/connectivity/network/mdns/service/encoding/dns_message.cc

DnsName append (const DnsName & name)

Returns a copy of this DnsName with `name` appended to the end.

Defined at line 35 of file ../../src/connectivity/network/mdns/service/encoding/dns_message.cc

void push_back (const DnsLabel & label)

Modifies this name by adding the specified label to the end.

Defined at line 43 of file ../../src/connectivity/network/mdns/service/encoding/dns_message.cc

std::string_view next_label_view (std::string_view current_label_view)

Returns a view of the next label view after the given label view. Returns an empty view if

there is no next label or if `current_label_view` is empty. If not empty,

`current_label_view` must be a view returned by `first_label_view' or `next_label_view`

for the current name.

Defined at line 53 of file ../../src/connectivity/network/mdns/service/encoding/dns_message.cc

void DnsName ()

Constructs a DnsName with no labels.

Defined at line 111 of file ../../src/connectivity/network/mdns/service/encoding/dns_message.h

void ~DnsName ()

Defined at line 113 of file ../../src/connectivity/network/mdns/service/encoding/dns_message.h

bool operator== (const DnsName & other)

Checks for equality.

Defined at line 123 of file ../../src/connectivity/network/mdns/service/encoding/dns_message.h

bool operator!= (const DnsName & other)

Checks for inequality.

Defined at line 131 of file ../../src/connectivity/network/mdns/service/encoding/dns_message.h

bool empty ()

Determine if this DnsName is empty (contains no labels).

Defined at line 143 of file ../../src/connectivity/network/mdns/service/encoding/dns_message.h

DnsLabel first_label ()

Returns an owned copy of the first label. Returns an empty label if this name is empty.

Defined at line 146 of file ../../src/connectivity/network/mdns/service/encoding/dns_message.h

std::string_view first_label_view ()

Returns a view of the first label. Returns an empty view if this name is empty.

Defined at line 149 of file ../../src/connectivity/network/mdns/service/encoding/dns_message.h

size_t length ()

Length of text representation of this DnsName.

Defined at line 160 of file ../../src/connectivity/network/mdns/service/encoding/dns_message.h

const std::string & to_string ()

Returns a string representation of this DnsName. Note that a DnsName containing a label

that contains a dot cannot be uniquely represented as a string.

Defined at line 164 of file ../../src/connectivity/network/mdns/service/encoding/dns_message.h

size_t hash ()

Returns the hash of this DnsName.

Defined at line 167 of file ../../src/connectivity/network/mdns/service/encoding/dns_message.h