Mercurial > hg > orthanc-stone
comparison Framework/Oracle/WebAssemblyOracle.h @ 1229:b9f2a111c5b9 broker
fix compilation of WebAssemblyOracle
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 09 Dec 2019 14:41:37 +0100 |
parents | 008dbc4ceb62 |
children | b9b5d4378874 |
comparison
equal
deleted
inserted
replaced
1228:c471a0aa137b | 1229:b9f2a111c5b9 |
---|---|
39 | 39 |
40 namespace OrthancStone | 40 namespace OrthancStone |
41 { | 41 { |
42 class WebAssemblyOracle : | 42 class WebAssemblyOracle : |
43 public IOracle, | 43 public IOracle, |
44 public IObservable | 44 public IObservable, |
45 public IMessageEmitter | |
45 { | 46 { |
46 private: | 47 private: |
47 typedef std::map<std::string, std::string> HttpHeaders; | 48 typedef std::map<std::string, std::string> HttpHeaders; |
48 | 49 |
49 class TimeoutContext; | 50 class TimeoutContext; |
50 class Emitter; | |
51 class FetchContext; | 51 class FetchContext; |
52 class FetchCommand; | 52 class FetchCommand; |
53 | 53 |
54 void Execute(const IObserver& receiver, | 54 void Execute(boost::weak_ptr<IObserver> receiver, |
55 HttpCommand* command); | 55 HttpCommand* command); |
56 | 56 |
57 void Execute(const IObserver& receiver, | 57 void Execute(boost::weak_ptr<IObserver> receiver, |
58 OrthancRestApiCommand* command); | 58 OrthancRestApiCommand* command); |
59 | 59 |
60 void Execute(const IObserver& receiver, | 60 void Execute(boost::weak_ptr<IObserver> receiver, |
61 GetOrthancImageCommand* command); | 61 GetOrthancImageCommand* command); |
62 | 62 |
63 void Execute(const IObserver& receiver, | 63 void Execute(boost::weak_ptr<IObserver> receiver, |
64 GetOrthancWebViewerJpegCommand* command); | 64 GetOrthancWebViewerJpegCommand* command); |
65 | 65 |
66 IObservable oracleObservable_; | |
66 std::string orthancRoot_; | 67 std::string orthancRoot_; |
67 | 68 |
68 public: | 69 public: |
69 WebAssemblyOracle(MessageBroker& broker) : | 70 virtual void EmitMessage(boost::weak_ptr<IObserver> observer, |
70 IObservable(broker) | 71 const IMessage& message) ORTHANC_OVERRIDE |
71 { | 72 { |
73 oracleObservable_.EmitMessage(observer, message); | |
74 } | |
75 | |
76 virtual bool Schedule(boost::shared_ptr<IObserver> receiver, | |
77 IOracleCommand* command) ORTHANC_OVERRIDE; | |
78 | |
79 IObservable& GetOracleObservable() | |
80 { | |
81 return oracleObservable_; | |
72 } | 82 } |
73 | 83 |
74 void SetOrthancRoot(const std::string& root) | 84 void SetOrthancRoot(const std::string& root) |
75 { | 85 { |
76 orthancRoot_ = root; | 86 orthancRoot_ = root; |
77 } | 87 } |
78 | |
79 virtual void Schedule(boost::shared_ptr<IObserver>& receiver, | |
80 IOracleCommand* command) ORTHANC_OVERRIDE; | |
81 }; | 88 }; |
82 } | 89 } |