inspect::TreeServer

#include <service.h>

TreeServer is an implementation of the fuchsia.inspect.Tree protocol.

Summary

Generally, it is not necessary to use this directly. See inspect::ComponentInspector.

This class can be used directly if the client wishes to manage protocol registration details manually.

For an example of usage, see the constructor for inspect::ComponentInspector.

Inheritance

Inherits from: fidl::WireServer< fuchsia_inspect::Tree >

Public static functions

StartSelfManagedServer(std::variant< Inspector, zx::vmo > data, TreeHandlerSettings settings, async_dispatcher_t *dispatcher, fidl::ServerEnd< fuchsia_inspect::Tree > && request)
void
Starts a new server.

Public functions

GetContent(GetContentCompleter::Sync & completer) override
void
Get the VMO handle for the Inspector handled by this server.
ListChildNames(ListChildNamesRequestView request, ListChildNamesCompleter::Sync & completer) override
void
Start a server that furnishes the names of this Tree's children.
OpenChild(OpenChildRequestView request, OpenChildCompleter::Sync & completer) override
void
Start a server for handling the lazy child whose name is passed.

Public static functions

StartSelfManagedServer

void StartSelfManagedServer(
  std::variant< Inspector, zx::vmo > data,
  TreeHandlerSettings settings,
  async_dispatcher_t *dispatcher,
  fidl::ServerEnd< fuchsia_inspect::Tree > && request
)

Starts a new server.

The implementation deletes itself during teardown after an unbind or else runs until component shutdown.

data is the Inspect data served over the connection.

The Inspector variant results in full-featured Inspect with lazy nodes and values.

The zx::vmo variant will not serve lazy nodes/values. It will only serve the Inspect data in itself. The VMO may contain lazy nodes/values, but they will be ignored when snapshotting and parsing the data.

Public functions

GetContent

void GetContent(
  GetContentCompleter::Sync & completer
) override

Get the VMO handle for the Inspector handled by this server.

ListChildNames

void ListChildNames(
  ListChildNamesRequestView request,
  ListChildNamesCompleter::Sync & completer
) override

Start a server that furnishes the names of this Tree's children.

The names provided by the server this method starts are valid values to be passed to OpenChild.

OpenChild

void OpenChild(
  OpenChildRequestView request,
  OpenChildCompleter::Sync & completer
) override

Start a server for handling the lazy child whose name is passed.