Mercurial > hg > orthanc
changeset 3410:3575466a3e57
introduction of macro HAS_ORTHANC_FRAMEWORK to be more explicit
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 08 Jun 2019 17:42:30 +0200 |
parents | 877363a40647 |
children | 0db4e6c2a89f |
files | Plugins/Samples/Common/OrthancPluginCppWrapper.cpp Plugins/Samples/Common/OrthancPluginCppWrapper.h |
diffstat | 2 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp Sat Jun 08 16:49:35 2019 +0200 +++ b/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp Sat Jun 08 17:42:30 2019 +0200 @@ -2877,19 +2877,18 @@ Internals::Protect<CompatibilityMultipartRestCallback>); } - #else void MultipartRestCallback::Register(const std::string& regularExpression) { /** * Version >= 1.5.7 of the Orthanc framework must be - * available. Make sure that macros + * available. Make sure that macros "HAS_ORTHANC_FRAMEWORK=1", * "ORTHANC_FRAMEWORK_VERSION_MAJOR", * "ORTHANC_FRAMEWORK_VERSION_MINOR" and * "ORTHANC_FRAMEWORK_VERSION_REVISION" are properly set. **/ - LogError("The compatibility mode for multipart transfers is not available."); + LogError("The compatibility wrappers for multipart transfers is not available, stopping now."); ORTHANC_PLUGINS_THROW_EXCEPTION(NotImplemented); }
--- a/Plugins/Samples/Common/OrthancPluginCppWrapper.h Sat Jun 08 16:49:35 2019 +0200 +++ b/Plugins/Samples/Common/OrthancPluginCppWrapper.h Sat Jun 08 17:42:30 2019 +0200 @@ -59,9 +59,11 @@ #if !defined(ORTHANC_FRAMEWORK_VERSION_IS_ABOVE) #define ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(major, minor, revision) \ - (defined(ORTHANC_FRAMEWORK_VERSION_MAJOR) && \ + (defined(HAS_ORTHANC_FRAMEWORK) && \ + defined(ORTHANC_FRAMEWORK_VERSION_MAJOR) && \ defined(ORTHANC_FRAMEWORK_VERSION_MINOR) && \ defined(ORTHANC_FRAMEWORK_VERSION_REVISION) && \ + HAS_ORTHANC_FRAMEWORK == 1 && \ ORTHANC_FRAMEWORK_VERSION_MAJOR > major || \ (ORTHANC_FRAMEWORK_VERSION_MAJOR == major && \ (ORTHANC_FRAMEWORK_VERSION_MINOR > minor || \