Mercurial > hg > orthanc
changeset 5538:6ce05f8b5b13
deprecating OrthancPluginSetDescription2(), OrthancPluginExtendOrthancExplorer2() and OrthancPluginSetRootUri2()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 16 Mar 2024 11:34:28 +0100 |
parents | a85e49dcb63e |
children | 2b3eeacf636c |
files | OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h OrthancServer/Plugins/Samples/ConnectivityChecks/Plugin.cpp OrthancServer/Plugins/Samples/DelayedDeletion/Plugin.cpp OrthancServer/Plugins/Samples/Housekeeper/Plugin.cpp OrthancServer/Plugins/Samples/ModalityWorklists/Plugin.cpp OrthancServer/Plugins/Samples/MultitenantDicom/Plugin.cpp OrthancServer/Plugins/Samples/ServeFolders/Plugin.cpp |
diffstat | 7 files changed, 23 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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<Orthanc::EmbeddedResources::LIBRARIES>); OrthancPluginRegisterRestCallback(context_, ROOT_URI "/app/(.*)", ServeStaticResource<Orthanc::EmbeddedResources::WEB_RESOURCES>);
--- 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;
--- 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; }
--- 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; }
--- 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; }
--- 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 <json/value.h> @@ -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<ListServedFolders>(INDEX_URI, true); try @@ -457,7 +459,7 @@ ORTHANC_PLUGINS_API const char* OrthancPluginGetName() { - return "serve-folders"; + return SERVE_FOLDERS_NAME; }