class ComponentContext

Defined at line 31 of file ../../src/sys/fuzzing/common/component-context.h

Aliases to simplify passing around the unique context.

Public Members

static const uint32_t kRegistrarId
static const uint32_t kCoverageId

Public Methods

ComponentContextPtr Create ()

Creates a component context. This method consumes startup handles in order to serve FIDL

protocols, and can therefore be called at most once per process.

Defined at line 12 of file ../../src/sys/fuzzing/common/component-context.cc

ComponentContextPtr CreateAuxillary ()

Creates an "auxiliary" context that does not have an outgoing directory. Such a context can

only be used for creating FIDL clients, but does not consume any startup handles and thus does

not preclude creating other component contexts.

Defined at line 31 of file ../../src/sys/fuzzing/common/component-context.cc

void ComponentContext ()

Defined at line 42 of file ../../src/sys/fuzzing/common/component-context.h

void ~ComponentContext ()

Defined at line 43 of file ../../src/sys/fuzzing/common/component-context.cc

const ExecutorPtr & executor ()

Defined at line 45 of file ../../src/sys/fuzzing/common/component-context.h

zx::channel TakeChannel (uint32_t arg)

Takes the |PA_HND(PA_USER0, arg)| startup handle.

Defined at line 51 of file ../../src/sys/fuzzing/common/component-context.cc

template <typename Interface>
zx_status_t AddPublicService (fidl::InterfaceRequestHandler<Interface> handler)

Adds an interface request handler for a protocol capability provided by this component.

Defined at line 56 of file ../../src/sys/fuzzing/common/component-context.h

zx_status_t Run ()

Runs the message loop on the current thread. This method should only be called at most once.

Defined at line 56 of file ../../src/sys/fuzzing/common/component-context.cc

template <typename Interface>
zx_status_t Connect (fidl::InterfaceRequest<Interface> request)

Connects a |request| to a protocol capability provided by another component.

Defined at line 63 of file ../../src/sys/fuzzing/common/component-context.h

zx_status_t RunUntilIdle ()

Runs until there are no tasks that can make progress.

Defined at line 66 of file ../../src/sys/fuzzing/common/component-context.cc

template <typename Interface>
fidl::InterfaceRequestHandler<Interface> MakeRequestHandler ()

Returns a handler to connect |request|s to a protocol capability provided by another component.

Defined at line 69 of file ../../src/sys/fuzzing/common/component-context.h

template <typename Task>
void ScheduleTask (Task task)

Schedules a task to be executed when |Run| is invoked.

Defined at line 77 of file ../../src/sys/fuzzing/common/component-context.h

Protected Methods

void set_executor (ExecutorPtr executor)

Defined at line 92 of file ../../src/sys/fuzzing/common/component-context.h

void set_svc (ServiceDirectoryPtr svc)

Defined at line 93 of file ../../src/sys/fuzzing/common/component-context.h