class FdioCaller
Defined at line 28 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h
Helper utility which borrows a file descriptor to allow the caller
to make access to channel-based calls.
FdioCaller consumes |fd|, but the same |fd| may be re-acquired by
calling "release()" on the FdioCaller object.
This class is movable, but not copyable.
Public Methods
void FdioCaller ()
Defined at line 30 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h
void FdioCaller (fbl::unique_fd fd)
Defined at line 32 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h
FdioCaller & operator= (FdioCaller && o)
Defined at line 35 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h
void FdioCaller (FdioCaller && o)
Defined at line 41 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h
void FdioCaller (const FdioCaller & )
Defined at line 42 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h
FdioCaller & operator= (const FdioCaller & )
Defined at line 43 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h
void ~FdioCaller ()
Defined at line 45 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h
void reset (fbl::unique_fd fd)
Defined at line 47 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h
fbl::unique_fd release ()
Defined at line 53 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h
bool operator bool ()
Defined at line 61 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h
const fbl::unique_fd & fd ()
Returns a const reference to the underlying fd.
The reference to |fd| must not outlast the lifetime of the FdioCaller.
Defined at line 66 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 FdioCaller object, nor should
it be kept alive after FdioCaller.release() is called.
Defined at line 74 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 78 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h
zx::result<zx::channel> clone_channel ()
This channel is cloned.
The returned channel can outlive the FdioCaller object.
Defined at line 82 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h
zx::result<zx::channel> take_channel ()
This channel is taken.
After this call this FdioCaller object and the channel that was passed in are invalid.
Defined at line 93 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 104 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 107 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 110 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h
zx::result<fidl::ClientEnd<fuchsia_io::Node>> clone_node ()
Same as clone_channel, but wrapped as a fuchsia.io/Node client channel.
Defined at line 115 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h
zx::result<fidl::ClientEnd<fuchsia_io::File>> clone_file ()
Same as clone_channel, but wrapped as a fuchsia.io/File client channel.
Defined at line 120 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h
zx::result<fidl::ClientEnd<fuchsia_io::Directory>> clone_directory ()
Same as clone_channel, but wrapped as a fuchsia.io/Directory client channel.
Defined at line 125 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h
zx::result<fidl::ClientEnd<fuchsia_io::Node>> take_node ()
Same as take_channel, but wrapped as a fuchsia.io/Node client channel.
Defined at line 130 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h
zx::result<fidl::ClientEnd<fuchsia_io::File>> take_file ()
Same as take_channel, but wrapped as a fuchsia.io/File client channel.
Defined at line 133 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h
zx::result<fidl::ClientEnd<fuchsia_io::Directory>> take_directory ()
Same as take_channel, but wrapped as a fuchsia.io/Directory client channel.
Defined at line 136 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 143 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h
template <typename T>
zx::result<fidl::ClientEnd<T>> clone_as ()
Same as clone_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 150 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h
template <typename T>
zx::result<fidl::ClientEnd<T>> take_as ()
Same as take_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 161 of file ../../zircon/system/ulib/fdio-caller/include/lib/fdio/cpp/caller.h