class MdnsInspector

Defined at line 49 of file ../../src/connectivity/network/mdns/service/inspect.h

This class defines the structure of the Inspect hierarchy for Mdns. Components

of Mdns can invoke the MdnsInspector to log events.

For example:

auto inspector = mdns::MdnsInspector::GetMdnsInspector();

inspector.NotifyStateChange(

mdns::MdnsInspector::MdnsStatusNode::kWaitingForInterfaces);

The MdnsInspector holds types of MdnsStateNode as sub-nodes

of the Inspect hierarchy. MdnsStatusNode will contain multiple MdnsStatusEntry

sub-nodes. These sub-nodes are added whenever an Mdns state change is notified by

Mdns and will contain complete information of current mdns status. To obtain

history of Mdns status changes MdnsStatusNode will hold last |kMaxMdnsStatusEntries|.

Sample Inspect hierarchy:

"root": {

"mdns_status": {

"0x13": {

"state": "kWaitingForInterfaces",

"@time": 479097104375,

},

"0x12": {

..

..

},

..

..

},

}

Public Members

static basic_string kNotStarted
static basic_string kWaitingForInterfaces
static basic_string kAddressProbeInProgress
static basic_string kActive

Public Methods

MdnsInspector & GetMdnsInspector ()

Creates/Returns the pointer to MdnsInspector singleton object.

Defined at line 26 of file ../../src/connectivity/network/mdns/service/inspect.cc

void NotifyStateChange (const MdnsState & new_state)

Function to be called when state changes.

This will add a new entry with all current statuses to mdns_status node.

Defined at line 36 of file ../../src/connectivity/network/mdns/service/inspect.cc

void MdnsInspector (const MdnsInspector & )

Defined at line 59 of file ../../src/connectivity/network/mdns/service/inspect.h

void operator= (const MdnsInspector & )

Defined at line 60 of file ../../src/connectivity/network/mdns/service/inspect.h

Friends

class MdnsInspectorTest