diff OrthancServer/Plugins/Engine/OrthancPluginDatabaseV4.cpp @ 5804:25df40a274fd find-refactoring

/changes: allowing filtering on multiple changes
author Alain Mazy <am@orthanc.team>
date Mon, 23 Sep 2024 15:40:27 +0200
parents f1ccb67fce31
children
line wrap: on
line diff
--- a/OrthancServer/Plugins/Engine/OrthancPluginDatabaseV4.cpp	Fri Sep 20 18:18:52 2024 +0200
+++ b/OrthancServer/Plugins/Engine/OrthancPluginDatabaseV4.cpp	Mon Sep 23 15:40:27 2024 +0200
@@ -631,7 +631,7 @@
                                     int64_t since,
                                     int64_t to,
                                     uint32_t limit,
-                                    ChangeType changeType) ORTHANC_OVERRIDE
+                                    const std::set<ChangeType>& changeTypes) ORTHANC_OVERRIDE
     {
       assert(database_.GetDatabaseCapabilities().HasExtendedChanges());
 
@@ -641,7 +641,11 @@
       request.mutable_get_changes_extended()->set_since(since);
       request.mutable_get_changes_extended()->set_limit(limit);
       request.mutable_get_changes_extended()->set_to(to);
-      request.mutable_get_changes_extended()->set_change_type(changeType);
+      for (std::set<ChangeType>::const_iterator it = changeTypes.begin(); it != changeTypes.end(); ++it)
+      {
+        request.mutable_get_changes_extended()->add_change_type(*it);
+      }
+      
       ExecuteTransaction(response, DatabasePluginMessages::OPERATION_GET_CHANGES_EXTENDED, request);
 
       done = response.get_changes_extended().done();