Mercurial > hg > orthanc-stone
comparison Framework/Oracle/GetOrthancWebViewerJpegCommand.h @ 1135:a0a33e5ea5bb broker
IOracleCommand::Clone()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 06 Nov 2019 17:34:58 +0100 |
parents | 87fbeb823375 |
children | 0ca50d275b9a |
comparison
equal
deleted
inserted
replaced
1134:87fbeb823375 | 1135:a0a33e5ea5bb |
---|---|
33 class GetOrthancWebViewerJpegCommand : public OracleCommandBase | 33 class GetOrthancWebViewerJpegCommand : public OracleCommandBase |
34 { | 34 { |
35 public: | 35 public: |
36 typedef std::map<std::string, std::string> HttpHeaders; | 36 typedef std::map<std::string, std::string> HttpHeaders; |
37 | 37 |
38 class SuccessMessage : public OracleMessageBase | 38 class SuccessMessage : public OriginMessage<GetOrthancWebViewerJpegCommand> |
39 { | 39 { |
40 ORTHANC_STONE_MESSAGE(__FILE__, __LINE__); | 40 ORTHANC_STONE_MESSAGE(__FILE__, __LINE__); |
41 | 41 |
42 private: | 42 private: |
43 const Orthanc::ImageAccessor& image_; | 43 const Orthanc::ImageAccessor& image_; |
44 | 44 |
45 public: | 45 public: |
46 SuccessMessage(GetOrthancWebViewerJpegCommand& command, | 46 SuccessMessage(const GetOrthancWebViewerJpegCommand& command, |
47 const Orthanc::ImageAccessor& image) : | 47 const Orthanc::ImageAccessor& image) : |
48 OracleMessageBase(command), | 48 OriginMessage(command), |
49 image_(image) | 49 image_(image) |
50 { | 50 { |
51 } | 51 } |
52 | 52 |
53 const Orthanc::ImageAccessor& GetImage() const | 53 const Orthanc::ImageAccessor& GetImage() const |
62 unsigned int quality_; | 62 unsigned int quality_; |
63 HttpHeaders headers_; | 63 HttpHeaders headers_; |
64 unsigned int timeout_; | 64 unsigned int timeout_; |
65 Orthanc::PixelFormat expectedFormat_; | 65 Orthanc::PixelFormat expectedFormat_; |
66 | 66 |
67 GetOrthancWebViewerJpegCommand(const GetOrthancWebViewerJpegCommand& other) : | |
68 instanceId_(other.instanceId_), | |
69 frame_(other.frame_), | |
70 quality_(other.quality_), | |
71 headers_(other.headers_), | |
72 timeout_(other.timeout_), | |
73 expectedFormat_(other.expectedFormat_) | |
74 { | |
75 } | |
76 | |
67 public: | 77 public: |
68 GetOrthancWebViewerJpegCommand(); | 78 GetOrthancWebViewerJpegCommand(); |
69 | 79 |
70 virtual Type GetType() const | 80 virtual Type GetType() const |
71 { | 81 { |
72 return Type_GetOrthancWebViewerJpeg; | 82 return Type_GetOrthancWebViewerJpeg; |
83 } | |
84 | |
85 virtual IOracleCommand* Clone() const | |
86 { | |
87 return new GetOrthancWebViewerJpegCommand(*this); | |
73 } | 88 } |
74 | 89 |
75 void SetExpectedPixelFormat(Orthanc::PixelFormat format) | 90 void SetExpectedPixelFormat(Orthanc::PixelFormat format) |
76 { | 91 { |
77 expectedFormat_ = format; | 92 expectedFormat_ = format; |
132 | 147 |
133 std::string GetUri() const; | 148 std::string GetUri() const; |
134 | 149 |
135 void ProcessHttpAnswer(boost::weak_ptr<IObserver> receiver, | 150 void ProcessHttpAnswer(boost::weak_ptr<IObserver> receiver, |
136 IMessageEmitter& emitter, | 151 IMessageEmitter& emitter, |
137 const std::string& answer); | 152 const std::string& answer) const; |
138 }; | 153 }; |
139 } | 154 } |