template <>
class Server
Defined at line 1447 of file fidling/gen/sdk/fidl/fuchsia.component.sandbox/fuchsia.component.sandbox/cpp/fidl/fuchsia.component.sandbox/cpp/natural_messaging.h
Public Methods
void Duplicate (DuplicateRequest & 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 (DropRequest & 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 (ExportRequest & 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 (ImportRequest & 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 (ConnectorCreateRequest & 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 (ConnectorOpenRequest & 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 (DirConnectorCreateRequest & 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 (DirConnectorOpenRequest & 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 (DictionaryCreateRequest & 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 (DictionaryLegacyImportRequest & 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 (DictionaryLegacyExportRequest & 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 (DictionaryInsertRequest & 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 (DictionaryGetRequest & 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 (DictionaryRemoveRequest & 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 (DictionaryCopyRequest & 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 (DictionaryKeysRequest & 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 (DictionaryEnumerateRequest & 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 (DictionaryDrainRequest & 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 (CreateServiceAggregateRequest & request, CreateServiceAggregateCompleter::Sync & completer)
Creates a new DirConnector that forwards open requests to a set of
sources.
void Server ()
Defined at line 1450 of file fidling/gen/sdk/fidl/fuchsia.component.sandbox/fuchsia.component.sandbox/cpp/fidl/fuchsia.component.sandbox/cpp/natural_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 ~Server ()
Defined at line 1451 of file fidling/gen/sdk/fidl/fuchsia.component.sandbox/fuchsia.component.sandbox/cpp/fidl/fuchsia.component.sandbox/cpp/natural_messaging.h