Mercurial > hg > orthanc-stone
comparison Platforms/Generic/OracleDelayedCallExecutor.h @ 726:4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 21 May 2019 11:43:25 +0200 |
parents | 26b90b110719 |
children | c35e98d22764 |
comparison
equal
deleted
inserted
replaced
714:d2c0e347ddc2 | 726:4f2416d519b4 |
---|---|
24 #include "../../Framework/Toolbox/IDelayedCallExecutor.h" | 24 #include "../../Framework/Toolbox/IDelayedCallExecutor.h" |
25 #include "Oracle.h" | 25 #include "Oracle.h" |
26 #include "../../Applications/Generic/NativeStoneApplicationContext.h" | 26 #include "../../Applications/Generic/NativeStoneApplicationContext.h" |
27 #include "DelayedCallCommand.h" | 27 #include "DelayedCallCommand.h" |
28 | 28 |
29 namespace OrthancStone | 29 namespace Deprecated |
30 { | 30 { |
31 // The OracleTimeout executes callbacks after a delay. | 31 // The OracleTimeout executes callbacks after a delay. |
32 class OracleDelayedCallExecutor : public IDelayedCallExecutor | 32 class OracleDelayedCallExecutor : public IDelayedCallExecutor |
33 { | 33 { |
34 private: | 34 private: |
35 Oracle& oracle_; | 35 Oracle& oracle_; |
36 NativeStoneApplicationContext& context_; | 36 OrthancStone::NativeStoneApplicationContext& context_; |
37 | 37 |
38 public: | 38 public: |
39 OracleDelayedCallExecutor(MessageBroker& broker, | 39 OracleDelayedCallExecutor(OrthancStone::MessageBroker& broker, |
40 Oracle& oracle, | 40 Oracle& oracle, |
41 NativeStoneApplicationContext& context) : | 41 OrthancStone::NativeStoneApplicationContext& context) : |
42 IDelayedCallExecutor(broker), | 42 IDelayedCallExecutor(broker), |
43 oracle_(oracle), | 43 oracle_(oracle), |
44 context_(context) | 44 context_(context) |
45 { | 45 { |
46 } | 46 } |
47 | 47 |
48 virtual void Schedule(MessageHandler<IDelayedCallExecutor::TimeoutMessage>* callback, | 48 virtual void Schedule(OrthancStone::MessageHandler<IDelayedCallExecutor::TimeoutMessage>* callback, |
49 unsigned int timeoutInMs = 1000) | 49 unsigned int timeoutInMs = 1000) |
50 { | 50 { |
51 oracle_.Submit(new DelayedCallCommand(broker_, callback, timeoutInMs, NULL, context_)); | 51 oracle_.Submit(new DelayedCallCommand(broker_, callback, timeoutInMs, NULL, context_)); |
52 } | 52 } |
53 }; | 53 }; |