diff Platforms/Wasm/WasmWebService.h @ 236:f73d722d98c8 am

renamed folder
author am@osimis.io
date Tue, 19 Jun 2018 16:06:32 +0200
parents Platforms/WebAssembly/WasmWebService.h@d7b2590744f8
children b4642964c355
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Platforms/Wasm/WasmWebService.h	Tue Jun 19 16:06:32 2018 +0200
@@ -0,0 +1,44 @@
+#pragma once
+
+#include <Framework/Toolbox/IWebService.h>
+
+namespace OrthancStone
+{
+  class WasmWebService : public IWebService
+  {
+  private:
+    std::string  base_;
+
+    // Private constructor => Singleton design pattern
+    WasmWebService() :
+      base_("../../")
+    {
+    }
+
+  public:
+    static WasmWebService& GetInstance()
+    {
+      static WasmWebService instance;
+      return instance;
+    }
+
+    void SetBaseUrl(const std::string base);
+
+    virtual void ScheduleGetRequest(ICallback& callback,
+                                    const std::string& uri,
+                                    Orthanc::IDynamicObject* payload);
+
+    virtual void SchedulePostRequest(ICallback& callback,
+                                     const std::string& uri,
+                                     const std::string& body,
+                                     Orthanc::IDynamicObject* payload);
+
+    virtual void Start()
+    {
+    }
+    
+    virtual void Stop()
+    {
+    }
+  };
+}