comparison Plugins/Engine/OrthancPluginDatabase.cpp @ 3089:fb8ee0786b1e db-changes

new extension for database plugin SDK: setResourcesContent
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 05 Jan 2019 11:39:31 +0100
parents c829758b9ca0
children 476cba12c2b0
comparison
equal deleted inserted replaced
3088:d498ece73562 3089:fb8ee0786b1e
1279 tag.GetGroup(), tag.GetElement(), 1279 tag.GetGroup(), tag.GetElement(),
1280 start.c_str(), end.c_str())); 1280 start.c_str(), end.c_str()));
1281 ForwardAnswers(result); 1281 ForwardAnswers(result);
1282 } 1282 }
1283 } 1283 }
1284
1285
1286 void OrthancPluginDatabase::SetResourcesContent(const Orthanc::ResourcesContent& content)
1287 {
1288 if (extensions_.setResourcesContent == NULL)
1289 {
1290 ISetResourcesContent::Apply(*this, content);
1291 }
1292 else
1293 {
1294 std::vector<OrthancPluginResourcesContentTags> identifierTags;
1295 std::vector<OrthancPluginResourcesContentTags> mainDicomTags;
1296 std::vector<OrthancPluginResourcesContentMetadata> metadata;
1297 content.EncodeForPlugins(identifierTags, mainDicomTags, metadata);
1298
1299 CheckSuccess(extensions_.setResourcesContent(
1300 payload_,
1301 identifierTags.size(),
1302 (identifierTags.empty() ? NULL : &identifierTags[0]),
1303 mainDicomTags.size(),
1304 (mainDicomTags.empty() ? NULL : &mainDicomTags[0]),
1305 metadata.size(),
1306 (metadata.empty() ? NULL : &metadata[0])));
1307 }
1308 }
1284 } 1309 }