Mercurial > hg > orthanc
comparison Plugins/Samples/Common/OrthancPluginCppWrapper.h @ 2058:43cd2ab060c7
cont OrthancPluginCppWrapper
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 30 Jun 2016 08:20:23 +0200 |
parents | 54417b0831c4 |
children | 8e67325eaa3f |
comparison
equal
deleted
inserted
replaced
2057:54417b0831c4 | 2058:43cd2ab060c7 |
---|---|
125 const char* body, | 125 const char* body, |
126 size_t bodySize, | 126 size_t bodySize, |
127 bool applyPlugins); | 127 bool applyPlugins); |
128 | 128 |
129 bool RestApiPost(const std::string& uri, | 129 bool RestApiPost(const std::string& uri, |
130 const Json::Value& body, | |
131 bool applyPlugins); | |
132 | |
133 bool RestApiPut(const std::string& uri, | |
134 const Json::Value& body, | |
135 bool applyPlugins); | |
136 | |
137 bool RestApiPost(const std::string& uri, | |
130 const std::string& body, | 138 const std::string& body, |
131 bool applyPlugins) | 139 bool applyPlugins) |
132 { | 140 { |
133 return RestApiPost(uri, body.empty() ? NULL : body.c_str(), body.size(), applyPlugins); | 141 return RestApiPost(uri, body.empty() ? NULL : body.c_str(), body.size(), applyPlugins); |
134 } | 142 } |
283 void AnswerJpegImage(OrthancPluginRestOutput* output, | 291 void AnswerJpegImage(OrthancPluginRestOutput* output, |
284 uint8_t quality); | 292 uint8_t quality); |
285 }; | 293 }; |
286 | 294 |
287 | 295 |
288 bool RestApiGetJson(Json::Value& result, | 296 bool RestApiGet(Json::Value& result, |
289 OrthancPluginContext* context, | 297 OrthancPluginContext* context, |
290 const std::string& uri, | 298 const std::string& uri, |
291 bool applyPlugins); | 299 bool applyPlugins); |
292 | 300 |
293 bool RestApiPostJson(Json::Value& result, | 301 bool RestApiPost(Json::Value& result, |
294 OrthancPluginContext* context, | 302 OrthancPluginContext* context, |
295 const std::string& uri, | 303 const std::string& uri, |
296 const char* body, | 304 const char* body, |
297 size_t bodySize, | 305 size_t bodySize, |
298 bool applyPlugins); | 306 bool applyPlugins); |
299 | 307 |
300 bool RestApiPutJson(Json::Value& result, | 308 bool RestApiPost(Json::Value& result, |
301 OrthancPluginContext* context, | 309 OrthancPluginContext* context, |
302 const std::string& uri, | 310 const std::string& uri, |
303 const char* body, | 311 const Json::Value& body, |
304 size_t bodySize, | 312 bool applyPlugins); |
305 bool applyPlugins); | 313 |
306 | 314 inline bool RestApiPost(Json::Value& result, |
307 inline bool RestApiPostJson(Json::Value& result, | 315 OrthancPluginContext* context, |
308 OrthancPluginContext* context, | 316 const std::string& uri, |
309 const std::string& uri, | 317 const std::string& body, |
310 const std::string& body, | 318 bool applyPlugins) |
311 bool applyPlugins) | 319 { |
312 { | 320 return RestApiPost(result, context, uri, body.empty() ? NULL : body.c_str(), |
313 return RestApiPostJson(result, context, uri, body.empty() ? NULL : body.c_str(), | 321 body.size(), applyPlugins); |
314 body.size(), applyPlugins); | 322 } |
323 | |
324 bool RestApiPut(Json::Value& result, | |
325 OrthancPluginContext* context, | |
326 const std::string& uri, | |
327 const char* body, | |
328 size_t bodySize, | |
329 bool applyPlugins); | |
330 | |
331 bool RestApiPut(Json::Value& result, | |
332 OrthancPluginContext* context, | |
333 const std::string& uri, | |
334 const Json::Value& body, | |
335 bool applyPlugins); | |
336 | |
337 inline bool RestApiPut(Json::Value& result, | |
338 OrthancPluginContext* context, | |
339 const std::string& uri, | |
340 const std::string& body, | |
341 bool applyPlugins) | |
342 { | |
343 return RestApiPut(result, context, uri, body.empty() ? NULL : body.c_str(), | |
344 body.size(), applyPlugins); | |
315 } | 345 } |
316 | 346 |
317 bool RestApiDelete(OrthancPluginContext* context, | 347 bool RestApiDelete(OrthancPluginContext* context, |
318 const std::string& uri, | 348 const std::string& uri, |
319 bool applyPlugins); | 349 bool applyPlugins); |
320 | |
321 inline bool RestApiPutJson(Json::Value& result, | |
322 OrthancPluginContext* context, | |
323 const std::string& uri, | |
324 const std::string& body, | |
325 bool applyPlugins) | |
326 { | |
327 return RestApiPutJson(result, context, uri, body.empty() ? NULL : body.c_str(), | |
328 body.size(), applyPlugins); | |
329 } | |
330 | 350 |
331 bool RestApiDelete(OrthancPluginContext* context, | 351 bool RestApiDelete(OrthancPluginContext* context, |
332 const std::string& uri, | 352 const std::string& uri, |
333 bool applyPlugins); | 353 bool applyPlugins); |
334 | 354 |