Mercurial > hg > orthanc-stone
comparison Deprecated/Platforms/Wasm/WasmDelayedCallExecutor.cpp @ 1400:419d0320c344
moved Platforms into Deprecated
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Wed, 29 Apr 2020 20:45:14 +0200 |
parents | Platforms/Wasm/WasmDelayedCallExecutor.cpp@4f2416d519b4 |
children | 828a9b4ee1b7 |
comparison
equal
deleted
inserted
replaced
1399:ff8d2e46ac63 | 1400:419d0320c344 |
---|---|
1 #include "WasmDelayedCallExecutor.h" | |
2 #include "json/value.h" | |
3 #include "json/writer.h" | |
4 #include <emscripten/emscripten.h> | |
5 | |
6 #ifdef __cplusplus | |
7 extern "C" { | |
8 #endif | |
9 | |
10 extern void WasmDelayedCallExecutor_Schedule(void* callable, | |
11 unsigned int timeoutInMs | |
12 /*void* payload*/); | |
13 | |
14 void EMSCRIPTEN_KEEPALIVE WasmDelayedCallExecutor_ExecuteCallback(void* callable | |
15 //void* payload | |
16 ) | |
17 { | |
18 if (callable == NULL) | |
19 { | |
20 throw; | |
21 } | |
22 else | |
23 { | |
24 reinterpret_cast<OrthancStone::MessageHandler<Deprecated::IDelayedCallExecutor::TimeoutMessage>*>(callable)-> | |
25 Apply(Deprecated::IDelayedCallExecutor::TimeoutMessage()); // uri, reinterpret_cast<Orthanc::IDynamicObject*>(payload))); | |
26 } | |
27 } | |
28 | |
29 | |
30 #ifdef __cplusplus | |
31 } | |
32 #endif | |
33 | |
34 | |
35 | |
36 namespace Deprecated | |
37 { | |
38 OrthancStone::MessageBroker* WasmDelayedCallExecutor::broker_ = NULL; | |
39 | |
40 | |
41 void WasmDelayedCallExecutor::Schedule(OrthancStone::MessageHandler<IDelayedCallExecutor::TimeoutMessage>* callback, | |
42 unsigned int timeoutInMs) | |
43 { | |
44 WasmDelayedCallExecutor_Schedule(callback, timeoutInMs); | |
45 } | |
46 } |