template <>
class WireServer
Defined at line 1378 of file fidling/gen/sdk/fidl/fuchsia.io/fuchsia.io/cpp/fidl/fuchsia.io/cpp/wire_messaging.h
Pure-virtual interface to be implemented by a server.
This interface uses typed channels (i.e. |::fidl::ClientEnd
<
::fuchsia_io::AdvisoryLocking>|
and |::fidl::ServerEnd
<
::fuchsia_io::AdvisoryLocking>|).
Public Methods
void AdvisoryLock (::fuchsia_io::wire::AdvisoryLockingAdvisoryLockRequest * request, AdvisoryLockCompleter::Sync & completer)
Acquires an advisory lock on the underlying file.
The lock lasts until either this connection is closed or
this method is called with |AdvisoryLockType.UNLOCK| to release the lock
explicitly.
Advisory locks are purely advisory. They do not prevent actual read or
write operations from occurring on the file, either through this
connection or through other connections.
This method requires the following rights:
* [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].
* [`Rights.WRITE_BYTES`] if `request.type` is
[`AdvisoryLockType.WRITE`].
# Errors
* `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For
example, another connection might hold a conflicting lock type.
* `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.
* `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights
to acquire the given type of lock.
void WireServer ()
Defined at line 1381 of file fidling/gen/sdk/fidl/fuchsia.io/fuchsia.io/cpp/fidl/fuchsia.io/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 1382 of file fidling/gen/sdk/fidl/fuchsia.io/fuchsia.io/cpp/fidl/fuchsia.io/cpp/wire_messaging.h