template <typename T>

class AsyncLoopOwnedEventHandler

Defined at line 23 of file ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h

Mixin for representing a type that represents an RPC handler and is owned

by an async loop. The loop will own both the wrapped type and the RPC

connection handle.

Deriving classes should define and implement this function:

static void HandleEvent(std::unique_ptr

<T

> event,

async_dispatcher_t* dispatcher, async::WaitBase* wait,

zx_status_t status, const zx_packet_signal_t* signal);

Public Methods

void AsyncLoopOwnedEventHandler<T> (zx::event event)

Defined at line 25 of file ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h

void ~AsyncLoopOwnedEventHandler<T> ()

Defined at line 28 of file ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h

std::unique_ptr<T> Cancel ()

Defined at line 35 of file ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h

zx_status_t BeginWait (std::unique_ptr<T> event, async_dispatcher_t * dispatcher)

Begins waiting in |dispatcher| on |event->wait|. This transfers ownership

of |event| to the dispatcher. The dispatcher returns ownership when the

handler is invoked.

Defined at line 46 of file ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h

void HandleEvent (async_dispatcher_t * dispatcher, async::WaitBase * wait, zx_status_t status, const zx_packet_signal_t * signal)

Entrypoint for the event handler that captures the pointer ownership

semantics.

Defined at line 56 of file ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h

zx::unowned_event event ()

Defined at line 62 of file ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h

zx::event set_event (zx::event h)

Sets the event to the given handle and returns the old value

Defined at line 65 of file ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h