Mercurial > hg > orthanc-databases
comparison Framework/Plugins/IDatabaseBackend.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 |
comparison
equal
deleted
inserted
replaced
390:eb80f7c5e7d8 | 391:d14e6ff04a5c |
---|---|
269 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 | 269 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 |
270 virtual void LookupResources(IDatabaseBackendOutput& output, | 270 virtual void LookupResources(IDatabaseBackendOutput& output, |
271 DatabaseManager& manager, | 271 DatabaseManager& manager, |
272 const std::vector<Orthanc::DatabaseConstraint>& lookup, | 272 const std::vector<Orthanc::DatabaseConstraint>& lookup, |
273 OrthancPluginResourceType queryLevel, | 273 OrthancPluginResourceType queryLevel, |
274 const std::set<std::string>& withLabels, // New in Orthanc 1.12.0 | |
275 const std::set<std::string>& withoutLabels, // New in Orthanc 1.12.0 | |
274 uint32_t limit, | 276 uint32_t limit, |
275 bool requestSomeInstance) = 0; | 277 bool requestSomeInstance) = 0; |
276 #endif | 278 #endif |
277 | 279 |
278 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 | 280 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 |
305 virtual int64_t GetLastChangeIndex(DatabaseManager& manager) = 0; | 307 virtual int64_t GetLastChangeIndex(DatabaseManager& manager) = 0; |
306 | 308 |
307 virtual void TagMostRecentPatient(DatabaseManager& manager, | 309 virtual void TagMostRecentPatient(DatabaseManager& manager, |
308 int64_t patientId) = 0; | 310 int64_t patientId) = 0; |
309 | 311 |
310 #if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in 1.3.1 | |
311 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 5, 4) | |
312 // NB: "parentPublicId" must be cleared if the resource has no parent | 312 // NB: "parentPublicId" must be cleared if the resource has no parent |
313 virtual bool LookupResourceAndParent(int64_t& id, | 313 virtual bool LookupResourceAndParent(int64_t& id, |
314 OrthancPluginResourceType& type, | 314 OrthancPluginResourceType& type, |
315 std::string& parentPublicId, | 315 std::string& parentPublicId, |
316 DatabaseManager& manager, | 316 DatabaseManager& manager, |
317 const char* publicId) = 0; | 317 const char* publicId) = 0; |
318 # endif | 318 |
319 #endif | |
320 | |
321 #if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in 1.3.1 | |
322 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 5, 4) | |
323 virtual void GetAllMetadata(std::map<int32_t, std::string>& result, | 319 virtual void GetAllMetadata(std::map<int32_t, std::string>& result, |
324 DatabaseManager& manager, | 320 DatabaseManager& manager, |
325 int64_t id) = 0; | 321 int64_t id) = 0; |
326 # endif | 322 |
327 #endif | 323 // New in Orthanc 1.12.0 |
324 virtual bool HasLabelsSupport() const = 0; | |
325 | |
326 // New in Orthanc 1.12.0 | |
327 virtual void AddLabel(int64_t resource, | |
328 const std::string& label) = 0; | |
329 | |
330 // New in Orthanc 1.12.0 | |
331 virtual void RemoveLabel(int64_t resource, | |
332 const std::string& label) = 0; | |
333 | |
334 // New in Orthanc 1.12.0 | |
335 virtual void ListLabels(std::set<std::string>& target, | |
336 int64_t resource) = 0; | |
328 }; | 337 }; |
329 } | 338 } |