Mercurial > hg > orthanc-stone
view Platforms/Wasm/WasmDelayedCallExecutor.cpp @ 1370:28eb7106ef44 broker
Changes to GuiAdapter to allow it to work correctly with both new and old
Emscripten event selection rules that are defined by the DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR linker flag.
Doc has been added to GuiAdapter.cpp, should you require more info on
what has been done.
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Mon, 20 Apr 2020 13:08:43 +0200 |
parents | 4f2416d519b4 |
children |
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); } }