comparison Framework/Plugins/OrthancCppDatabasePlugin.h @ 74:a4e440e65c68 db-changes

rename
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 04 Jan 2019 17:24:30 +0100
parents d40c5fecd160
children 52c70007bb87
comparison
equal deleted inserted replaced
73:aa81c1c80c75 74:a4e440e65c68
249 249
250 OrthancPluginDatabaseAnswerExportedResource(context_, database_, &exported); 250 OrthancPluginDatabaseAnswerExportedResource(context_, database_, &exported);
251 } 251 }
252 252
253 253
254 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 254 #if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1
255 void AnswerMatchingResource(const std::string& resourceId) 255 void AnswerMatchingResource(const std::string& resourceId)
256 { 256 {
257 if (allowedAnswers_ != AllowedAnswers_All && 257 if (allowedAnswers_ != AllowedAnswers_All &&
258 allowedAnswers_ != AllowedAnswers_MatchingResource) 258 allowedAnswers_ != AllowedAnswers_MatchingResource)
259 { 259 {
267 OrthancPluginDatabaseAnswerMatchingResource(context_, database_, &match); 267 OrthancPluginDatabaseAnswerMatchingResource(context_, database_, &match);
268 } 268 }
269 #endif 269 #endif
270 270
271 271
272 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 272 #if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1
273 void AnswerMatchingResource(const std::string& resourceId, 273 void AnswerMatchingResource(const std::string& resourceId,
274 const std::string& someInstanceId) 274 const std::string& someInstanceId)
275 { 275 {
276 if (allowedAnswers_ != AllowedAnswers_All && 276 if (allowedAnswers_ != AllowedAnswers_All &&
277 allowedAnswers_ != AllowedAnswers_MatchingResource) 277 allowedAnswers_ != AllowedAnswers_MatchingResource)
491 491
492 virtual void ClearMainDicomTags(int64_t internalId) = 0; 492 virtual void ClearMainDicomTags(int64_t internalId) = 0;
493 493
494 virtual bool HasCreateInstance() const = 0; 494 virtual bool HasCreateInstance() const = 0;
495 495
496 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 496 #if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1
497 virtual void LookupResources(const std::vector<Orthanc::DatabaseConstraint>& lookup, 497 virtual void LookupResources(const std::vector<Orthanc::DatabaseConstraint>& lookup,
498 OrthancPluginResourceType queryLevel, 498 OrthancPluginResourceType queryLevel,
499 uint32_t limit, 499 uint32_t limit,
500 bool requestSomeInstance) = 0; 500 bool requestSomeInstance) = 0;
501 #endif 501 #endif
502 502
503 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 503 #if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1
504 virtual void CreateInstance(OrthancPluginCreateInstanceResult& result, 504 virtual void CreateInstance(OrthancPluginCreateInstanceResult& result,
505 const char* hashPatient, 505 const char* hashPatient,
506 const char* hashStudy, 506 const char* hashStudy,
507 const char* hashSeries, 507 const char* hashSeries,
508 const char* hashInstance) 508 const char* hashInstance)
1483 } 1483 }
1484 ORTHANC_PLUGINS_DATABASE_CATCH 1484 ORTHANC_PLUGINS_DATABASE_CATCH
1485 } 1485 }
1486 1486
1487 1487
1488 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 1488 #if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1
1489 /* Use GetOutput().AnswerResource() */ 1489 /* Use GetOutput().AnswerResource() */
1490 static OrthancPluginErrorCode LookupResources( 1490 static OrthancPluginErrorCode LookupResources(
1491 OrthancPluginDatabaseContext* context, 1491 OrthancPluginDatabaseContext* context,
1492 void* payload, 1492 void* payload,
1493 uint32_t constraintsCount, 1493 uint32_t constraintsCount,
1515 ORTHANC_PLUGINS_DATABASE_CATCH 1515 ORTHANC_PLUGINS_DATABASE_CATCH
1516 } 1516 }
1517 #endif 1517 #endif
1518 1518
1519 1519
1520 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 1520 #if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1
1521 static OrthancPluginErrorCode CreateInstance(OrthancPluginCreateInstanceResult* output, 1521 static OrthancPluginErrorCode CreateInstance(OrthancPluginCreateInstanceResult* output,
1522 void* payload, 1522 void* payload,
1523 const char* hashPatient, 1523 const char* hashPatient,
1524 const char* hashStudy, 1524 const char* hashStudy,
1525 const char* hashSeries, 1525 const char* hashSeries,
1614 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 4, 0) 1614 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 4, 0)
1615 extensions.lookupIdentifierRange = LookupIdentifierRange; // New in Orthanc 1.4.0 1615 extensions.lookupIdentifierRange = LookupIdentifierRange; // New in Orthanc 1.4.0
1616 # endif 1616 # endif
1617 #endif 1617 #endif
1618 1618
1619 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 1619 #if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1
1620 extensions.lookupResources = LookupResources; // New in Orthanc 1.5.2 (fast lookup) 1620 extensions.lookupResources = LookupResources; // New in Orthanc 1.5.2 (fast lookup)
1621 1621
1622 if (backend.HasCreateInstance()) 1622 if (backend.HasCreateInstance())
1623 { 1623 {
1624 extensions.createInstance = CreateInstance; // New in Orthanc 1.5.2 (fast create) 1624 extensions.createInstance = CreateInstance; // New in Orthanc 1.5.2 (fast create)