Asylo
Public Types | Public Member Functions | Public Attributes | List of all members
asylo::primitives::ExitHandler Class Reference

Callback structure for dispatching messages from the enclave. More...

#include <asylo/platform/primitives/untrusted_primitives.h>

Public Types

using Callback = std::function< Status(std::shared_ptr< class Client > enclave, void *context, MessageReader *input, MessageWriter *output)>
 

Public Member Functions

 ExitHandler ()
 
 ExitHandler (Callback callback)
 Initializes an exit handler with a callback. More...
 
 ExitHandler (Callback callback, void *context)
 Initializes an exit handler with a callback and a context pointer. More...
 
bool IsNull () const
 A predicate for whether the callback is initialized. More...
 
 operator bool () const
 Implicit bool conversion for null checks. More...
 

Public Attributes

Callback callback
 Callback function to invoke for this exit. More...
 
void * context
 Uninterpreted data passed by the runtime to invocations of the handler. More...
 

Detailed Description

Callback structure for dispatching messages from the enclave.

Member Typedef Documentation

◆ Callback

using asylo::primitives::ExitHandler::Callback = std::function<Status(std::shared_ptr<class Client> enclave, void *context, MessageReader *input, MessageWriter *output)>

Constructor & Destructor Documentation

◆ ExitHandler() [1/3]

asylo::primitives::ExitHandler::ExitHandler ( )
inline

◆ ExitHandler() [2/3]

asylo::primitives::ExitHandler::ExitHandler ( Callback  callback)
inlineexplicit

Initializes an exit handler with a callback.

Parameters
callbackThe callback this handler uses.

◆ ExitHandler() [3/3]

asylo::primitives::ExitHandler::ExitHandler ( Callback  callback,
void *  context 
)
inline

Initializes an exit handler with a callback and a context pointer.

Parameters
callbackThe callback this handler uses.
contextA type-erased non-owned pointer that is passed to the callback when called. Since an ExitHandler is registered in an client-global context, the object should live as long as the client.

Member Function Documentation

◆ IsNull()

bool asylo::primitives::ExitHandler::IsNull ( ) const
inline

A predicate for whether the callback is initialized.

Returns
true if this handler is uninitialized.

◆ operator bool()

asylo::primitives::ExitHandler::operator bool ( ) const
inline

Implicit bool conversion for null checks.

Member Data Documentation

◆ callback

Callback asylo::primitives::ExitHandler::callback

Callback function to invoke for this exit.

◆ context

void* asylo::primitives::ExitHandler::context

Uninterpreted data passed by the runtime to invocations of the handler.


The documentation for this class was generated from the following file: