changeset 5540:9c5a7689bfd2

removed deprecated calls in sample plugin
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sun, 17 Mar 2024 09:08:20 +0100
parents 2b3eeacf636c
children 5a34160b7627
files OrthancServer/Plugins/Samples/Basic/Plugin.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Plugins/Samples/Basic/Plugin.c	Sat Mar 16 11:46:27 2024 +0100
+++ b/OrthancServer/Plugins/Samples/Basic/Plugin.c	Sun Mar 17 09:08:20 2024 +0100
@@ -20,6 +20,8 @@
  **/
 
 
+#define PLUGIN_NAME "sample"
+
 #include <orthanc/OrthancCPlugin.h>
 
 #include <string.h>
@@ -578,9 +580,9 @@
     
   
   /* Declare several properties of the plugin */
-  OrthancPluginSetRootUri(context, "/plugin/hello");
-  OrthancPluginSetDescription(context, "This is the description of the sample plugin that can be seen in Orthanc Explorer.");
-  OrthancPluginExtendOrthancExplorer(context, "alert('Hello Orthanc! From sample plugin with love.');");
+  OrthancPluginSetRootUri2(context, PLUGIN_NAME, "/plugin/hello");
+  OrthancPluginSetDescription2(context, PLUGIN_NAME, "This is the description of the sample plugin that can be seen in Orthanc Explorer.");
+  OrthancPluginExtendOrthancExplorer2(context, PLUGIN_NAME, "alert('Hello Orthanc! From sample plugin with love.');");
 
   customError = OrthancPluginRegisterErrorCode(context, 4, 402, "Hello world");
   
@@ -602,7 +604,7 @@
 
 ORTHANC_PLUGINS_API const char* OrthancPluginGetName()
 {
-  return "sample";
+  return PLUGIN_NAME;
 }