template <>
class WireServer
Defined at line 2906 of file fidling/gen/sdk/fidl/fuchsia.hardware.pty/fuchsia.hardware.pty/cpp/fidl/fuchsia.hardware.pty/cpp/wire_messaging.h
Pure-virtual interface to be implemented by a server.
This interface uses typed channels (i.e. |::fidl::ClientEnd
<
::fuchsia_hardware_pty::Device>|
and |::fidl::ServerEnd
<
::fuchsia_hardware_pty::Device>|).
Public Methods
void Clone (::fuchsia_unknown::wire::CloneableCloneRequest * request, CloneCompleter::Sync & completer)
void Close (CloseCompleter::Sync & completer)
Terminates the connection.
After calling `Close`, the client must not send any other requests.
Servers, after sending the status response, should close the connection
regardless of status and without sending an epitaph.
Closing the client end of the channel should be semantically equivalent
to calling `Close` without knowing when the close has completed or its
status.
void Query (QueryCompleter::Sync & completer)
void Read (::fuchsia_io::wire::ReadableReadRequest * request, ReadCompleter::Sync & completer)
Reads up to 'count' bytes at the seek offset.
The seek offset is moved forward by the number of bytes read.
## Invariants
* The returned `data.length` will never be greater than `count`.
* If `data.length` is less than `count`, it means that the seek offset
has reached the end of file as part of this operation.
* If `data.length` is zero while `count` is not, it means that the
seek offset is already at or beyond the end of file, and no data could
be read.
* If `count` is zero, the server should perform all the checks ensuring
read access without actually read anything, and return an empty
`data` vector.
This method requires the [`Rights.READ_BYTES`] right.
Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.
void WireServer ()
Defined at line 2909 of file fidling/gen/sdk/fidl/fuchsia.hardware.pty/fuchsia.hardware.pty/cpp/fidl/fuchsia.hardware.pty/cpp/wire_messaging.h
void Write (::fuchsia_io::wire::WritableWriteRequest * request, WriteCompleter::Sync & completer)
Writes data at the seek offset.
The seek offset is moved forward by the number of bytes written.
If the file is in append mode, the seek offset is first set to the end
of the file, followed by the write, in one atomic step.
The file size may grow if the seek offset plus `data.length` is beyond
the current end of file.
+ request `data` the byte buffer to write to the file.
- response `actual_count` the number of bytes written.
## Invariants
* The returned `actual_count` will never be greater than `data.length`.
* If the server is unable to write all the data due to e.g. not enough
space, `actual_count` may be less than `data.length`. If no bytes
could be written, an error is returned.
* If `data.length` is zero, the server should perform all the checks
ensuring write access without mutating the file and return a
successful write of zero bytes. The seek offset is still updated if
in append mode.
This method requires the [`Rights.WRITE_BYTES`] right.
void Describe (DescribeCompleter::Sync & completer)
void OpenClient (::fuchsia_hardware_pty::wire::DeviceOpenClientRequest * request, OpenClientCompleter::Sync & completer)
Open a client PTY device with a unique `id`. `client` should be a handle
to one endpoint of a channel that (on success) will become an open
connection to the newly created device. On failure, the channel will be
closed. Closing the channel will close the connection and release the
device. If the provided `id` is 0, then the new client is a controlling
client and has the capability to open additional clients. If the
current device is not a controlling client, `ZX_ERR_ACCESS_DENIED` will be
returned. If `id` is not unique, `ZX_ERR_INVALID_ARGS` will be returned.
Otherwise the status code from `device_add` is passed on.
void ClrSetFeature (::fuchsia_hardware_pty::wire::DeviceClrSetFeatureRequest * request, ClrSetFeatureCompleter::Sync & completer)
allowed on Client PTYs
-----------------------------
Clear and/or Set PTY Features
void GetWindowSize (GetWindowSizeCompleter::Sync & completer)
Obtain the window size (in character cells)
void MakeActive (::fuchsia_hardware_pty::wire::DeviceMakeActiveRequest * request, MakeActiveCompleter::Sync & completer)
allowed on the Controlling PTY
-------------------------------------
Select which Client PTY receives input.
Reads will simply block on non-active PTYs.
void ReadEvents (ReadEventsCompleter::Sync & completer)
Returns pending OOB events, simultaneously clearing them
void SetWindowSize (::fuchsia_hardware_pty::wire::DeviceSetWindowSizeRequest * request, SetWindowSizeCompleter::Sync & completer)
allowed on the Server PTY
--------------------------------
Sets the window size
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 2910 of file fidling/gen/sdk/fidl/fuchsia.hardware.pty/fuchsia.hardware.pty/cpp/fidl/fuchsia.hardware.pty/cpp/wire_messaging.h