template <>

class WireServer

Defined at line 1317 of file fidling/gen/sdk/fidl/fuchsia.hardware.skipblock/fuchsia.hardware.skipblock/cpp/fidl/fuchsia.hardware.skipblock/cpp/wire_messaging.h

Pure-virtual interface to be implemented by a server.

This interface uses typed channels (i.e. |::fidl::ClientEnd

<

::fuchsia_hardware_skipblock::SkipBlock>|

and |::fidl::ServerEnd

<

::fuchsia_hardware_skipblock::SkipBlock>|).

Public Methods

void GetPartitionInfo (GetPartitionInfoCompleter::Sync & completer)

Returns information about the skip-block partition.

The block count can shrink in the event that a bad block is grown. It is

recommended to call this again after a bad block is grown.

void Read (::fuchsia_hardware_skipblock::wire::SkipBlockReadRequest * request, ReadCompleter::Sync & completer)

Reads the specified blocks into the provided vmo.

void WireServer ()

Defined at line 1320 of file fidling/gen/sdk/fidl/fuchsia.hardware.skipblock/fuchsia.hardware.skipblock/cpp/fidl/fuchsia.hardware.skipblock/cpp/wire_messaging.h

void Write (::fuchsia_hardware_skipblock::wire::SkipBlockWriteRequest * request, WriteCompleter::Sync & completer)

Erases and writes the specified blocks from the provided vmo.

In the event that bad block is grown, the partition will shrink and

`bad_block_grown` will be set to true. Since this causes the logical to

physical block map to change, all previously written blocks at logical

addresses after the section being written should be considered corrupted,

and rewritten if applicable.

void WriteBytes (::fuchsia_hardware_skipblock::wire::SkipBlockWriteBytesRequest * request, WriteBytesCompleter::Sync & completer)

Erases and writes the specified bytes from the provided vmo. If offset

and size in `op` are not aligned to `block_size_bytes` then the driver will

first read the partitially written blocks and combine them with the

provided vmo.

In the event that bad block is grown, the partition will shrink and

`bad_block_grown` will be set to true. Since this causes the logical to

physical block map to change, all previously written blocks at logical

addresses after the section being written should be considered corrupted,

and rewritten if applicable.

void WriteBytesWithoutErase (::fuchsia_hardware_skipblock::wire::SkipBlockWriteBytesWithoutEraseRequest * request, WriteBytesWithoutEraseCompleter::Sync & completer)

Similar to WriteBytes except that it does not erase before writing

to a block, and it will simply abort when any error, including bad block

grown, occurs. The service is intended to be used for fine-tune optimization to reduce

NAND PE cycles.

It should be noted that the caller must follow the requirements of the NAND chip.

Not all chips support write-without-erase, and those that do usually require writing

only to empty pages and in order (i.e. from the LSB page to MSB page within a block)

Failure to follow these requirements is undefined behavior, and may result in unexpected

changes to the NAND even outside the given write range and crc errors that leave the

storage in an unreadable state.

The safe way of using this method is to first back up the data in the minimal

block range that covers the write range. If the method returns failure, fall back and

re-write the backed-up data (can be updated with the new data) to the minimal block

range using either WriteBytes or Write method.

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 1321 of file fidling/gen/sdk/fidl/fuchsia.hardware.skipblock/fuchsia.hardware.skipblock/cpp/fidl/fuchsia.hardware.skipblock/cpp/wire_messaging.h