class UnownedFdioCaller

Defined at line 178 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h

Helper utility which allows a client to access an fd's underlying channel.

Does not take ownership of the fd, but prevents the fdio_t object

from being unbound from the fd.

Public Methods

void UnownedFdioCaller ()

Defined at line 180 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h

void UnownedFdioCaller (int fd)

Defined at line 182 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h

void UnownedFdioCaller (const fbl::unique_fd & fd)

Defined at line 183 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h

void ~UnownedFdioCaller ()

Defined at line 185 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h

void reset (int fd)

Defined at line 187 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h

void reset (const fbl::unique_fd & fd)

Defined at line 191 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h

bool operator bool ()

Defined at line 193 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h

zx_handle_t borrow_channel ()

This channel is borrowed, but returned as a zx_handle_t for convenience.

It should not be closed.

It should not be transferred.

It should not be kept alive longer than the UnownedFdioCaller object, nor should

it be kept alive after UnownedFdioCaller.reset() is called.

Defined at line 201 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h

zx::unowned_channel channel ()

Same as borrow_channel, but wrapped using libzx wrapper to signal

ownership.

Defined at line 205 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h

fidl::UnownedClientEnd<fuchsia_io::Node> node ()

Same as borrow_channel, but wrapped as a fuchsia.io/Node client channel.

Defined at line 208 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h

fidl::UnownedClientEnd<fuchsia_io::File> file ()

Same as borrow_channel, but wrapped as a fuchsia.io/File client channel.

Defined at line 211 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h

fidl::UnownedClientEnd<fuchsia_io::Directory> directory ()

Same as borrow_channel, but wrapped as a fuchsia.io/Directory client channel.

Defined at line 214 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h

template <typename T>
fidl::UnownedClientEnd<T> borrow_as ()

Same as borrow_channel but wrapped in a typed client channel.

Be careful to only use this if you know the type of the protocol being spoken.

Defined at line 221 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h

UnownedFdioCaller & operator= (UnownedFdioCaller && o)

Defined at line 225 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h

void UnownedFdioCaller (UnownedFdioCaller && o)

Defined at line 226 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h

void UnownedFdioCaller (const UnownedFdioCaller & )

Defined at line 227 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h

UnownedFdioCaller & operator= (const UnownedFdioCaller & )

Defined at line 228 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h