diff Sources/Plugin.cpp @ 38:fae02fc69b46

fix deprecated calls
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 22 Mar 2024 15:30:54 +0100
parents 63a5b4277cfc
children a63247d45917
line wrap: on
line diff
--- a/Sources/Plugin.cpp	Fri Mar 22 09:44:47 2024 +0100
+++ b/Sources/Plugin.cpp	Fri Mar 22 15:30:54 2024 +0100
@@ -38,6 +38,8 @@
 #include <boost/thread.hpp>
 #include <boost/thread/shared_mutex.hpp>
 
+#define ORTHANC_PLUGIN_NAME  "ohif"
+
 
 static const std::string  METADATA_OHIF = "4202";
 static const char* const  KEY_VERSION = "Version";
@@ -921,7 +923,7 @@
         routerBasename_ += "/";
       }
 
-      OrthancPluginSetDescription(context, "OHIF plugin for Orthanc.");
+      OrthancPlugins::SetDescription(ORTHANC_PLUGIN_NAME, "OHIF plugin for Orthanc.");
 
       OrthancPlugins::RegisterRestCallback<ServeFile>("/ohif", true);
       OrthancPlugins::RegisterRestCallback<ServeFile>("/ohif/(.*)", true);
@@ -938,7 +940,7 @@
         dictionary["USE_DICOM_WEB"] = (dataSource_ == DataSource_DicomWeb ? "true" : "false");
         explorer = Orthanc::Toolbox::SubstituteVariables(explorer, dictionary);
       
-        OrthancPluginExtendOrthancExplorer(context, explorer.c_str());
+        OrthancPlugins::ExtendOrthancExplorer(ORTHANC_PLUGIN_NAME, explorer.c_str());
       }
     }
     catch (Orthanc::OrthancException& e)
@@ -957,7 +959,7 @@
 
   ORTHANC_PLUGINS_API const char* OrthancPluginGetName()
   {
-    return "ohif";
+    return ORTHANC_PLUGIN_NAME;
   }