comparison Framework/Applications/IBasicApplication.cpp @ 31:9aace933cb64

sharing code with the Orthanc core
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 16 Dec 2016 15:41:20 +0100
parents ff1e935768e7
children 7207a407bcd8
comparison
equal deleted inserted replaced
30:1099a148f7e5 31:9aace933cb64
32 32
33 #include "IBasicApplication.h" 33 #include "IBasicApplication.h"
34 34
35 #include "../../Resources/Orthanc/Core/Logging.h" 35 #include "../../Resources/Orthanc/Core/Logging.h"
36 #include "../../Resources/Orthanc/Core/HttpClient.h" 36 #include "../../Resources/Orthanc/Core/HttpClient.h"
37 #include "../Messaging/CurlOrthancConnection.h" 37 #include "../../Resources/Orthanc/Plugins/Samples/Common/OrthancHttpConnection.h"
38 #include "Sdl/SdlEngine.h" 38 #include "Sdl/SdlEngine.h"
39 39
40 namespace OrthancStone 40 namespace OrthancStone
41 { 41 {
42 // Anonymous namespace to avoid clashes against other compilation modules 42 // Anonymous namespace to avoid clashes against other compilation modules
206 { 206 {
207 webService.SetPassword(parameters["password"].as<std::string>()); 207 webService.SetPassword(parameters["password"].as<std::string>());
208 } 208 }
209 209
210 LOG(WARNING) << "URL to the Orthanc REST API: " << webService.GetUrl(); 210 LOG(WARNING) << "URL to the Orthanc REST API: " << webService.GetUrl();
211 CurlOrthancConnection orthanc(webService); 211 OrthancPlugins::OrthancHttpConnection orthanc(webService);
212 212
213 if (!MessagingToolbox::CheckOrthancVersion(orthanc)) 213 if (!MessagingToolbox::CheckOrthancVersion(orthanc))
214 { 214 {
215 LOG(ERROR) << "Your version of Orthanc is incompatible with Orthanc Stone, please upgrade"; 215 LOG(ERROR) << "Your version of Orthanc is incompatible with Orthanc Stone, please upgrade";
216 throw Orthanc::OrthancException(Orthanc::ErrorCode_NetworkProtocol); 216 throw Orthanc::OrthancException(Orthanc::ErrorCode_NetworkProtocol);