comparison Plugins/Engine/OrthancPlugins.cpp @ 1137:d9c27f9f1a51

OrthancPluginSetHttpHeader
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 09 Sep 2014 17:33:46 +0200
parents 208dc67b9bab
children 0479d02c6778
comparison
equal deleted inserted replaced
1136:208dc67b9bab 1137:d9c27f9f1a51
404 } 404 }
405 405
406 406
407 void OrthancPlugins::SetCookie(const void* parameters) 407 void OrthancPlugins::SetCookie(const void* parameters)
408 { 408 {
409 const _OrthancPluginSetCookie& p = 409 const _OrthancPluginSetHttpHeader& p =
410 *reinterpret_cast<const _OrthancPluginSetCookie*>(parameters); 410 *reinterpret_cast<const _OrthancPluginSetHttpHeader*>(parameters);
411 411
412 HttpOutput* translatedOutput = reinterpret_cast<HttpOutput*>(p.output); 412 HttpOutput* translatedOutput = reinterpret_cast<HttpOutput*>(p.output);
413 translatedOutput->SetCookie(p.cookie, p.value); 413 translatedOutput->SetCookie(p.key, p.value);
414 }
415
416
417 void OrthancPlugins::SetHttpHeader(const void* parameters)
418 {
419 const _OrthancPluginSetHttpHeader& p =
420 *reinterpret_cast<const _OrthancPluginSetHttpHeader*>(parameters);
421
422 HttpOutput* translatedOutput = reinterpret_cast<HttpOutput*>(p.output);
423 translatedOutput->AddHeader(p.key, p.value);
414 } 424 }
415 425
416 426
417 void OrthancPlugins::CompressAndAnswerPngImage(const void* parameters) 427 void OrthancPlugins::CompressAndAnswerPngImage(const void* parameters)
418 { 428 {
789 SendHttpStatusCode(parameters); 799 SendHttpStatusCode(parameters);
790 return true; 800 return true;
791 801
792 case _OrthancPluginService_SetCookie: 802 case _OrthancPluginService_SetCookie:
793 SetCookie(parameters); 803 SetCookie(parameters);
804 return true;
805
806 case _OrthancPluginService_SetHttpHeader:
807 SetHttpHeader(parameters);
794 return true; 808 return true;
795 809
796 case _OrthancPluginService_LookupPatient: 810 case _OrthancPluginService_LookupPatient:
797 case _OrthancPluginService_LookupStudy: 811 case _OrthancPluginService_LookupStudy:
798 case _OrthancPluginService_LookupStudyWithAccessionNumber: 812 case _OrthancPluginService_LookupStudyWithAccessionNumber: