changeset 646:a14f333f6bb9

fix deprecated calls
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 16 Mar 2024 11:50:27 +0100
parents 503d1f209f34
children d3f5eb4d3830
files CMakeLists.txt Plugin/Plugin.cpp
diffstat 2 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/CMakeLists.txt	Sat Mar 16 11:47:10 2024 +0100
+++ b/CMakeLists.txt	Sat Mar 16 11:50:27 2024 +0100
@@ -207,7 +207,10 @@
 
 message("Setting the version of the library to ${ORTHANC_DICOM_WEB_VERSION}")
 
-add_definitions(-DORTHANC_DICOM_WEB_VERSION="${ORTHANC_DICOM_WEB_VERSION}")
+add_definitions(
+  -DORTHANC_DICOM_WEB_NAME="dicom-web"
+  -DORTHANC_DICOM_WEB_VERSION="${ORTHANC_DICOM_WEB_VERSION}"
+  )
 
 set_target_properties(OrthancDicomWeb PROPERTIES 
   VERSION ${ORTHANC_DICOM_WEB_VERSION} 
--- a/Plugin/Plugin.cpp	Sat Mar 16 11:47:10 2024 +0100
+++ b/Plugin/Plugin.cpp	Sat Mar 16 11:50:27 2024 +0100
@@ -548,7 +548,7 @@
                  << "Orthanc SDK <= 1.12.0. Retrieving metadata will be slower.";
 #endif
 
-    OrthancPluginSetDescription(context, "Implementation of DICOMweb (QIDO-RS, STOW-RS and WADO-RS) and WADO-URI.");
+    OrthancPlugins::SetDescription(ORTHANC_DICOM_WEB_NAME, "Implementation of DICOMweb (QIDO-RS, STOW-RS and WADO-RS) and WADO-URI.");
 
     try
     {
@@ -635,12 +635,12 @@
           dictionary["DICOMWEB_ROOT"] = root.substr(1, root.size() - 2);  // Remove heading and trailing slashes
           std::string configured = Orthanc::Toolbox::SubstituteVariables(explorer, dictionary);
 
-          OrthancPluginExtendOrthancExplorer(OrthancPlugins::GetGlobalContext(), configured.c_str());
+          OrthancPlugins::ExtendOrthancExplorer(ORTHANC_DICOM_WEB_NAME, configured.c_str());
         }
         
         
         std::string uri = root + "app/client/index.html";
-        OrthancPluginSetRootUri(context, uri.c_str());
+        OrthancPlugins::SetRootUri(ORTHANC_DICOM_WEB_NAME, uri.c_str());
 
         std::string publicUrlRoot = OrthancPlugins::Configuration::GetPublicRoot();
         OrthancPlugins::LogWarning("DICOMWeb PublicRoot: " + publicUrlRoot);
@@ -686,7 +686,7 @@
 
   ORTHANC_PLUGINS_API const char* OrthancPluginGetName()
   {
-    return "dicom-web";
+    return ORTHANC_DICOM_WEB_NAME;
   }