Mercurial > hg > orthanc
comparison OrthancServer/ServerIndex.cpp @ 928:882833632b1f mac
integration mainline -> mac
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 16 Apr 2014 17:02:07 +0200 |
parents | ec69658b031b |
children | 67e6400fca03 401a9633e492 |
comparison
equal
deleted
inserted
replaced
927:ff1812962f30 | 928:882833632b1f |
---|---|
253 { | 253 { |
254 unsigned int sleep; | 254 unsigned int sleep; |
255 | 255 |
256 try | 256 try |
257 { | 257 { |
258 boost::mutex::scoped_lock lock(that->mutex_); | |
258 std::string sleepString = that->db_->GetGlobalProperty(GlobalProperty_FlushSleep); | 259 std::string sleepString = that->db_->GetGlobalProperty(GlobalProperty_FlushSleep); |
259 sleep = boost::lexical_cast<unsigned int>(sleepString); | 260 sleep = boost::lexical_cast<unsigned int>(sleepString); |
260 } | 261 } |
261 catch (boost::bad_lexical_cast&) | 262 catch (boost::bad_lexical_cast&) |
262 { | 263 { |
1236 | 1237 |
1237 return db_->LookupMetadata(target, id, type); | 1238 return db_->LookupMetadata(target, id, type); |
1238 } | 1239 } |
1239 | 1240 |
1240 | 1241 |
1241 bool ServerIndex::ListAvailableMetadata(std::list<MetadataType>& target, | 1242 void ServerIndex::ListAvailableMetadata(std::list<MetadataType>& target, |
1242 const std::string& publicId) | 1243 const std::string& publicId) |
1243 { | 1244 { |
1244 boost::mutex::scoped_lock lock(mutex_); | 1245 boost::mutex::scoped_lock lock(mutex_); |
1245 | 1246 |
1246 ResourceType rtype; | 1247 ResourceType rtype; |
1248 if (!db_->LookupResource(publicId, id, rtype)) | 1249 if (!db_->LookupResource(publicId, id, rtype)) |
1249 { | 1250 { |
1250 throw OrthancException(ErrorCode_UnknownResource); | 1251 throw OrthancException(ErrorCode_UnknownResource); |
1251 } | 1252 } |
1252 | 1253 |
1253 return db_->ListAvailableMetadata(target, id); | 1254 db_->ListAvailableMetadata(target, id); |
1254 } | 1255 } |
1255 | 1256 |
1256 | 1257 |
1257 void ServerIndex::ListAvailableAttachments(std::list<FileContentType>& target, | 1258 void ServerIndex::ListAvailableAttachments(std::list<FileContentType>& target, |
1258 const std::string& publicId, | 1259 const std::string& publicId, |