changeset 3388:18cd4951fccc

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 06 Jun 2019 09:04:26 +0200
parents a48d652f1500
children eb57b7cd5f21
files Plugins/Samples/Common/OrthancPluginCppWrapper.cpp Plugins/Samples/Common/OrthancPluginCppWrapper.h
diffstat 2 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp	Wed Jun 05 17:17:48 2019 +0200
+++ b/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp	Thu Jun 06 09:04:26 2019 +0200
@@ -2058,6 +2058,7 @@
 
 
 
+#if HAS_ORTHANC_PLUGIN_HTTP_CLIENT == 1
 #if HAS_ORTHANC_PLUGIN_HTTP_CHUNKED_BODY == 1
   class HttpClient::ChunkedBody : public boost::noncopyable
   {
@@ -2271,4 +2272,5 @@
       ORTHANC_PLUGINS_THROW_PLUGIN_ERROR_CODE(error);
     }
   }
+#endif  /* HAS_ORTHANC_PLUGIN_HTTP_CLIENT == 1 */
 }
--- a/Plugins/Samples/Common/OrthancPluginCppWrapper.h	Wed Jun 05 17:17:48 2019 +0200
+++ b/Plugins/Samples/Common/OrthancPluginCppWrapper.h	Thu Jun 06 09:04:26 2019 +0200
@@ -85,6 +85,12 @@
 #  define HAS_ORTHANC_PLUGIN_METRICS  0
 #endif
 
+#if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 1, 0)
+#  define HAS_ORTHANC_PLUGIN_HTTP_CLIENT  1
+#else
+#  define HAS_ORTHANC_PLUGIN_HTTP_CLIENT  0
+#endif
+
 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 5, 7)
 #  define HAS_ORTHANC_PLUGIN_HTTP_CHUNKED_BODY  1
 #else
@@ -779,6 +785,7 @@
 #endif
 
 
+#if HAS_ORTHANC_PLUGIN_HTTP_CLIENT == 1
   class HttpClient : public boost::noncopyable
   {
   public:
@@ -893,4 +900,5 @@
 
     void Execute();
   };
+#endif
 }