Mercurial > hg > orthanc-databases
diff Framework/Plugins/IndexBackend.h @ 391:d14e6ff04a5c db-protobuf
added primitives to handle labels
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 05 Apr 2023 12:09:46 +0200 |
parents | 3d6886f3e5b3 |
children | 7b3acfa95bd8 |
line wrap: on
line diff
--- a/Framework/Plugins/IndexBackend.h Wed Apr 05 11:18:08 2023 +0200 +++ b/Framework/Plugins/IndexBackend.h Wed Apr 05 12:09:46 2023 +0200 @@ -302,6 +302,8 @@ DatabaseManager& manager, const std::vector<Orthanc::DatabaseConstraint>& lookup, OrthancPluginResourceType queryLevel, + const std::set<std::string>& withLabels, + const std::set<std::string>& withoutLabels, uint32_t limit, bool requestSomeInstance) ORTHANC_OVERRIDE; #endif @@ -327,25 +329,17 @@ virtual void TagMostRecentPatient(DatabaseManager& manager, int64_t patient) ORTHANC_OVERRIDE; -#if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in 1.3.1 -# if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 5, 4) // New primitive since Orthanc 1.5.4 virtual bool LookupResourceAndParent(int64_t& id, OrthancPluginResourceType& type, std::string& parentPublicId, DatabaseManager& manager, const char* publicId) ORTHANC_OVERRIDE; -# endif -#endif -#if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in 1.3.1 -# if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 5, 4) // New primitive since Orthanc 1.5.4 virtual void GetAllMetadata(std::map<int32_t, std::string>& result, DatabaseManager& manager, int64_t id) ORTHANC_OVERRIDE; -# endif -#endif virtual bool HasCreateInstance() const ORTHANC_OVERRIDE { @@ -387,6 +381,15 @@ int32_t property, int value); + virtual void AddLabel(int64_t resource, + const std::string& label) ORTHANC_OVERRIDE; + + virtual void RemoveLabel(int64_t resource, + const std::string& label) ORTHANC_OVERRIDE; + + virtual void ListLabels(std::set<std::string>& target, + int64_t resource) ORTHANC_OVERRIDE; + /** * "maxDatabaseRetries" is to handle * "OrthancPluginErrorCode_DatabaseCannotSerialize" if there is a