Mercurial > hg > orthanc-stone
comparison Platforms/Generic/DelayedCallCommand.cpp @ 1059:e713f1a99861 broker
replacing MessageBroker by weak_ptr
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 11 Oct 2019 17:08:34 +0200 |
parents | 4f2416d519b4 |
children | 21c2b0eee53c |
comparison
equal
deleted
inserted
replaced
1058:a36c47487a70 | 1059:e713f1a99861 |
---|---|
24 | 24 |
25 #include <iostream> | 25 #include <iostream> |
26 | 26 |
27 namespace Deprecated | 27 namespace Deprecated |
28 { | 28 { |
29 DelayedCallCommand::DelayedCallCommand(OrthancStone::MessageBroker& broker, | 29 DelayedCallCommand::DelayedCallCommand(OrthancStone::MessageHandler<IDelayedCallExecutor::TimeoutMessage>* callback, // takes ownership |
30 OrthancStone::MessageHandler<IDelayedCallExecutor::TimeoutMessage>* callback, // takes ownership | |
31 unsigned int timeoutInMs, | 30 unsigned int timeoutInMs, |
32 Orthanc::IDynamicObject* payload /* takes ownership */, | 31 Orthanc::IDynamicObject* payload /* takes ownership */, |
33 OrthancStone::NativeStoneApplicationContext& context | 32 OrthancStone::NativeStoneApplicationContext& context |
34 ) : | 33 ) : |
35 IObservable(broker), | |
36 callback_(callback), | 34 callback_(callback), |
37 payload_(payload), | 35 payload_(payload), |
38 context_(context), | 36 context_(context), |
39 expirationTimePoint_(boost::posix_time::microsec_clock::local_time() + boost::posix_time::milliseconds(timeoutInMs)), | 37 expirationTimePoint_(boost::posix_time::microsec_clock::local_time() + boost::posix_time::milliseconds(timeoutInMs)), |
40 timeoutInMs_(timeoutInMs) | 38 timeoutInMs_(timeoutInMs) |