comparison Sources/Autogenerated/sdk_OrthancPluginRestOutput.impl.h @ 131:c55b0583084b

integration fix-leak->mainline
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 30 Aug 2023 11:52:45 +0200
parents 65ec5597ec70 5643e97d9367
children 71d305c29cfa
comparison
equal deleted inserted replaced
130:a3f77cf16396 131:c55b0583084b
133 }; 133 };
134 134
135 135
136 136
137 137
138 // Actual implementation of the methods
139 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginAnswerBuffer(
140 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
141 {
142 PythonLock::LogCall("Calling method OrthancPluginAnswerBuffer() on object of class OrthancPluginRestOutput");
143
144 if (self->object_ == NULL)
145 {
146 PyErr_SetString(PyExc_ValueError, "Invalid object");
147 return NULL;
148 }
149
150 Py_buffer arg0;
151 const char* arg2 = NULL;
152
153 if (!PyArg_ParseTuple(args, "s*s", &arg0, &arg2))
154 {
155 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)");
156 return NULL;
157 }
158 OrthancPluginAnswerBuffer(OrthancPlugins::GetGlobalContext(), self->object_, arg0.buf, arg0.len, arg2);
159 PyBuffer_Release(&arg0);
160
161 Py_INCREF(Py_None);
162 return Py_None;
163 }
164
165 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginCompressAndAnswerPngImage(
166 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
167 {
168 PythonLock::LogCall("Calling method OrthancPluginCompressAndAnswerPngImage() on object of class OrthancPluginRestOutput");
169
170 if (self->object_ == NULL)
171 {
172 PyErr_SetString(PyExc_ValueError, "Invalid object");
173 return NULL;
174 }
175
176 long int arg0 = 0;
177 unsigned long arg1 = 0;
178 unsigned long arg2 = 0;
179 unsigned long arg3 = 0;
180 Py_buffer arg4;
181
182 if (!PyArg_ParseTuple(args, "lkkks*", &arg0, &arg1, &arg2, &arg3, &arg4))
183 {
184 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (5 arguments expected)");
185 return NULL;
186 }
187 OrthancPluginCompressAndAnswerPngImage(OrthancPlugins::GetGlobalContext(), self->object_, static_cast<OrthancPluginPixelFormat>(arg0), arg1, arg2, arg3, arg4.buf);
188 PyBuffer_Release(&arg4);
189
190 Py_INCREF(Py_None);
191 return Py_None;
192 }
193
194 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginRedirect(
195 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
196 {
197 PythonLock::LogCall("Calling method OrthancPluginRedirect() on object of class OrthancPluginRestOutput");
198
199 if (self->object_ == NULL)
200 {
201 PyErr_SetString(PyExc_ValueError, "Invalid object");
202 return NULL;
203 }
204
205 const char* arg0 = NULL;
206
207 if (!PyArg_ParseTuple(args, "s", &arg0))
208 {
209 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
210 return NULL;
211 }
212 OrthancPluginRedirect(OrthancPlugins::GetGlobalContext(), self->object_, arg0);
213
214
215 Py_INCREF(Py_None);
216 return Py_None;
217 }
218
219 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendHttpStatusCode(
220 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
221 {
222 PythonLock::LogCall("Calling method OrthancPluginSendHttpStatusCode() on object of class OrthancPluginRestOutput");
223
224 if (self->object_ == NULL)
225 {
226 PyErr_SetString(PyExc_ValueError, "Invalid object");
227 return NULL;
228 }
229
230 unsigned short arg0 = 0;
231
232 if (!PyArg_ParseTuple(args, "H", &arg0))
233 {
234 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
235 return NULL;
236 }
237 OrthancPluginSendHttpStatusCode(OrthancPlugins::GetGlobalContext(), self->object_, arg0);
238
239
240 Py_INCREF(Py_None);
241 return Py_None;
242 }
243
244 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendUnauthorized(
245 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
246 {
247 PythonLock::LogCall("Calling method OrthancPluginSendUnauthorized() on object of class OrthancPluginRestOutput");
248
249 if (self->object_ == NULL)
250 {
251 PyErr_SetString(PyExc_ValueError, "Invalid object");
252 return NULL;
253 }
254
255 const char* arg0 = NULL;
256
257 if (!PyArg_ParseTuple(args, "s", &arg0))
258 {
259 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
260 return NULL;
261 }
262 OrthancPluginSendUnauthorized(OrthancPlugins::GetGlobalContext(), self->object_, arg0);
263
264
265 Py_INCREF(Py_None);
266 return Py_None;
267 }
268
269 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendMethodNotAllowed(
270 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
271 {
272 PythonLock::LogCall("Calling method OrthancPluginSendMethodNotAllowed() on object of class OrthancPluginRestOutput");
273
274 if (self->object_ == NULL)
275 {
276 PyErr_SetString(PyExc_ValueError, "Invalid object");
277 return NULL;
278 }
279
280 const char* arg0 = NULL;
281
282 if (!PyArg_ParseTuple(args, "s", &arg0))
283 {
284 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
285 return NULL;
286 }
287 OrthancPluginSendMethodNotAllowed(OrthancPlugins::GetGlobalContext(), self->object_, arg0);
288
289
290 Py_INCREF(Py_None);
291 return Py_None;
292 }
293
294 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSetCookie(
295 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
296 {
297 PythonLock::LogCall("Calling method OrthancPluginSetCookie() on object of class OrthancPluginRestOutput");
298
299 if (self->object_ == NULL)
300 {
301 PyErr_SetString(PyExc_ValueError, "Invalid object");
302 return NULL;
303 }
304
305 const char* arg0 = NULL;
306 const char* arg1 = NULL;
307
308 if (!PyArg_ParseTuple(args, "ss", &arg0, &arg1))
309 {
310 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)");
311 return NULL;
312 }
313 OrthancPluginSetCookie(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1);
314
315
316 Py_INCREF(Py_None);
317 return Py_None;
318 }
319
320 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSetHttpHeader(
321 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
322 {
323 PythonLock::LogCall("Calling method OrthancPluginSetHttpHeader() on object of class OrthancPluginRestOutput");
324
325 if (self->object_ == NULL)
326 {
327 PyErr_SetString(PyExc_ValueError, "Invalid object");
328 return NULL;
329 }
330
331 const char* arg0 = NULL;
332 const char* arg1 = NULL;
333
334 if (!PyArg_ParseTuple(args, "ss", &arg0, &arg1))
335 {
336 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)");
337 return NULL;
338 }
339 OrthancPluginSetHttpHeader(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1);
340
341
342 Py_INCREF(Py_None);
343 return Py_None;
344 }
345
346 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginStartMultipartAnswer(
347 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
348 {
349 PythonLock::LogCall("Calling method OrthancPluginStartMultipartAnswer() on object of class OrthancPluginRestOutput");
350
351 if (self->object_ == NULL)
352 {
353 PyErr_SetString(PyExc_ValueError, "Invalid object");
354 return NULL;
355 }
356
357 const char* arg0 = NULL;
358 const char* arg1 = NULL;
359
360 if (!PyArg_ParseTuple(args, "ss", &arg0, &arg1))
361 {
362 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)");
363 return NULL;
364 }
365 OrthancPluginErrorCode code = OrthancPluginStartMultipartAnswer(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1);
366
367
368 if (code == OrthancPluginErrorCode_Success)
369 {
370 Py_INCREF(Py_None);
371 return Py_None;
372 }
373 else
374 {
375 PythonLock::RaiseException(code);
376 return NULL;
377 }
378 }
379
380 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendMultipartItem(
381 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
382 {
383 PythonLock::LogCall("Calling method OrthancPluginSendMultipartItem() on object of class OrthancPluginRestOutput");
384
385 if (self->object_ == NULL)
386 {
387 PyErr_SetString(PyExc_ValueError, "Invalid object");
388 return NULL;
389 }
390
391 Py_buffer arg0;
392
393 if (!PyArg_ParseTuple(args, "s*", &arg0))
394 {
395 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
396 return NULL;
397 }
398 OrthancPluginErrorCode code = OrthancPluginSendMultipartItem(OrthancPlugins::GetGlobalContext(), self->object_, arg0.buf, arg0.len);
399 PyBuffer_Release(&arg0);
400
401 if (code == OrthancPluginErrorCode_Success)
402 {
403 Py_INCREF(Py_None);
404 return Py_None;
405 }
406 else
407 {
408 PythonLock::RaiseException(code);
409 return NULL;
410 }
411 }
412
413 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendHttpStatus(
414 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
415 {
416 PythonLock::LogCall("Calling method OrthancPluginSendHttpStatus() on object of class OrthancPluginRestOutput");
417
418 if (self->object_ == NULL)
419 {
420 PyErr_SetString(PyExc_ValueError, "Invalid object");
421 return NULL;
422 }
423
424 unsigned short arg0 = 0;
425 const char* arg1 = NULL;
426 unsigned long arg2 = 0;
427
428 if (!PyArg_ParseTuple(args, "Hsk", &arg0, &arg1, &arg2))
429 {
430 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (3 arguments expected)");
431 return NULL;
432 }
433 OrthancPluginSendHttpStatus(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1, arg2);
434
435
436 Py_INCREF(Py_None);
437 return Py_None;
438 }
439
440 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginCompressAndAnswerJpegImage(
441 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
442 {
443 PythonLock::LogCall("Calling method OrthancPluginCompressAndAnswerJpegImage() on object of class OrthancPluginRestOutput");
444
445 if (self->object_ == NULL)
446 {
447 PyErr_SetString(PyExc_ValueError, "Invalid object");
448 return NULL;
449 }
450
451 long int arg0 = 0;
452 unsigned long arg1 = 0;
453 unsigned long arg2 = 0;
454 unsigned long arg3 = 0;
455 Py_buffer arg4;
456 unsigned char arg5 = 0;
457
458 if (!PyArg_ParseTuple(args, "lkkks*b", &arg0, &arg1, &arg2, &arg3, &arg4, &arg5))
459 {
460 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (6 arguments expected)");
461 return NULL;
462 }
463 OrthancPluginCompressAndAnswerJpegImage(OrthancPlugins::GetGlobalContext(), self->object_, static_cast<OrthancPluginPixelFormat>(arg0), arg1, arg2, arg3, arg4.buf, arg5);
464 PyBuffer_Release(&arg4);
465
466 Py_INCREF(Py_None);
467 return Py_None;
468 }
469
470 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSetHttpErrorDetails(
471 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
472 {
473 PythonLock::LogCall("Calling method OrthancPluginSetHttpErrorDetails() on object of class OrthancPluginRestOutput");
474
475 if (self->object_ == NULL)
476 {
477 PyErr_SetString(PyExc_ValueError, "Invalid object");
478 return NULL;
479 }
480
481 const char* arg0 = NULL;
482 unsigned char arg1 = 0;
483
484 if (!PyArg_ParseTuple(args, "sb", &arg0, &arg1))
485 {
486 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)");
487 return NULL;
488 }
489 OrthancPluginSetHttpErrorDetails(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1);
490
491
492 Py_INCREF(Py_None);
493 return Py_None;
494 }
495
496
497
498 static void RegisterOrthancPluginRestOutputClass(PyObject* module) 138 static void RegisterOrthancPluginRestOutputClass(PyObject* module)
499 { 139 {
500 sdk_OrthancPluginRestOutput_Type.tp_new = PyType_GenericNew; 140 sdk_OrthancPluginRestOutput_Type.tp_new = PyType_GenericNew;
501 sdk_OrthancPluginRestOutput_Type.tp_flags = Py_TPFLAGS_DEFAULT; 141 sdk_OrthancPluginRestOutput_Type.tp_flags = Py_TPFLAGS_DEFAULT;
502 sdk_OrthancPluginRestOutput_Type.tp_doc = "Generated from Orthanc C class: OrthancPluginRestOutput"; 142 sdk_OrthancPluginRestOutput_Type.tp_doc = "Generated from Orthanc C class: OrthancPluginRestOutput";