Mercurial > hg > orthanc-stone
view Platforms/Wasm/WasmWebService.h @ 247:3d523c9a8f0d am
trying to use boost::signals2 even more.
author | am@osimis.io |
---|---|
date | Mon, 02 Jul 2018 12:32:02 +0200 |
parents | ddbb339ed4cf |
children |
line wrap: on
line source
#pragma once #include <Framework/Toolbox/IWebService.h> namespace OrthancStone { class WasmWebService : public IWebService { private: std::string base_; // Private constructor => Singleton design pattern WasmWebService() : base_("../../") // note: this is configurable from the JS code by calling WasmWebService_SetBaseUrl { } public: static WasmWebService& GetInstance() { static WasmWebService instance; return instance; } void SetBaseUrl(const std::string base); virtual void ScheduleGetRequest(IWebServiceObserver* observer, boost::shared_ptr<boost::noncopyable> tracker, const std::string& uri, Orthanc::IDynamicObject* payload); virtual void SchedulePostRequest(IWebServiceObserver* observer, boost::shared_ptr<boost::noncopyable> tracker, const std::string& uri, const std::string& body, Orthanc::IDynamicObject* payload); virtual void Start() { } virtual void Stop() { } }; }