Callback structure for dispatching messages passed to the enclave.
More...
#include <asylo/platform/primitives/trusted_primitives.h>
|
using | Callback = PrimitiveStatus(*)(void *context, MessageReader *in, MessageWriter *out) |
| The type of all handler callbacks takes a type-erased context, a MessageReader from which to consume inputs, and a MessageWriter in which to write all return values. More...
|
|
Callback structure for dispatching messages passed to the enclave.
Each EntryHandler represents a call to inside the enclave, and will be registered with TrustedPrimitives::RegisterEntryHandler.
◆ Callback
The type of all handler callbacks takes a type-erased context, a MessageReader from which to consume inputs, and a MessageWriter in which to write all return values.
◆ EntryHandler() [1/3]
asylo::primitives::EntryHandler::EntryHandler |
( |
| ) |
|
|
inline |
Constructs a null handler.
◆ EntryHandler() [2/3]
asylo::primitives::EntryHandler::EntryHandler |
( |
Callback |
callback | ) |
|
|
inlineexplicit |
Constructs an entry handler with a callback and null context.
- Parameters
-
callback | The callback this handler uses. |
◆ EntryHandler() [3/3]
asylo::primitives::EntryHandler::EntryHandler |
( |
Callback |
callback, |
|
|
void * |
context |
|
) |
| |
|
inline |
Initializes an entry handler with a callback and a context pointer.
- Parameters
-
callback | The callback this handler uses. |
context | A type-erased non-owned pointer that is passed to the callback when called. Since an EntryHandler is registered in an enclave-global context, the object should live as long as the enclave. |
◆ IsNull()
bool asylo::primitives::EntryHandler::IsNull |
( |
| ) |
const |
|
inline |
A predicate for whether the callback is initialized.
- Returns
- true if this handler is uninitialized.
◆ operator bool()
asylo::primitives::EntryHandler::operator bool |
( |
| ) |
const |
|
inline |
Implicit bool conversion for null checks.
◆ callback
Callback asylo::primitives::EntryHandler::callback |
Callback function to invoke for this entry.
◆ context
void* asylo::primitives::EntryHandler::context |
Uninterpreted data passed by the runtime to invocations of the handler.
The documentation for this class was generated from the following file: