struct ramdisk_client

Defined at line 48 of file ../../src/storage/lib/ramdevice_client/cpp/ramdisk.cc

TODO(https://446695911): Remove the C interface. Clients should use `ramdevice_client::Ramdisk`.

A client library for creating, configuring and manipulating ramdisks.

When creating a ramdisk, ensure the fuchsia.hardware.ramdisk.Service is available.

Then a ram device can be created and opened.

```

ramdisk_client_t* client;

ASSERT_EQ(ramdisk_create(512, 2048,

&client

), ZX_OK);

zx_handle_t block_client = ramdisk_get_block_interface(client);

```

Public Methods

ramdisk_client & operator= (const ramdisk_client & )

Defined at line 50 of file ../../src/storage/lib/ramdevice_client/cpp/ramdisk.cc

ramdisk_client & operator= (ramdisk_client && )

Defined at line 50 of file ../../src/storage/lib/ramdevice_client/cpp/ramdisk.cc

void ramdisk_client (const ramdisk_client & )

Defined at line 50 of file ../../src/storage/lib/ramdevice_client/cpp/ramdisk.cc

void ramdisk_client (ramdisk_client && )

Defined at line 50 of file ../../src/storage/lib/ramdevice_client/cpp/ramdisk.cc

zx_status_t Create (fidl::ClientEnd<fuchsia_io::Directory> outgoing_directory, zx::eventpair lifeline, std::unique_ptr<ramdisk_client> * out)

Defined at line 52 of file ../../src/storage/lib/ramdevice_client/cpp/ramdisk.cc

zx_status_t Rebind ()

Defined at line 90 of file ../../src/storage/lib/ramdevice_client/cpp/ramdisk.cc

zx_status_t Destroy ()

Defined at line 131 of file ../../src/storage/lib/ramdevice_client/cpp/ramdisk.cc

zx_status_t Forget ()

Destroy all open handles to the ramdisk, while leaving the ramdisk itself attached.

After calling this method, destroying this object will have no effect.

Defined at line 155 of file ../../src/storage/lib/ramdevice_client/cpp/ramdisk.cc

zx::result<fidl::ClientEnd<fuchsia_storage_block::Block>> Connect ()

Defined at line 165 of file ../../src/storage/lib/ramdevice_client/cpp/ramdisk.cc

fidl::UnownedClientEnd<fuchsia_device::Controller> controller_interface ()

Defined at line 177 of file ../../src/storage/lib/ramdevice_client/cpp/ramdisk.cc

fidl::UnownedClientEnd<fuchsia_hardware_ramdisk::Ramdisk> ramdisk_interface ()

Defined at line 181 of file ../../src/storage/lib/ramdevice_client/cpp/ramdisk.cc

fidl::UnownedClientEnd<fuchsia_storage_block::Block> block_interface ()

Defined at line 185 of file ../../src/storage/lib/ramdevice_client/cpp/ramdisk.cc

fidl::UnownedClientEnd<fuchsia_device::Controller> block_controller_interface ()

Defined at line 189 of file ../../src/storage/lib/ramdevice_client/cpp/ramdisk.cc

const fbl::String & path ()

Defined at line 193 of file ../../src/storage/lib/ramdevice_client/cpp/ramdisk.cc

void ~ramdisk_client ()

Defined at line 195 of file ../../src/storage/lib/ramdevice_client/cpp/ramdisk.cc