template <>

class WireServer

Defined at line 1736 of file fidling/gen/sdk/fidl/fuchsia.component/fuchsia.component/cpp/fidl/fuchsia.component/cpp/wire_messaging.h

Pure-virtual interface to be implemented by a server.

This interface uses typed channels (i.e. |::fidl::ClientEnd

<

::fuchsia_component::Controller>|

and |::fidl::ServerEnd

<

::fuchsia_component::Controller>|).

Public Methods

void Start (::fuchsia_component::wire::ControllerStartRequest * request, StartCompleter::Sync & completer)

Start the component, optionally providing additional handles to be given

to the component. Returns INSTANCE_ALREADY_RUNNING if the instance is

currently running.

void IsStarted (IsStartedCompleter::Sync & completer)

Returns true if this instance is currently running.

void OpenExposedDir (::fuchsia_component::wire::ControllerOpenExposedDirRequest * request, OpenExposedDirCompleter::Sync & completer)

Opens the exposed directory of the controlled component, through which

capabilities the component exposed via `ComponentDecl.exposes` are

available, on success.

Binding to the exposed directory requires that the component be

resolved, but it will not be started until/unless some capability is

requested that requires it to be.

If this component is destroyed, any outstanding connections to

`exposed_dir` will be closed.

Errors:

- `INSTANCE_CANNOT_RESOLVE`: This component failed to resolve.

void GetExposedDictionary (GetExposedDictionaryCompleter::Sync & completer)

Returns the dictionary containing the component's exposed capabilities.

void GetOutputDictionary (GetOutputDictionaryCompleter::Sync & completer)

Returns a reference to the component's output dictionary, which may be

interacted with by using the fuchsia.component.runtime.Capabilities API.

void Destroy (DestroyCompleter::Sync & completer)

Destroys this component. When this method returns, the component is

either destroyed or in the case of an error no destruction happened.

Errors:

- `ACCESS_DENIED`: Destruction of this component is not allowed.

Currently, this can happen if the component is a static child of its

parent.

- `INTERNAL`: Something prevented destruction from succeeding -- component

manager's logs will contain more detail.

void WireServer ()

Defined at line 1739 of file fidling/gen/sdk/fidl/fuchsia.component/fuchsia.component/cpp/fidl/fuchsia.component/cpp/wire_messaging.h

Handler bind_handler (async_dispatcher_t * dispatcher)

|bind_handler| returns a handler that binds incoming connections to this

server implementation.

The returned handler borrows the server instance.

The server must outlive the provided |dispatcher|. Only after

the dispatcher is shutdown will it be safe to destroy the servers.

The server should not be moved.

void ~WireServer ()

Defined at line 1740 of file fidling/gen/sdk/fidl/fuchsia.component/fuchsia.component/cpp/fidl/fuchsia.component/cpp/wire_messaging.h