Mercurial > hg > orthanc-stone
comparison Platforms/Generic/WebServicePostCommand.h @ 251:192e6e349e69 am-2
first usage of new message system (in SDL only)
author | am@osimis.io |
---|---|
date | Mon, 02 Jul 2018 18:13:46 +0200 |
parents | 5412adf19980 |
children | 9afafb192180 |
comparison
equal
deleted
inserted
replaced
250:5e642859267e | 251:192e6e349e69 |
---|---|
19 **/ | 19 **/ |
20 | 20 |
21 | 21 |
22 #pragma once | 22 #pragma once |
23 | 23 |
24 #include "IOracleCommand.h" | 24 #include "WebServiceCommandBase.h" |
25 | |
26 #include "../../Framework/Toolbox/IWebService.h" | |
27 | |
28 #include <Core/WebServiceParameters.h> | |
29 | |
30 #include <memory> | |
31 | 25 |
32 namespace OrthancStone | 26 namespace OrthancStone |
33 { | 27 { |
34 class WebServicePostCommand : public IOracleCommand | 28 class WebServicePostCommand : public WebServiceCommandBase |
35 { | 29 { |
36 private: | 30 protected: |
37 IWebService::ICallback& callback_; | |
38 Orthanc::WebServiceParameters parameters_; | |
39 std::string uri_; | |
40 std::string body_; | 31 std::string body_; |
41 std::auto_ptr<Orthanc::IDynamicObject> payload_; | |
42 bool success_; | |
43 std::string answer_; | |
44 | 32 |
45 public: | 33 public: |
46 WebServicePostCommand(IWebService::ICallback& callback, | 34 WebServicePostCommand(MessageBroker& broker, |
35 IWebService::ICallback& callback, | |
47 const Orthanc::WebServiceParameters& parameters, | 36 const Orthanc::WebServiceParameters& parameters, |
48 const std::string& uri, | 37 const std::string& uri, |
49 const std::string& body, | 38 const std::string& body, |
50 Orthanc::IDynamicObject* payload /* takes ownership */); | 39 Orthanc::IDynamicObject* payload /* takes ownership */); |
51 | 40 |
52 virtual void Execute(); | 41 virtual void Execute(); |
53 | |
54 virtual void Commit(); | |
55 }; | 42 }; |
56 } | 43 } |