Mercurial > hg > orthanc
comparison OrthancServer/Plugins/Engine/OrthancPluginDatabaseV3.cpp @ 4615:b91ed9e7f43c db-changes
minor api improvements in OrthancCDatabasePlugin.h
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 14 Apr 2021 11:20:05 +0200 |
parents | f75c63aa9de0 |
children | 95ffe3b6ef7c |
comparison
equal
deleted
inserted
replaced
4614:67d112ef680f | 4615:b91ed9e7f43c |
---|---|
716 | 716 |
717 | 717 |
718 virtual bool LookupParent(int64_t& parentId, | 718 virtual bool LookupParent(int64_t& parentId, |
719 int64_t resourceId) ORTHANC_OVERRIDE | 719 int64_t resourceId) ORTHANC_OVERRIDE |
720 { | 720 { |
721 CheckSuccess(that_.backend_.lookupParent(transaction_, resourceId)); | 721 uint8_t existing; |
722 CheckNoEvent(); | 722 CheckSuccess(that_.backend_.lookupParent(transaction_, &existing, &parentId, resourceId)); |
723 return ReadSingleInt64Answer(parentId); | 723 CheckNoEvent(); |
724 return (existing != 0); | |
724 } | 725 } |
725 | 726 |
726 | 727 |
727 virtual bool LookupResource(int64_t& id, | 728 virtual bool LookupResource(int64_t& id, |
728 ResourceType& type, | 729 ResourceType& type, |
745 } | 746 } |
746 | 747 |
747 | 748 |
748 virtual bool SelectPatientToRecycle(int64_t& internalId) ORTHANC_OVERRIDE | 749 virtual bool SelectPatientToRecycle(int64_t& internalId) ORTHANC_OVERRIDE |
749 { | 750 { |
750 CheckSuccess(that_.backend_.selectPatientToRecycle(transaction_)); | 751 uint8_t available; |
751 CheckNoEvent(); | 752 CheckSuccess(that_.backend_.selectPatientToRecycle(transaction_, &available, &internalId)); |
752 return ReadSingleInt64Answer(internalId); | 753 CheckNoEvent(); |
754 return (available != 0); | |
753 } | 755 } |
754 | 756 |
755 | 757 |
756 virtual bool SelectPatientToRecycle(int64_t& internalId, | 758 virtual bool SelectPatientToRecycle(int64_t& internalId, |
757 int64_t patientIdToAvoid) ORTHANC_OVERRIDE | 759 int64_t patientIdToAvoid) ORTHANC_OVERRIDE |
758 { | 760 { |
759 CheckSuccess(that_.backend_.selectPatientToRecycle2(transaction_, patientIdToAvoid)); | 761 uint8_t available; |
760 CheckNoEvent(); | 762 CheckSuccess(that_.backend_.selectPatientToRecycle2(transaction_, &available, &internalId, patientIdToAvoid)); |
761 return ReadSingleInt64Answer(internalId); | 763 CheckNoEvent(); |
764 return (available != 0); | |
762 } | 765 } |
763 | 766 |
764 | 767 |
765 virtual void SetGlobalProperty(GlobalProperty property, | 768 virtual void SetGlobalProperty(GlobalProperty property, |
766 bool shared, | 769 bool shared, |