template <>
class Server
Defined at line 1659 of file fidling/gen/sdk/fidl/fuchsia.hardware.audio/fuchsia.hardware.audio/cpp/fidl/fuchsia.hardware.audio/cpp/natural_messaging.h
Public Methods
void PutPacket (PutPacketRequest & request, PutPacketCompleter::Sync & completer)
Submits a packet to be processed by the server.
The client may queue multiple packets by calling `PutPacket` repeatedly.
Packets are processed in the order they were submitted. This call
blocks until the payload is processed. When this call returns, the
buffer region is guaranteed to be available for reuse.
Returns `ZX_ERR_BAD_STATE` if the stream is not started or configured.
Returns `ZX_ERR_CANCELED` if `FlushPackets` was called.
Returns `ZX_ERR_INVALID_ARGS` if the packet is invalid. This includes:
* The payload is missing.
* `inline_data` is used but `supported_buffer_types` does not include `INLINE`.
* `vmo_transfer` is used but `supported_buffer_types` does not include `CLIENT_OWNED` or
`DRIVER_OWNED`.
* `vmo_id` is unrecognized, or `vmo_offset` + `payload_size` exceeds the VMO size.
Note: The server is not required to detect if a VMO region is currently in use by a
previous pending packet. Clients are responsible for managing buffer usage.
void FlushPackets (FlushPacketsCompleter::Sync & completer)
Flushes all packets currently pending without processing them.
This call waits until all pending packets are completed or canceled.
Note: A packet may be partially processed (e.g. if it contains multiple
audio frames, or if the data does not align with encoded frame boundaries)
before it is canceled.
void Server ()
Defined at line 1662 of file fidling/gen/sdk/fidl/fuchsia.hardware.audio/fuchsia.hardware.audio/cpp/fidl/fuchsia.hardware.audio/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 1663 of file fidling/gen/sdk/fidl/fuchsia.hardware.audio/fuchsia.hardware.audio/cpp/fidl/fuchsia.hardware.audio/cpp/natural_messaging.h