comparison 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
comparison
equal deleted inserted replaced
435:28ba73274919 436:d51186bf7602
1138 1138
1139 return db_->LookupMetadata(target, id, type); 1139 return db_->LookupMetadata(target, id, type);
1140 } 1140 }
1141 1141
1142 1142
1143 bool ServerIndex::ListAvailableMetadata(std::list<MetadataType>& target,
1144 const std::string& publicId)
1145 {
1146 boost::mutex::scoped_lock lock(mutex_);
1147
1148 ResourceType rtype;
1149 int64_t id;
1150 if (!db_->LookupResource(publicId, id, rtype))
1151 {
1152 throw OrthancException(ErrorCode_UnknownResource);
1153 }
1154
1155 return db_->ListAvailableMetadata(target, id);
1156 }
1157
1158
1143 bool ServerIndex::LookupParent(std::string& target, 1159 bool ServerIndex::LookupParent(std::string& target,
1144 const std::string& publicId) 1160 const std::string& publicId)
1145 { 1161 {
1146 boost::mutex::scoped_lock lock(mutex_); 1162 boost::mutex::scoped_lock lock(mutex_);
1147 1163