template <>
class Server
Defined at line 292 of file fidling/gen/sdk/fidl/fuchsia.element/fuchsia.element/cpp/fidl/fuchsia.element/cpp/natural_messaging.h
Public Methods
void Server ()
Defined at line 295 of file fidling/gen/sdk/fidl/fuchsia.element/fuchsia.element/cpp/fidl/fuchsia.element/cpp/natural_messaging.h
void UpdateAnnotations (UpdateAnnotationsRequest & request, UpdateAnnotationsCompleter::Sync & completer)
Adds, updates, and removes annotations.
The server is expected to adhere to the following conventions:
* If a key in `annotations_to_set` is new, a new annotation is added
* If a key in `annotations_to_set` already exists, the annotation value is updated
* If a key in `annotations_to_delete` does not exist, it is ignored
The same key cannot appear twice in a call to UpdateAnnotations(). In other words,
to set two Annotations with matching keys is illegal, as is an attempt to set an
Annotation and also delete it.
If the operation results in an error, the annotations remain unchanged,
and will not be partially updated.
* error `UpdateAnnotationsError.INVALID_ARGS` if the same key exists in
both `annotations_to_set` and `annotations_to_delete`.
* error `UpdateAnnotationsError.INVALID_ARGS` if a key in `annotations_to_set` or
`annotations_to_delete` has an empty namespace.
* error `UpdateAnnotationsError.INVALID_ARGS` if an `AnnotationValue.buffer` in
`annotations_to_set` could not be read.
* error `UpdateAnnotationsError.TOO_MANY_ANNOTATIONS` if the operation results
in more than `MAX_ANNOTATIONS_PER_ELEMENT` annotations existing.
void GetAnnotations (GetAnnotationsCompleter::Sync & completer)
Returns the current `Annotations` for the element.
* error `GetAnnotationsError` if the annotations could not be returned.
void WatchAnnotations (WatchAnnotationsCompleter::Sync & completer)
Returns the full set of `Annotations` when one or more of them have changed, or
when this method is called by the client for the first time.
This operation does not block other requests from the client, but only one
`WatchAnnotations` request at a time can be made on a connection. If the
client makes a second `WatchAnnotations` request before waiting for the
previous request to complete, the connection will be closed.
* error `WatchAnnotationsError` if the annotations could not be returned.
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 296 of file fidling/gen/sdk/fidl/fuchsia.element/fuchsia.element/cpp/fidl/fuchsia.element/cpp/natural_messaging.h