comparison Platforms/Generic/WebServiceCommandBase.h @ 274:dc1beee33134 am-2

split SdlApplication into NativeApplication and SdlApplication
author am@osimis.io
date Fri, 24 Aug 2018 13:52:55 +0200
parents 46c5296d867e
children 87376a645ee1
comparison
equal deleted inserted replaced
273:f21ba2468570 274:dc1beee33134
23 23
24 #include "IOracleCommand.h" 24 #include "IOracleCommand.h"
25 25
26 #include "../../Framework/Toolbox/IWebService.h" 26 #include "../../Framework/Toolbox/IWebService.h"
27 #include "../../Framework/Messages/IObservable.h" 27 #include "../../Framework/Messages/IObservable.h"
28 #include "../../Applications/Sdl/BasicSdlApplicationContext.h" 28 #include "../../Applications/Generic/BasicNativeApplicationContext.h"
29 29
30 #include <Core/WebServiceParameters.h> 30 #include <Core/WebServiceParameters.h>
31 31
32 #include <memory> 32 #include <memory>
33 33
41 std::string uri_; 41 std::string uri_;
42 std::map<std::string, std::string> headers_; 42 std::map<std::string, std::string> headers_;
43 std::auto_ptr<Orthanc::IDynamicObject> payload_; 43 std::auto_ptr<Orthanc::IDynamicObject> payload_;
44 bool success_; 44 bool success_;
45 std::string answer_; 45 std::string answer_;
46 BasicSdlApplicationContext& context_; 46 BasicNativeApplicationContext& context_;
47 47
48 public: 48 public:
49 WebServiceCommandBase(MessageBroker& broker, 49 WebServiceCommandBase(MessageBroker& broker,
50 IWebService::ICallback& callback, 50 IWebService::ICallback& callback,
51 const Orthanc::WebServiceParameters& parameters, 51 const Orthanc::WebServiceParameters& parameters,
52 const std::string& uri, 52 const std::string& uri,
53 const std::map<std::string, std::string>& headers, 53 const std::map<std::string, std::string>& headers,
54 Orthanc::IDynamicObject* payload /* takes ownership */, 54 Orthanc::IDynamicObject* payload /* takes ownership */,
55 BasicSdlApplicationContext& context); 55 BasicNativeApplicationContext& context);
56 56
57 virtual void Execute() = 0; 57 virtual void Execute() = 0;
58 58
59 virtual void Commit(); 59 virtual void Commit();
60 }; 60 };