Mercurial > hg > orthanc
changeset 6061:c8df30b3e748 attach-custom-data
removed implementation of OrthancPluginStorageAreaCreate() and OrthancPluginStorageAreaRemove()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 25 Mar 2025 21:48:41 +0100 |
parents | 4a8c4559dc95 |
children | 552bd2c56006 |
files | OrthancServer/Plugins/Engine/OrthancPlugins.cpp OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h |
diffstat | 2 files changed, 6 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/Plugins/Engine/OrthancPlugins.cpp Tue Mar 25 21:35:08 2025 +0100 +++ b/OrthancServer/Plugins/Engine/OrthancPlugins.cpp Tue Mar 25 21:48:41 2025 +0100 @@ -5246,26 +5246,13 @@ return true; case _OrthancPluginService_StorageAreaCreate: - { - const _OrthancPluginStorageAreaCreate& p = - *reinterpret_cast<const _OrthancPluginStorageAreaCreate*>(parameters); - PluginStorageAreaBase& storage = *reinterpret_cast<PluginStorageAreaBase*>(p.storageArea); - storage.Create(p.uuid, p.content, static_cast<size_t>(p.size), Plugins::Convert(p.type)); - return true; - } + throw OrthancException(ErrorCode_NotImplemented, "The SDK function OrthancPluginStorageAreaCreate() is only available in Orthanc <= 1.12.6"); case _OrthancPluginService_StorageAreaRead: throw OrthancException(ErrorCode_NotImplemented, "The SDK function OrthancPluginStorageAreaRead() is only available in Orthanc <= 1.12.6"); case _OrthancPluginService_StorageAreaRemove: - { - const _OrthancPluginStorageAreaRemove& p = - *reinterpret_cast<const _OrthancPluginStorageAreaRemove*>(parameters); - IPluginStorageArea& storage = *reinterpret_cast<IPluginStorageArea*>(p.storageArea); - std::string customDataNotUsed; - storage.Remove(p.uuid, Plugins::Convert(p.type), customDataNotUsed); - return true; - } + throw OrthancException(ErrorCode_NotImplemented, "The SDK function OrthancPluginStorageAreaRemove() is only available in Orthanc <= 1.12.6"); case _OrthancPluginService_DicomBufferToJson: case _OrthancPluginService_DicomInstanceToJson:
--- a/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h Tue Mar 25 21:35:08 2025 +0100 +++ b/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h Tue Mar 25 21:48:41 2025 +0100 @@ -4986,6 +4986,8 @@ * @ingroup Callbacks * @deprecated This function should not be used anymore. Use "OrthancPluginRestApiPut()" on * "/{patients|studies|series|instances}/{id}/attachments/{name}" instead. + * @warning This function will result in a "not implemented" error on versions of the + * Orthanc core above 1.12.6. **/ ORTHANC_PLUGIN_DEPRECATED ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginStorageAreaCreate( OrthancPluginContext* context, @@ -5071,6 +5073,8 @@ * @ingroup Callbacks * @deprecated This function should not be used anymore. Use "OrthancPluginRestApiDelete()" on * "/{patients|studies|series|instances}/{id}/attachments/{name}" instead. + * @warning This function will result in a "not implemented" error on versions of the + * Orthanc core above 1.12.6. **/ ORTHANC_PLUGIN_DEPRECATED ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginStorageAreaRemove( OrthancPluginContext* context,