comparison 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
comparison
equal deleted inserted replaced
1067:05b2e71ed145 1068:04a95ee91327
57 // the WebService is provided by the OracleWebService (a C++ Http client) 57 // the WebService is provided by the OracleWebService (a C++ Http client)
58 58
59 class StoneApplicationContext : public boost::noncopyable 59 class StoneApplicationContext : public boost::noncopyable
60 { 60 {
61 private: 61 private:
62 Deprecated::IWebService* webService_; 62 boost::shared_ptr<Deprecated::IWebService> webService_;
63 Deprecated::IDelayedCallExecutor* delayedCallExecutor_; 63 Deprecated::IDelayedCallExecutor* delayedCallExecutor_; // TODO => shared_ptr ??
64 std::auto_ptr<Deprecated::OrthancApiClient> orthanc_; 64 boost::shared_ptr<Deprecated::OrthancApiClient> orthanc_;
65 std::string orthancBaseUrl_; 65 std::string orthancBaseUrl_;
66 66
67 void InitializeOrthanc(); 67 void InitializeOrthanc();
68 68
69 public: 69 public:
70 StoneApplicationContext() : 70 StoneApplicationContext() :
71 webService_(NULL),
72 delayedCallExecutor_(NULL) 71 delayedCallExecutor_(NULL)
73 { 72 {
74 } 73 }
75 74
76 virtual ~StoneApplicationContext() 75 virtual ~StoneApplicationContext()
77 { 76 {
78 } 77 }
79 78
80 bool HasWebService() const 79 boost::shared_ptr<Deprecated::IWebService> GetWebService();
81 {
82 return webService_ != NULL;
83 }
84 80
85 Deprecated::IWebService& GetWebService(); 81 boost::shared_ptr<Deprecated::OrthancApiClient> GetOrthancApiClient();
86 82
87 Deprecated::OrthancApiClient& GetOrthancApiClient(); 83 void SetWebService(boost::shared_ptr<Deprecated::IWebService> webService);
88
89 void SetWebService(Deprecated::IWebService& webService);
90 84
91 void SetOrthancBaseUrl(const std::string& baseUrl); 85 void SetOrthancBaseUrl(const std::string& baseUrl);
92 86
93 void SetDelayedCallExecutor(Deprecated::IDelayedCallExecutor& delayedCallExecutor) 87 void SetDelayedCallExecutor(Deprecated::IDelayedCallExecutor& delayedCallExecutor)
94 { 88 {