Mercurial > hg > orthanc-stone
view Deprecated/Platforms/Wasm/WasmDelayedCallExecutor.cpp @ 1442:11f291ac3ef5 legacy-loader-refactoring
This branch is useless.
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 26 May 2020 10:11:49 +0200 |
parents | 419d0320c344 |
children | 828a9b4ee1b7 |
line wrap: on
line source
#include "WasmDelayedCallExecutor.h" #include "json/value.h" #include "json/writer.h" #include <emscripten/emscripten.h> #ifdef __cplusplus extern "C" { #endif extern void WasmDelayedCallExecutor_Schedule(void* callable, unsigned int timeoutInMs /*void* payload*/); void EMSCRIPTEN_KEEPALIVE WasmDelayedCallExecutor_ExecuteCallback(void* callable //void* payload ) { if (callable == NULL) { throw; } else { reinterpret_cast<OrthancStone::MessageHandler<Deprecated::IDelayedCallExecutor::TimeoutMessage>*>(callable)-> Apply(Deprecated::IDelayedCallExecutor::TimeoutMessage()); // uri, reinterpret_cast<Orthanc::IDynamicObject*>(payload))); } } #ifdef __cplusplus } #endif namespace Deprecated { OrthancStone::MessageBroker* WasmDelayedCallExecutor::broker_ = NULL; void WasmDelayedCallExecutor::Schedule(OrthancStone::MessageHandler<IDelayedCallExecutor::TimeoutMessage>* callback, unsigned int timeoutInMs) { WasmDelayedCallExecutor_Schedule(callback, timeoutInMs); } }