18 #ifndef LUNCHBOX_REQUESTHANDLER_H 19 #define LUNCHBOX_REQUESTHANDLER_H 22 #include <lunchbox/thread.h> 24 #include <servus/uint128_t.h> 54 LUNCHBOX_API ~RequestHandler();
85 LUNCHBOX_API
void unregisterRequest(
const uint32_t requestID);
101 LUNCHBOX_API
bool waitRequest(
102 const uint32_t requestID,
void*& result,
106 LUNCHBOX_API
bool waitRequest(
107 const uint32_t requestID, uint32_t& result,
110 LUNCHBOX_API
bool waitRequest(
111 const uint32_t requestID,
bool& result,
114 LUNCHBOX_API
bool waitRequest(
115 const uint32_t requestID, servus::uint128_t& result,
118 LUNCHBOX_API
bool waitRequest(
const uint32_t requestID);
127 LUNCHBOX_API
void* getRequestData(
const uint32_t requestID);
136 LUNCHBOX_API
void serveRequest(
const uint32_t requestID,
void* result = 0);
138 LUNCHBOX_API
void serveRequest(
const uint32_t requestID, uint32_t result);
140 LUNCHBOX_API
void serveRequest(
const uint32_t requestID,
bool result);
142 LUNCHBOX_API
void serveRequest(
const uint32_t requestID,
143 const servus::uint128_t& result);
148 LUNCHBOX_API
bool hasPendingRequests()
const;
150 LUNCHBOX_API
bool isRequestReady(
const uint32_t)
const;
153 detail::RequestHandler*
const _impl;
155 LUNCHBOX_API uint32_t _register(
void* data);
160 #include <lunchbox/request.h> 171 #endif // LUNCHBOX_REQUESTHANDLER_H Defines export visibility macros for library Lunchbox.
Basic type definitions not provided by the operating system.
uint32_t registerRequest(void *data=0)
Register a request.
#define LB_TIMEOUT_INDEFINITE
Constant defining 'wait forever' in methods with wait parameters.
A Future implementation for a RequestHandler request.
Abstraction layer and common utilities for multi-threaded programming.
A thread-safe request handler.
Request< T > registerRequest(void *data=0)
Register a request.