changeset 5543:cd698247b029

fix deprecated calls
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 22 Mar 2024 16:02:37 +0100
parents 42a3fcbbc78d
children dce22a789a2b
files OrthancServer/Plugins/Samples/Sanitizer/Plugin.cpp OrthancServer/Plugins/Samples/StorageCommitmentScp/Plugin.cpp
diffstat 2 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Plugins/Samples/Sanitizer/Plugin.cpp	Fri Mar 22 13:45:02 2024 +0100
+++ b/OrthancServer/Plugins/Samples/Sanitizer/Plugin.cpp	Fri Mar 22 16:02:37 2024 +0100
@@ -30,7 +30,7 @@
 #include <string.h>
 #include <iostream>
 
-
+#define ORTHANC_PLUGIN_NAME  "sanitizer"
 
 
 OrthancPluginReceivedInstanceAction ReceivedInstanceCallback(OrthancPluginMemoryBuffer64* modifiedDicomBuffer,
@@ -71,7 +71,7 @@
     }
     
     OrthancPlugins::LogWarning("Sanitizer plugin is initializing");
-    OrthancPluginSetDescription(c, "Sample plugin to sanitize incoming DICOM instances.");
+    OrthancPlugins::SetDescription(ORTHANC_PLUGIN_NAME, "Sample plugin to sanitize incoming DICOM instances.");
 
     OrthancPluginRegisterReceivedInstanceCallback(c, ReceivedInstanceCallback);
 
@@ -88,7 +88,7 @@
 
   ORTHANC_PLUGINS_API const char* OrthancPluginGetName()
   {
-    return "sanitizer";
+    return ORTHANC_PLUGIN_NAME;
   }
 
 
--- a/OrthancServer/Plugins/Samples/StorageCommitmentScp/Plugin.cpp	Fri Mar 22 13:45:02 2024 +0100
+++ b/OrthancServer/Plugins/Samples/StorageCommitmentScp/Plugin.cpp	Fri Mar 22 16:02:37 2024 +0100
@@ -24,6 +24,8 @@
 
 #include <json/value.h>
 
+#define ORTHANC_PLUGIN_NAME  "storage-commitment-scp"
+
 
 class StorageCommitmentSample : public OrthancPlugins::IStorageCommitmentScpHandler
 {
@@ -86,7 +88,7 @@
       return -1;
     }
 
-    OrthancPluginSetDescription(c, "Sample storage commitment SCP plugin.");
+    OrthancPlugins::SetDescription(ORTHANC_PLUGIN_NAME, "Sample storage commitment SCP plugin.");
 
     OrthancPluginRegisterStorageCommitmentScpCallback(
       c, StorageCommitmentScp,
@@ -104,7 +106,7 @@
 
   ORTHANC_PLUGINS_API const char* OrthancPluginGetName()
   {
-    return "storage-commitment-scp";
+    return ORTHANC_PLUGIN_NAME;
   }