Mercurial > hg > orthanc
diff OrthancServer/ServerIndex.cpp @ 436:d51186bf7602
read access to metadata
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 15 May 2013 16:28:00 +0200 |
parents | ccf3a0a43dac |
children | 7bbe77cb9e12 |
line wrap: on
line diff
--- a/OrthancServer/ServerIndex.cpp Wed May 15 15:57:05 2013 +0200 +++ b/OrthancServer/ServerIndex.cpp Wed May 15 16:28:00 2013 +0200 @@ -1140,6 +1140,22 @@ } + bool ServerIndex::ListAvailableMetadata(std::list<MetadataType>& target, + const std::string& publicId) + { + boost::mutex::scoped_lock lock(mutex_); + + ResourceType rtype; + int64_t id; + if (!db_->LookupResource(publicId, id, rtype)) + { + throw OrthancException(ErrorCode_UnknownResource); + } + + return db_->ListAvailableMetadata(target, id); + } + + bool ServerIndex::LookupParent(std::string& target, const std::string& publicId) {