comparison Plugins/Samples/Common/OrthancPluginCppWrapper.h @ 3413:f09bfdea3fc3

rename
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 11 Jun 2019 14:02:57 +0200
parents 3575466a3e57
children b9cba6a91780
comparison
equal deleted inserted replaced
3412:327bace7e98a 3413:f09bfdea3fc3
105 #else 105 #else
106 # define HAS_ORTHANC_PLUGIN_HTTP_CLIENT 0 106 # define HAS_ORTHANC_PLUGIN_HTTP_CLIENT 0
107 #endif 107 #endif
108 108
109 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 5, 7) 109 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 5, 7)
110 # define HAS_ORTHANC_PLUGIN_STREAMING_HTTP_CLIENT 1 110 # define HAS_ORTHANC_PLUGIN_CHUNKED_HTTP_CLIENT 1
111 #else 111 #else
112 # define HAS_ORTHANC_PLUGIN_STREAMING_HTTP_CLIENT 0 112 # define HAS_ORTHANC_PLUGIN_CHUNKED_HTTP_CLIENT 0
113 #endif 113 #endif
114 114
115 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 5, 7) 115 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 5, 7)
116 # define HAS_ORTHANC_PLUGIN_HTTP_MULTIPART_SERVER 1 116 # define HAS_ORTHANC_PLUGIN_HTTP_MULTIPART_SERVER 1
117 #else 117 #else
820 } 820 }
821 821
822 virtual bool ReadNextChunk(std::string& chunk) = 0; 822 virtual bool ReadNextChunk(std::string& chunk) = 0;
823 }; 823 };
824 824
825 #if HAS_ORTHANC_PLUGIN_STREAMING_HTTP_CLIENT == 1 825 #if HAS_ORTHANC_PLUGIN_CHUNKED_HTTP_CLIENT == 1
826 class IAnswer : public boost::noncopyable 826 class IAnswer : public boost::noncopyable
827 { 827 {
828 public: 828 public:
829 virtual ~IAnswer() 829 virtual ~IAnswer()
830 { 830 {
851 uint32_t timeout_; 851 uint32_t timeout_;
852 std::string certificateFile_; 852 std::string certificateFile_;
853 std::string certificateKeyFile_; 853 std::string certificateKeyFile_;
854 std::string certificateKeyPassword_; 854 std::string certificateKeyPassword_;
855 bool pkcs11_; 855 bool pkcs11_;
856 std::string body_; 856 std::string fullBody_;
857 IRequestBody* streamingBody_; 857 IRequestBody* chunkedBody_;
858 858
859 #if HAS_ORTHANC_PLUGIN_STREAMING_HTTP_CLIENT == 1 859 #if HAS_ORTHANC_PLUGIN_CHUNKED_HTTP_CLIENT == 1
860 void ExecuteWithStream(uint16_t& httpStatus, // out 860 void ExecuteWithStream(uint16_t& httpStatus, // out
861 IAnswer& answer, // out 861 IAnswer& answer, // out
862 IRequestBody& body) const; 862 IRequestBody& body) const;
863 #endif 863 #endif
864 864
923 923
924 void SetBody(const std::string& body); 924 void SetBody(const std::string& body);
925 925
926 void SetBody(IRequestBody& body); 926 void SetBody(IRequestBody& body);
927 927
928 #if HAS_ORTHANC_PLUGIN_STREAMING_HTTP_CLIENT == 1 928 #if HAS_ORTHANC_PLUGIN_CHUNKED_HTTP_CLIENT == 1
929 void Execute(IAnswer& answer); 929 void Execute(IAnswer& answer);
930 #endif 930 #endif
931 931
932 void Execute(HttpHeaders& answerHeaders /* out */, 932 void Execute(HttpHeaders& answerHeaders /* out */,
933 std::string& answerBody /* out */); 933 std::string& answerBody /* out */);