comparison Plugins/OrthancCPlugin/OrthancCPlugin.h @ 912:dcb2469f00f4 plugins

PluginsHttpHandler::RestApiGet
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 20 Jun 2014 14:55:24 +0200
parents e078ea944089
children 3e43de893d88
comparison
equal deleted inserted replaced
911:306afd58a0b3 912:dcb2469f00f4
212 212
213 /* Sending answers to REST calls */ 213 /* Sending answers to REST calls */
214 _OrthancPluginService_AnswerBuffer = 2000, 214 _OrthancPluginService_AnswerBuffer = 2000,
215 _OrthancPluginService_CompressAndAnswerPngImage = 2001, 215 _OrthancPluginService_CompressAndAnswerPngImage = 2001,
216 216
217 /* Access to the Orthanc database */ 217 /* Access to the Orthanc database and API */
218 _OrthancPluginService_GetDicomForInstance = 3000 218 _OrthancPluginService_GetDicomForInstance = 3000,
219 _OrthancPluginService_RestApiGet = 3001,
220 _OrthancPluginService_RestApiPost = 3002,
221 _OrthancPluginService_RestApiDelete = 3003,
222 _OrthancPluginService_RestApiPut = 3004
219 } _OrthancPluginService; 223 } _OrthancPluginService;
220 224
221 225
222 226
223 /** 227 /**
542 params.instanceId = instanceId; 546 params.instanceId = instanceId;
543 return context->InvokeService(context, _OrthancPluginService_GetDicomForInstance, &params); 547 return context->InvokeService(context, _OrthancPluginService_GetDicomForInstance, &params);
544 } 548 }
545 549
546 550
551
552 typedef struct
553 {
554 OrthancPluginMemoryBuffer* target;
555 const char* uri;
556 } _OrthancPluginRestApiGet;
557
558 ORTHANC_PLUGIN_INLINE int OrthancPluginRestApiGet(
559 OrthancPluginContext* context,
560 OrthancPluginMemoryBuffer* target,
561 const char* uri)
562 {
563 _OrthancPluginRestApiGet params;
564 params.target = target;
565 params.uri = uri;
566 return context->InvokeService(context, _OrthancPluginService_RestApiGet, &params);
567 }
568
569
547 #ifdef __cplusplus 570 #ifdef __cplusplus
548 } 571 }
549 #endif 572 #endif
550 573
551 574