changeset 16:e662d794da41

fix deprecated calls
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 22 Mar 2024 15:42:34 +0100
parents ec47d2182ac6
children 972439d2d38f
files Sources/Plugin.cpp
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Sources/Plugin.cpp	Fri Mar 22 15:41:15 2024 +0100
+++ b/Sources/Plugin.cpp	Fri Mar 22 15:42:34 2024 +0100
@@ -31,6 +31,9 @@
 
 #include <boost/thread/shared_mutex.hpp>
 
+#define ORTHANC_PLUGIN_NAME  "volview"
+
+
 // Forward declaration
 void ReadStaticAsset(std::string& target,
                      const std::string& path);
@@ -131,14 +134,14 @@
     Orthanc::Logging::Initialize(context);
 #endif
 
-    OrthancPluginSetDescription(context, "Kitware's VolView for Orthanc.");
+    OrthancPlugins::SetDescription(ORTHANC_PLUGIN_NAME, "Kitware's VolView for Orthanc.");
 
     OrthancPlugins::RegisterRestCallback<ServeFile>("/volview/(.*)", true);
 
     // Extend the default Orthanc Explorer with custom JavaScript for VolView
     std::string explorer;
     Orthanc::EmbeddedResources::GetFileResource(explorer, Orthanc::EmbeddedResources::ORTHANC_EXPLORER);
-    OrthancPluginExtendOrthancExplorer(OrthancPlugins::GetGlobalContext(), explorer.c_str());
+    OrthancPlugins::ExtendOrthancExplorer(ORTHANC_PLUGIN_NAME, explorer.c_str());
 
     return 0;
   }
@@ -151,7 +154,7 @@
 
   ORTHANC_PLUGINS_API const char* OrthancPluginGetName()
   {
-    return "volview";
+    return ORTHANC_PLUGIN_NAME;
   }