diff 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
line wrap: on
line diff
--- a/Platforms/Generic/WebServicePostCommand.h	Mon Jul 02 16:36:17 2018 +0200
+++ b/Platforms/Generic/WebServicePostCommand.h	Mon Jul 02 18:13:46 2018 +0200
@@ -21,36 +21,23 @@
 
 #pragma once
 
-#include "IOracleCommand.h"
-
-#include "../../Framework/Toolbox/IWebService.h"
-
-#include <Core/WebServiceParameters.h>
-
-#include <memory>
+#include "WebServiceCommandBase.h"
 
 namespace OrthancStone
 {
-  class WebServicePostCommand : public IOracleCommand
+  class WebServicePostCommand : public WebServiceCommandBase
   {
-  private:
-    IWebService::ICallback&                 callback_;
-    Orthanc::WebServiceParameters           parameters_;
-    std::string                             uri_;
+  protected:
     std::string                             body_;
-    std::auto_ptr<Orthanc::IDynamicObject>  payload_;
-    bool                                    success_;
-    std::string                             answer_;
 
   public:
-    WebServicePostCommand(IWebService::ICallback& callback,
+    WebServicePostCommand(MessageBroker& broker,
+                          IWebService::ICallback& callback,
                           const Orthanc::WebServiceParameters& parameters,
                           const std::string& uri,
                           const std::string& body,
                           Orthanc::IDynamicObject* payload /* takes ownership */);
 
     virtual void Execute();
-
-    virtual void Commit();
   };
 }