comparison Applications/StoneApplicationContext.cpp @ 1068:04a95ee91327 broker

recovery of OrthancStoneSingleFrame
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 15 Oct 2019 19:36:57 +0200
parents b537002f83a9
children 0ca50d275b9a
comparison
equal deleted inserted replaced
1067:05b2e71ed145 1068:04a95ee91327
34 34
35 orthanc_.reset(new Deprecated::OrthancApiClient(*webService_, orthancBaseUrl_)); 35 orthanc_.reset(new Deprecated::OrthancApiClient(*webService_, orthancBaseUrl_));
36 } 36 }
37 37
38 38
39 Deprecated::IWebService& StoneApplicationContext::GetWebService() 39 boost::shared_ptr<Deprecated::IWebService> StoneApplicationContext::GetWebService()
40 { 40 {
41 if (webService_ == NULL) 41 if (webService_ == NULL)
42 { 42 {
43 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); 43 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
44 } 44 }
45 45
46 return *webService_; 46 return webService_;
47 } 47 }
48 48
49 49
50 Deprecated::OrthancApiClient& StoneApplicationContext::GetOrthancApiClient() 50 boost::shared_ptr<Deprecated::OrthancApiClient> StoneApplicationContext::GetOrthancApiClient()
51 { 51 {
52 if (orthanc_.get() == NULL) 52 if (orthanc_.get() == NULL)
53 { 53 {
54 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); 54 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
55 } 55 }
56 56
57 return *orthanc_; 57 return orthanc_;
58 } 58 }
59 59
60 60
61 void StoneApplicationContext::SetWebService(Deprecated::IWebService& webService) 61 void StoneApplicationContext::SetWebService(boost::shared_ptr<Deprecated::IWebService> webService)
62 { 62 {
63 webService_ = &webService; 63 webService_ = webService;
64 InitializeOrthanc(); 64 InitializeOrthanc();
65 } 65 }
66 66
67 67
68 void StoneApplicationContext::SetOrthancBaseUrl(const std::string& baseUrl) 68 void StoneApplicationContext::SetOrthancBaseUrl(const std::string& baseUrl)