comparison Plugins/Samples/Common/OrthancPluginCppWrapper.h @ 3418:e2b032584a83

fix for msvc 2008
author s.jodogne@gmail.com
date Wed, 12 Jun 2019 09:04:36 +0200
parents ad263225187c
children af271172cc36
comparison
equal deleted inserted replaced
3417:ad263225187c 3418:e2b032584a83
948 const OrthancPluginHttpRequest* request); 948 const OrthancPluginHttpRequest* request);
949 949
950 950
951 #if HAS_ORTHANC_PLUGIN_CHUNKED_HTTP_SERVER == 1 951 #if HAS_ORTHANC_PLUGIN_CHUNKED_HTTP_SERVER == 1
952 template <ChunkedRestCallback Callback> 952 template <ChunkedRestCallback Callback>
953 static OrthancPluginErrorCode Protect(OrthancPluginServerChunkedRequestReader** reader, 953 static OrthancPluginErrorCode ChunkedProtect(OrthancPluginServerChunkedRequestReader** reader,
954 const char* url, 954 const char* url,
955 const OrthancPluginHttpRequest* request) 955 const OrthancPluginHttpRequest* request)
956 { 956 {
957 try 957 try
958 { 958 {
959 if (reader == NULL) 959 if (reader == NULL)
960 { 960 {
1042 { 1042 {
1043 #if HAS_ORTHANC_PLUGIN_CHUNKED_HTTP_SERVER == 1 1043 #if HAS_ORTHANC_PLUGIN_CHUNKED_HTTP_SERVER == 1
1044 OrthancPluginRegisterChunkedRestCallback( 1044 OrthancPluginRegisterChunkedRestCallback(
1045 GetGlobalContext(), uri.c_str(), 1045 GetGlobalContext(), uri.c_str(),
1046 GetHandler == Internals::NullRestCallback ? NULL : Internals::Protect<GetHandler>, 1046 GetHandler == Internals::NullRestCallback ? NULL : Internals::Protect<GetHandler>,
1047 PostHandler == Internals::NullChunkedRestCallback ? NULL : Internals::Protect<PostHandler>, 1047 PostHandler == Internals::NullChunkedRestCallback ? NULL : Internals::ChunkedProtect<PostHandler>,
1048 DeleteHandler == Internals::NullRestCallback ? NULL : Internals::Protect<DeleteHandler>, 1048 DeleteHandler == Internals::NullRestCallback ? NULL : Internals::Protect<DeleteHandler>,
1049 PutHandler == Internals::NullChunkedRestCallback ? NULL : Internals::Protect<PutHandler>, 1049 PutHandler == Internals::NullChunkedRestCallback ? NULL : Internals::ChunkedProtect<PutHandler>,
1050 Internals::ChunkedRequestReaderAddChunk, 1050 Internals::ChunkedRequestReaderAddChunk,
1051 Internals::ChunkedRequestReaderExecute, 1051 Internals::ChunkedRequestReaderExecute,
1052 Internals::ChunkedRequestReaderFinalize); 1052 Internals::ChunkedRequestReaderFinalize);
1053 #else 1053 #else
1054 LogWarning("Performance warning: The plugin was compiled against a pre-1.5.7 version " 1054 LogWarning("Performance warning: The plugin was compiled against a pre-1.5.7 version "
1055 "of the Orthanc SDK. Multipart transfers will be entirely stored in RAM."); 1055 "of the Orthanc SDK. Multipart transfers will be entirely stored in RAM.");
1056 1056
1057 OrthancPluginRegisterRestCallback( 1057 OrthancPluginRegisterRestCallback(
1058 GetGlobalContext(), uri.c_str(), 1058 GetGlobalContext(), uri.c_str(),
1059 Internals::Protect< Internals::ChunkedRestCompatibility< 1059 Internals::ChunkedProtect< Internals::ChunkedRestCompatibility<
1060 GetHandler, PostHandler, DeleteHandler, PutHandler> >); 1060 GetHandler, PostHandler, DeleteHandler, PutHandler> >);
1061 #endif 1061 #endif
1062 } 1062 }
1063 }; 1063 };
1064 } 1064 }