Mercurial > hg > orthanc
diff Plugins/Samples/Common/OrthancPluginCppWrapper.h @ 3407:b7728227a852
C++ wrappers: compatibility mode if missing OrthancPluginRegisterMultipartRestCallback()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 08 Jun 2019 11:57:46 +0200 |
parents | 0faae6f6e3c5 |
children | 3575466a3e57 |
line wrap: on
line diff
--- a/Plugins/Samples/Common/OrthancPluginCppWrapper.h Sat Jun 08 10:30:00 2019 +0200 +++ b/Plugins/Samples/Common/OrthancPluginCppWrapper.h Sat Jun 08 11:57:46 2019 +0200 @@ -57,6 +57,19 @@ #endif +#if !defined(ORTHANC_FRAMEWORK_VERSION_IS_ABOVE) +#define ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(major, minor, revision) \ + (defined(ORTHANC_FRAMEWORK_VERSION_MAJOR) && \ + defined(ORTHANC_FRAMEWORK_VERSION_MINOR) && \ + defined(ORTHANC_FRAMEWORK_VERSION_REVISION) && \ + ORTHANC_FRAMEWORK_VERSION_MAJOR > major || \ + (ORTHANC_FRAMEWORK_VERSION_MAJOR == major && \ + (ORTHANC_FRAMEWORK_VERSION_MINOR > minor || \ + (ORTHANC_FRAMEWORK_VERSION_MINOR == minor && \ + ORTHANC_FRAMEWORK_VERSION_REVISION >= revision)))) +#endif + + #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 2, 0) // The "OrthancPluginFindMatcher()" primitive was introduced in Orthanc 1.2.0 # define HAS_ORTHANC_PLUGIN_FIND_MATCHER 1 @@ -921,7 +934,6 @@ -#if HAS_ORTHANC_PLUGIN_HTTP_MULTIPART_SERVER == 1 class MultipartRestCallback : public boost::noncopyable { public: @@ -954,5 +966,4 @@ void Register(const std::string& regularExpression); }; -#endif }