# HG changeset patch # User Sebastien Jodogne # Date 1710585268 -3600 # Node ID 6ce05f8b5b13d8d6ab702d395917fee0dacf81a0 # Parent a85e49dcb63e7d1aea90ba095fa328b5e0c6c0bc deprecating OrthancPluginSetDescription2(), OrthancPluginExtendOrthancExplorer2() and OrthancPluginSetRootUri2() diff -r a85e49dcb63e -r 6ce05f8b5b13 OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h --- a/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h Sat Mar 16 11:23:02 2024 +0100 +++ b/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h Sat Mar 16 11:34:28 2024 +0100 @@ -3482,7 +3482,7 @@ * @param plugin Identifier of your plugin (it must match "OrthancPluginGetName()"). * @param uri The root URI for this plugin. **/ - ORTHANC_PLUGIN_DEPRECATED ORTHANC_PLUGIN_INLINE void OrthancPluginSetRootUri2( + ORTHANC_PLUGIN_INLINE void OrthancPluginSetRootUri2( OrthancPluginContext* context, const char* plugin, const char* uri) @@ -3532,7 +3532,7 @@ * @param plugin Identifier of your plugin (it must match "OrthancPluginGetName()"). * @param description The description. **/ - ORTHANC_PLUGIN_DEPRECATED ORTHANC_PLUGIN_INLINE void OrthancPluginSetDescription2( + ORTHANC_PLUGIN_INLINE void OrthancPluginSetDescription2( OrthancPluginContext* context, const char* plugin, const char* description) @@ -3582,7 +3582,7 @@ * @param plugin Identifier of your plugin (it must match "OrthancPluginGetName()"). * @param javascript The custom JavaScript code. **/ - ORTHANC_PLUGIN_DEPRECATED ORTHANC_PLUGIN_INLINE void OrthancPluginExtendOrthancExplorer2( + ORTHANC_PLUGIN_INLINE void OrthancPluginExtendOrthancExplorer2( OrthancPluginContext* context, const char* plugin, const char* javascript) diff -r a85e49dcb63e -r 6ce05f8b5b13 OrthancServer/Plugins/Samples/ConnectivityChecks/Plugin.cpp --- a/OrthancServer/Plugins/Samples/ConnectivityChecks/Plugin.cpp Sat Mar 16 11:23:02 2024 +0100 +++ b/OrthancServer/Plugins/Samples/ConnectivityChecks/Plugin.cpp Sat Mar 16 11:34:28 2024 +0100 @@ -86,8 +86,8 @@ } /* Register the callbacks */ - OrthancPluginSetDescription(context_, "Utilities to check connectivity to DICOM modalities, DICOMweb servers and Orthanc peers."); - OrthancPluginSetRootUri(context_, ROOT_URI "/app/index.html"); + OrthancPluginSetDescription2(context_, ORTHANC_PLUGIN_NAME, "Utilities to check connectivity to DICOM modalities, DICOMweb servers and Orthanc peers."); + OrthancPluginSetRootUri2(context_, ORTHANC_PLUGIN_NAME, ROOT_URI "/app/index.html"); OrthancPluginRegisterRestCallback(context_, ROOT_URI "/libs/(.*)", ServeStaticResource); OrthancPluginRegisterRestCallback(context_, ROOT_URI "/app/(.*)", ServeStaticResource); diff -r a85e49dcb63e -r 6ce05f8b5b13 OrthancServer/Plugins/Samples/DelayedDeletion/Plugin.cpp --- a/OrthancServer/Plugins/Samples/DelayedDeletion/Plugin.cpp Sat Mar 16 11:23:02 2024 +0100 +++ b/OrthancServer/Plugins/Samples/DelayedDeletion/Plugin.cpp Sat Mar 16 11:34:28 2024 +0100 @@ -306,7 +306,7 @@ return -1; } - OrthancPluginSetDescription(context, "Plugin removing files from storage asynchronously."); + OrthancPluginSetDescription2(context, ORTHANC_PLUGIN_NAME, "Plugin removing files from storage asynchronously."); OrthancPlugins::OrthancConfiguration orthancConfig; diff -r a85e49dcb63e -r 6ce05f8b5b13 OrthancServer/Plugins/Samples/Housekeeper/Plugin.cpp --- a/OrthancServer/Plugins/Samples/Housekeeper/Plugin.cpp Sat Mar 16 11:23:02 2024 +0100 +++ b/OrthancServer/Plugins/Samples/Housekeeper/Plugin.cpp Sat Mar 16 11:34:28 2024 +0100 @@ -20,6 +20,8 @@ **/ +#define HOUSEKEEPER_NAME "housekeeper" + #include "../../../../OrthancFramework/Sources/Compatibility.h" #include "../Common/OrthancPluginCppWrapper.h" @@ -788,7 +790,7 @@ } OrthancPlugins::LogWarning("Housekeeper plugin is initializing"); - OrthancPluginSetDescription(c, "Optimizes your DB and storage."); + OrthancPluginSetDescription2(c, HOUSEKEEPER_NAME, "Optimizes your DB and storage."); OrthancPlugins::OrthancConfiguration orthancConfiguration; @@ -889,7 +891,7 @@ ORTHANC_PLUGINS_API const char* OrthancPluginGetName() { - return "housekeeper"; + return HOUSEKEEPER_NAME; } diff -r a85e49dcb63e -r 6ce05f8b5b13 OrthancServer/Plugins/Samples/ModalityWorklists/Plugin.cpp --- a/OrthancServer/Plugins/Samples/ModalityWorklists/Plugin.cpp Sat Mar 16 11:23:02 2024 +0100 +++ b/OrthancServer/Plugins/Samples/ModalityWorklists/Plugin.cpp Sat Mar 16 11:34:28 2024 +0100 @@ -20,6 +20,8 @@ **/ +#define MODALITY_WORKLISTS_NAME "worklists" + #include "../../../../OrthancFramework/Sources/Compatibility.h" #include "../Common/OrthancPluginCppWrapper.h" @@ -226,7 +228,7 @@ } OrthancPlugins::LogWarning("Sample worklist plugin is initializing"); - OrthancPluginSetDescription(c, "Serve DICOM modality worklists from a folder with Orthanc."); + OrthancPluginSetDescription2(c, MODALITY_WORKLISTS_NAME, "Serve DICOM modality worklists from a folder with Orthanc."); OrthancPlugins::OrthancConfiguration configuration; @@ -267,7 +269,7 @@ ORTHANC_PLUGINS_API const char* OrthancPluginGetName() { - return "worklists"; + return MODALITY_WORKLISTS_NAME; } diff -r a85e49dcb63e -r 6ce05f8b5b13 OrthancServer/Plugins/Samples/MultitenantDicom/Plugin.cpp --- a/OrthancServer/Plugins/Samples/MultitenantDicom/Plugin.cpp Sat Mar 16 11:23:02 2024 +0100 +++ b/OrthancServer/Plugins/Samples/MultitenantDicom/Plugin.cpp Sat Mar 16 11:34:28 2024 +0100 @@ -20,6 +20,8 @@ **/ +#define ORTHANC_PLUGIN_NAME "multitenant-dicom" + #include "MultitenantDicomServer.h" #include "../../../../OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.h" @@ -126,7 +128,7 @@ /* Disable "gethostbyaddr" (which results in memory leaks) and use raw IP addresses */ dcmDisableGethostbyaddr.set(OFTrue); - OrthancPluginSetDescription(context, "Multitenant plugin for Orthanc."); + OrthancPluginSetDescription2(context, ORTHANC_PLUGIN_NAME, "Multitenant plugin for Orthanc."); OrthancPluginRegisterOnChangeCallback(context, OnChangeCallback); @@ -186,7 +188,7 @@ ORTHANC_PLUGINS_API const char* OrthancPluginGetName() { - return "multitenant-dicom"; + return ORTHANC_PLUGIN_NAME; } diff -r a85e49dcb63e -r 6ce05f8b5b13 OrthancServer/Plugins/Samples/ServeFolders/Plugin.cpp --- a/OrthancServer/Plugins/Samples/ServeFolders/Plugin.cpp Sat Mar 16 11:23:02 2024 +0100 +++ b/OrthancServer/Plugins/Samples/ServeFolders/Plugin.cpp Sat Mar 16 11:34:28 2024 +0100 @@ -20,6 +20,8 @@ **/ +#define SERVE_FOLDERS_NAME "serve-folders" + #include "../Common/OrthancPluginCppWrapper.h" #include @@ -432,8 +434,8 @@ } RegisterDefaultExtensions(); - OrthancPluginSetDescription(context, "Serve additional folders with the HTTP server of Orthanc."); - OrthancPluginSetRootUri(context, INDEX_URI); + OrthancPluginSetDescription2(context, SERVE_FOLDERS_NAME, "Serve additional folders with the HTTP server of Orthanc."); + OrthancPluginSetRootUri2(context, SERVE_FOLDERS_NAME, INDEX_URI); OrthancPlugins::RegisterRestCallback(INDEX_URI, true); try @@ -457,7 +459,7 @@ ORTHANC_PLUGINS_API const char* OrthancPluginGetName() { - return "serve-folders"; + return SERVE_FOLDERS_NAME; }