comparison Framework/Toolbox/OrthancApiClient.h @ 417:aee3d7941c9b

preparing to load images using DICOMweb
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 15 Nov 2018 17:28:15 +0100
parents 939f626eb6d7
children 4fe42ae3653a b70e9be013e4
comparison
equal deleted inserted replaced
415:c0589c3173fd 417:aee3d7941c9b
148 148
149 149
150 private: 150 private:
151 class WebServicePayload; 151 class WebServicePayload;
152 152
153
154 protected: 153 protected:
155 IWebService& orthanc_; 154 IWebService& web_;
155 std::string baseUrl_;
156 156
157 public: 157 public:
158 OrthancApiClient(MessageBroker& broker, 158 OrthancApiClient(MessageBroker& broker,
159 IWebService& orthanc); 159 IWebService& web,
160 const std::string& baseUrl);
160 161
161 virtual ~OrthancApiClient() 162 virtual ~OrthancApiClient()
162 { 163 {
163 } 164 }
164 165
175 MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL, 176 MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
176 Orthanc::IDynamicObject* payload = NULL /* takes ownership */); 177 Orthanc::IDynamicObject* payload = NULL /* takes ownership */);
177 178
178 // schedule a GET request expecting a binary response. 179 // schedule a GET request expecting a binary response.
179 void GetBinaryAsync(const std::string& uri, 180 void GetBinaryAsync(const std::string& uri,
180 const IWebService::Headers& headers, 181 const IWebService::HttpHeaders& headers,
181 MessageHandler<BinaryResponseReadyMessage>* successCallback, 182 MessageHandler<BinaryResponseReadyMessage>* successCallback,
182 MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL, 183 MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
183 Orthanc::IDynamicObject* payload = NULL /* takes ownership */); 184 Orthanc::IDynamicObject* payload = NULL /* takes ownership */);
184 185
185 // schedule a POST request expecting a JSON response. 186 // schedule a POST request expecting a JSON response.