comparison Plugins/Engine/PluginsHttpHandler.cpp @ 900:1b92ce45cc8d plugins

plugin doc
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 18 Jun 2014 14:02:02 +0200
parents bb0a51561016
children 7d88f3f4a3b3
comparison
equal deleted inserted replaced
899:bb0a51561016 900:1b92ce45cc8d
207 207
208 switch (service) 208 switch (service)
209 { 209 {
210 case OrthancPluginService_RegisterRestCallback: 210 case OrthancPluginService_RegisterRestCallback:
211 { 211 {
212 const OrthancPluginRestCallbackParams& p = 212 const _OrthancPluginRestCallbackParams& p =
213 *reinterpret_cast<const OrthancPluginRestCallbackParams*>(parameters); 213 *reinterpret_cast<const _OrthancPluginRestCallbackParams*>(parameters);
214 214
215 LOG(INFO) << "Plugin has registered a REST callback on: " << p.pathRegularExpression; 215 LOG(INFO) << "Plugin has registered a REST callback on: " << p.pathRegularExpression;
216 pimpl_->callbacks_.push_back(std::make_pair(new boost::regex(p.pathRegularExpression), p.callback)); 216 pimpl_->callbacks_.push_back(std::make_pair(new boost::regex(p.pathRegularExpression), p.callback));
217 217
218 return true; 218 return true;
219 } 219 }
220 220
221 case OrthancPluginService_AnswerBuffer: 221 case OrthancPluginService_AnswerBuffer:
222 { 222 {
223 const OrthancPluginAnswerBufferParams& p = 223 const _OrthancPluginAnswerBufferParams& p =
224 *reinterpret_cast<const OrthancPluginAnswerBufferParams*>(parameters); 224 *reinterpret_cast<const _OrthancPluginAnswerBufferParams*>(parameters);
225 225
226 HttpOutput* translatedOutput = reinterpret_cast<HttpOutput*>(p.output); 226 HttpOutput* translatedOutput = reinterpret_cast<HttpOutput*>(p.output);
227 translatedOutput->AnswerBufferWithContentType(p.answer, p.answerSize, p.mimeType); 227 translatedOutput->AnswerBufferWithContentType(p.answer, p.answerSize, p.mimeType);
228 228
229 return true; 229 return true;