diff Applications/StoneApplicationContext.h @ 1068:04a95ee91327 broker

recovery of OrthancStoneSingleFrame
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 15 Oct 2019 19:36:57 +0200
parents e146743f6cdc
children 0ca50d275b9a
line wrap: on
line diff
--- a/Applications/StoneApplicationContext.h	Tue Oct 15 18:11:40 2019 +0200
+++ b/Applications/StoneApplicationContext.h	Tue Oct 15 19:36:57 2019 +0200
@@ -59,16 +59,15 @@
   class StoneApplicationContext : public boost::noncopyable
   {
   private:
-    Deprecated::IWebService*         webService_;
-    Deprecated::IDelayedCallExecutor*            delayedCallExecutor_;
-    std::auto_ptr<Deprecated::OrthancApiClient>  orthanc_;
+    boost::shared_ptr<Deprecated::IWebService>     webService_;
+    Deprecated::IDelayedCallExecutor*  delayedCallExecutor_;   // TODO => shared_ptr ??
+    boost::shared_ptr<Deprecated::OrthancApiClient>  orthanc_;
     std::string                      orthancBaseUrl_;
 
     void InitializeOrthanc();
 
   public:
     StoneApplicationContext() :
-      webService_(NULL),
       delayedCallExecutor_(NULL)
     {
     }
@@ -77,16 +76,11 @@
     {
     }
 
-    bool HasWebService() const
-    {
-      return webService_ != NULL;
-    }
+    boost::shared_ptr<Deprecated::IWebService> GetWebService();
 
-    Deprecated::IWebService& GetWebService();
+    boost::shared_ptr<Deprecated::OrthancApiClient> GetOrthancApiClient();
 
-    Deprecated::OrthancApiClient& GetOrthancApiClient();
-
-    void SetWebService(Deprecated::IWebService& webService);
+    void SetWebService(boost::shared_ptr<Deprecated::IWebService> webService);
 
     void SetOrthancBaseUrl(const std::string& baseUrl);