comparison OrthancServer/OrthancInitialization.cpp @ 1587:d7e569640d09

New function "GetOrthancConfiguration()" to get the Orthanc configuration
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 26 Aug 2015 12:12:25 +0200
parents 33d34bc4ac15
children d73124f6b439
comparison
equal deleted inserted replaced
1586:e088bc2c3a1a 1587:d7e569640d09
894 { 894 {
895 return CreateFilesystemStorage(); 895 return CreateFilesystemStorage();
896 } 896 }
897 897
898 898
899
900 void Configuration::GetConfiguration(Json::Value& result)
901 {
902 boost::mutex::scoped_lock lock(globalMutex_);
903 result = configuration_;
904 }
905
906
899 void Configuration::FormatConfiguration(std::string& result) 907 void Configuration::FormatConfiguration(std::string& result)
900 { 908 {
901 Json::Value config; 909 Json::Value config;
902 910 GetConfiguration(config);
903 {
904 boost::mutex::scoped_lock lock(globalMutex_);
905 config = configuration_;
906 }
907 911
908 Json::StyledWriter w; 912 Json::StyledWriter w;
909 result = w.write(config); 913 result = w.write(config);
910 } 914 }
911 } 915 }