template <>
class WireSyncBufferClientImpl
Defined at line 922 of file fidling/gen/sdk/fidl/fuchsia.hardware.block.verified/fuchsia.hardware.block.verified/cpp/fidl/fuchsia.hardware.block.verified/cpp/wire_messaging.h
Public Methods
::fidl::WireUnownedResult< ::fuchsia_hardware_block_verified::DeviceManager::OpenForWrite> OpenForWrite (::fuchsia_hardware_block_verified::wire::Config config)
Requests that the driver format the underlying block device as described
by the parameters in `config`, and enter `authoring` mode.
If `config` has any unpopulated fields, or those fields contain enum
values that are not known to this version of the driver, this method
will return `ZX_ERR_INVALID_ARGS`.
If the device was not in `closed` mode at the time of the call, this
method will return `ZX_ERR_BAD_STATE`.
If the underlying block device returns an error, this method will return
that same error code.
On success, the driver will enter `authoring` mode, expose a child
device named `mutable` which speaks the `fuchsia.hardware.block`
protocol in the device tree, then return.
Caller provides the backing storage for FIDL message via an argument to `.buffer()`.
::fidl::WireUnownedResult< ::fuchsia_hardware_block_verified::DeviceManager::CloseAndGenerateSeal> CloseAndGenerateSeal ()
Requests that the device in `authoring` mode:
* unbind the child device named `mutable`
* regenerate the integrity data necessary to provide the guarantees
expected by `OpenForVerifiedRead`
* flush all writes to the underlying block device
* switch to `closed` mode
* return a `Seal` that can be used to ensure that any data read in the
future from this device matches that which was written prior to this
particular call of `CloseAndGenerateSeal`.
If the device was not in "authoring" mode at the time of the call, this
function will return `ZX_ERR_BAD_STATE` and have no visible side effects.
If the underlying block device returns a failure while regenerating
integrity data or flushing writes, the device will enter the `failed` mode
and this call will propagate that error.
On success, the returned `seal` will contain a hash of the device
superblock that should be stored in tamper-proof storage, so it can be
retrieved and presented in a future `OpenForVerifiedRead` call.
Caller provides the backing storage for FIDL message via an argument to `.buffer()`.
::fidl::WireUnownedResult< ::fuchsia_hardware_block_verified::DeviceManager::OpenForVerifiedRead> OpenForVerifiedRead (::fuchsia_hardware_block_verified::wire::Config config, ::fuchsia_hardware_block_verified::wire::Seal seal)
Requests that the device verify that the provided `config` matches the
one on disk, and that the given `seal` covers the content of the
superblock. If all match as expected, then the device will bind a child
device named `verified` which speaks the `fuchsia.hardware.block`
protocol and enter the `verified-read` mode. Reads issued to the
`verified` block device will either successfully return the same content
as the `mutable` block device would have returned at the time the volume
was authored, or return a failure. That is to say: modifying the
underlying storage will cause the `verified` device to return read
failures for any modified blocks as `ZX_ERR_IO_DATA_INTEGRITY` rather
than data other than what was present at the time `CloseAndGenerateSeal`
was called.
* Returns `ZX_ERR_BAD_STATE` if the device was not in the `closed`
state at the time of the call
* Returns `ZX_ERR_INVALID_ARGS` if `config` lacks either `hash_function` or `block_size`
* Returns `ZX_ERR_INVALID_ARGS` if `seal` is of an unrecognized variant
* Returns `ZX_ERR_IO_DATA_INTEGRITY` if the `seal` provided is inconsistent with
the superblock, or if the properties in `config` are inconsistent with the
configuration data stored in the superblock on the underlying block device.
* Returns the underlying I/O error code if the underlying block device
returns an error.
On success, the device binds a child device `verified`, enters
`verified-read` mode, and returns from this call.
Caller provides the backing storage for FIDL message via an argument to `.buffer()`.
::fidl::WireUnownedResult< ::fuchsia_hardware_block_verified::DeviceManager::Close> Close ()
Requests that the device in either `authoring` mode or `verified-read` mode
unbind any child devices and return to `closed` mode.
Returns `ZX_ERR_BAD_STATE` if the device is not in `authoring` or
`verified-read` mode at the time of the call.
On success, the device does the following:
* If the device was in `authoring` mode, removes the child `mutable` device
* If the device was in `verified-read` mode, removes the child `verified` device
* Enters `closed` mode.
* Returns from this call
Caller provides the backing storage for FIDL message via an argument to `.buffer()`.