template <>

class WireServer

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

Pure-virtual interface to be implemented by a server.

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

<

::fuchsia_component_sandbox::CapabilityStore>|

and |::fidl::ServerEnd

<

::fuchsia_component_sandbox::CapabilityStore>|).

Public Methods

void Duplicate (::fuchsia_component_sandbox::wire::CapabilityStoreDuplicateRequest * request, DuplicateCompleter::Sync & completer)

Duplicates the capability with `id` to `dest_id`.

Errors:

- `ID_NOT_FOUND` if `id` was not a valid capability id in this store.

- `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.

- `NOT_DUPLICATABLE` if `id` could not be duplicated.

void Drop (::fuchsia_component_sandbox::wire::CapabilityStoreDropRequest * request, DropCompleter::Sync & completer)

Drops the capability with `id` from this [`CapabilityStore`].

Errors:

- `ID_NOT_FOUND` if `id` was not a valid capability id in this store.

void Export (::fuchsia_component_sandbox::wire::CapabilityStoreExportRequest * request, ExportCompleter::Sync & completer)

Exports the capability with the client-assigned identifier `id` to

`capability`. This operation removes the capability from the store. If

this is not desired, [Duplicate] the capability first.

Errors:

- `ID_NOT_FOUND` if `id` was not a valid capability id in this store.

void Import (::fuchsia_component_sandbox::wire::CapabilityStoreImportRequest * request, ImportCompleter::Sync & completer)

Imports `capability` into this store with the client-assigned `id`.

Errors:

- `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.

- `BAD_CAPABILITY` if `capability` was not a valid [Capability].

void ConnectorCreate (::fuchsia_component_sandbox::wire::CapabilityStoreConnectorCreateRequest * request, ConnectorCreateCompleter::Sync & completer)

Creates a [Connector] from a [Receiver]. Incoming connections to the [Connector] will be

dispatched to this [Receiver].

Errors:

- `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.

void ConnectorOpen (::fuchsia_component_sandbox::wire::CapabilityStoreConnectorOpenRequest * request, ConnectorOpenCompleter::Sync & completer)

Open a connection from the provided [Connector] capability that will be dispatched to

the [Receiver] on the other end.

If there is an error, it will be reported as a zx.Status epitaph on `server_end`.

Errors:

- `ID_NOT_FOUND` if `id` was not a valid capability id in this store.

- `WRONG_TYPE` if `id` was not a connector capability.

void DirConnectorCreate (::fuchsia_component_sandbox::wire::CapabilityStoreDirConnectorCreateRequest * request, DirConnectorCreateCompleter::Sync & completer)

Creates a [DirConnector] from a [DirReceiver]. Incoming connections to the [DirConnector]

will be dispatched to this [DirReceiver].

Errors:

- `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.

void DirConnectorOpen (::fuchsia_component_sandbox::wire::CapabilityStoreDirConnectorOpenRequest * request, DirConnectorOpenCompleter::Sync & completer)

Open a connection from the provided [DirConnector] capability that will

be dispatched to the [DirReceiver] on the other end. The `id` and

`server_end` arguments are required, and the `flags` and `path`

arguments are optional (a path of `.` will be used if one is not

otherwise set).

If there was an error making the connection, it will be reported as a zx.Status

epitaph on `server_end`.

Errors:

- `ID_NOT_FOUND` if `id` was not a valid capability id in this store.

- `WRONG_TYPE` if `id` was not a connector capability.

void DictionaryCreate (::fuchsia_component_sandbox::wire::CapabilityStoreDictionaryCreateRequest * request, DictionaryCreateCompleter::Sync & completer)

Creates a new empty dictionary in this [`CapabilityStore`] with client-assigned `id`.

Errors:

- `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.

void DictionaryLegacyImport (::fuchsia_component_sandbox::wire::CapabilityStoreDictionaryLegacyImportRequest * request, DictionaryLegacyImportCompleter::Sync & completer)

Imports a dictionary in the form of a channel.

This is a legacy API to support backward compatibility with APIs that take a [Dictionary]

channel.

Errors:

- `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.

- `BAD_CAPABILITY` if `client_end` was not a valid dictionary channel.

void DictionaryLegacyExport (::fuchsia_component_sandbox::wire::CapabilityStoreDictionaryLegacyExportRequest * request, DictionaryLegacyExportCompleter::Sync & completer)

Binds a channel to the dictionary with `id`. The channel can

be re-imported into a [CapabilityStore] with [DictionaryImportLegacy].

This is a legacy API to support backward compatibility with APIs that take a [Dictionary]

channel.

Errors:

- `ID_NOT_FOUND` if `id` was not a valid capability id in this store.

void DictionaryInsert (::fuchsia_component_sandbox::wire::CapabilityStoreDictionaryInsertRequest * request, DictionaryInsertCompleter::Sync & completer)

Inserts `item` into the dictionary with `id`. `item.value` is moved into the dictionary and

its id is released if this call succeeds.

Errors:

- `ID_NOT_FOUND` if `id` was not a valid capability id in this store.

- `WRONG_TYPE` if `id` was not a dictionary.

- `INVALID_KEY` if `item.key` was invalid.

- `ITEM_ALREADY_EXISTS` if the dictionary already contains an item with `item.key`.

void DictionaryGet (::fuchsia_component_sandbox::wire::CapabilityStoreDictionaryGetRequest * request, DictionaryGetCompleter::Sync & completer)

Get a duplicate of a capability from the dictionary with `id`, which is

loaded into `dest_id`.

Errors:

- `ID_NOT_FOUND` if `id` was not a recognized capability id in this store.

- `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.

- `WRONG_TYPE` if `id` was not a dictionary.

- `INVALID_KEY` if `item.key` was invalid.

- `ITEM_NOT_FOUND` if the dictionary does not contain `key`.

- `NOT_DUPLICATABLE` if the capability could not be duplicated.

void DictionaryRemove (::fuchsia_component_sandbox::wire::CapabilityStoreDictionaryRemoveRequest * request, DictionaryRemoveCompleter::Sync & completer)

Removes a key from the dictionary with `id`. If `dest_id` is present, loads the value

into it, otherwise discards the value.

Errors:

- `ID_NOT_FOUND` if `id` was not a valid capability id in this store.

- `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.

- `WRONG_TYPE` if `id` was not a dictionary.

- `INVALID_KEY` if `key` was invalid.

- `ITEM_NOT_FOUND` if the dictionary does not contain the key.

void DictionaryCopy (::fuchsia_component_sandbox::wire::CapabilityStoreDictionaryCopyRequest * request, DictionaryCopyCompleter::Sync & completer)

Create a new dictionary that contains a duplicate of all the entries in

the dictionary with `id`, assigning `dest_id` to the new dictionary.

The runtime of this method is linear in the number of top-level entries

in the dictionary.

For example, if the dictionary contains nested dictionaries, the newly

created dictionary will contain references to those same nested

dictionaries because the entries are duplicated rather than deep-copied.

Errors:

- `ID_NOT_FOUND` if `id` was not a valid capability id in this store.

- `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.

- `WRONG_TYPE` if `id` was not a dictionary.

- `NOT_DUPLICATABLE` if one of the capabilities in `id` could not be duplicated.

void DictionaryKeys (::fuchsia_component_sandbox::wire::CapabilityStoreDictionaryKeysRequest * request, DictionaryKeysCompleter::Sync & completer)

Enumerates the keys in the dictionary with `id`.

Errors:

- `ID_NOT_FOUND` if `id` was not a valid capability id in this store.

- `WRONG_TYPE` if `id` was not a dictionary.

void DictionaryEnumerate (::fuchsia_component_sandbox::wire::CapabilityStoreDictionaryEnumerateRequest * request, DictionaryEnumerateCompleter::Sync & completer)

Enumerates the items (keys and values) in the dictionary with `id`.

Creates a duplicate of each value (capability). If a value could not be duplicated,

the value will be null.

Errors:

- `ID_NOT_FOUND` if `id` was not a valid capability id in this store.

- `WRONG_TYPE` if `id` was not a dictionary.

void DictionaryDrain (::fuchsia_component_sandbox::wire::CapabilityStoreDictionaryDrainRequest * request, DictionaryDrainCompleter::Sync & completer)

Removes all the entries in this dictionary, returning them in `contents` if provided.

If `contents` is not provided, all the items are discarded without enumerating them.

Errors:

- `ID_NOT_FOUND` if `id` was not a valid capability id in this store.

- `WRONG_TYPE` if `id` was not a dictionary.

void CreateServiceAggregate (::fuchsia_component_sandbox::wire::CapabilityStoreCreateServiceAggregateRequest * request, CreateServiceAggregateCompleter::Sync & completer)

Creates a new DirConnector that forwards open requests to a set of

sources.

void WireServer ()

Defined at line 5095 of file fidling/gen/sdk/fidl/fuchsia.component.sandbox/fuchsia.component.sandbox/cpp/fidl/fuchsia.component.sandbox/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 5096 of file fidling/gen/sdk/fidl/fuchsia.component.sandbox/fuchsia.component.sandbox/cpp/fidl/fuchsia.component.sandbox/cpp/wire_messaging.h