Mercurial > hg > orthanc-stone
diff Applications/StoneApplicationContext.h @ 417:aee3d7941c9b
preparing to load images using DICOMweb
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 15 Nov 2018 17:28:15 +0100 |
parents | 72355b637945 |
children | c23df8b3433b |
line wrap: on
line diff
--- a/Applications/StoneApplicationContext.h Tue Nov 13 10:36:53 2018 +0100 +++ b/Applications/StoneApplicationContext.h Thu Nov 15 17:28:15 2018 +0100 @@ -22,6 +22,7 @@ #pragma once #include "../Framework/Toolbox/IWebService.h" +#include "../Framework/Toolbox/OrthancApiClient.h" #include "../Framework/Viewport/WidgetViewport.h" #include <list> @@ -34,25 +35,31 @@ // the StoneApplication can perform HTTP requests. In a WASM environment, // the WebService is provided by the browser while, in a native environment, // the WebService is provided by the OracleWebService (a C++ Http client) + class StoneApplicationContext : public boost::noncopyable { + protected: + // TODO ADD THE MessageBroker HERE + + IWebService* webService_; + std::auto_ptr<OrthancApiClient> orthanc_; - protected: - IWebService* webService_; public: - StoneApplicationContext() - : webService_(NULL) + StoneApplicationContext() : + webService_(NULL) { } - IWebService& GetWebService() {return *webService_;} - void SetWebService(IWebService& webService) - { - webService_ = &webService; - } - virtual ~StoneApplicationContext() { } + + IWebService& GetWebService(); + + OrthancApiClient& GetOrthancApiClient(); + + void Initialize(MessageBroker& broker, + IWebService& webService, + const std::string& orthancBaseUrl); }; }