diff Framework/Plugins/DatabaseBackendAdapterV3.cpp @ 221:73cc85f3d9c1

implementation of the "serverIdentifier" information for global properties
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 30 Mar 2021 10:40:34 +0200
parents 821d4ba83dc3
children c8e06b41feec
line wrap: on
line diff
--- a/Framework/Plugins/DatabaseBackendAdapterV3.cpp	Mon Mar 29 16:39:20 2021 +0200
+++ b/Framework/Plugins/DatabaseBackendAdapterV3.cpp	Tue Mar 30 10:40:34 2021 +0200
@@ -1490,6 +1490,7 @@
 
 
   static OrthancPluginErrorCode LookupGlobalProperty(OrthancPluginDatabaseTransaction* transaction,
+                                                     const char* serverIdentifier,
                                                      int32_t property)
   {
     DatabaseBackendAdapterV3::Transaction* t = reinterpret_cast<DatabaseBackendAdapterV3::Transaction*>(transaction);
@@ -1499,7 +1500,7 @@
       t->GetOutput().Clear();
 
       std::string s;
-      if (t->GetBackend().LookupGlobalProperty(s, property))
+      if (t->GetBackend().LookupGlobalProperty(s, serverIdentifier, property))
       {
         t->GetOutput().AnswerString(s);
       }
@@ -1683,6 +1684,7 @@
 
     
   static OrthancPluginErrorCode SetGlobalProperty(OrthancPluginDatabaseTransaction* transaction,
+                                                  const char* serverIdentifier,
                                                   int32_t property,
                                                   const char* value)
   {
@@ -1691,7 +1693,7 @@
     try
     {
       t->GetOutput().Clear();
-      t->GetBackend().SetGlobalProperty(property, value);
+      t->GetBackend().SetGlobalProperty(serverIdentifier, property, value);
       return OrthancPluginErrorCode_Success;
     }
     ORTHANC_PLUGINS_DATABASE_CATCH(t->GetContext());