comparison Sources/Autogenerated/sdk_OrthancPluginRestOutput.methods.h @ 129:5643e97d9367 fix-leak

reproducible code generation
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 30 Aug 2023 11:40:22 +0200
parents
children cc0765aae484
comparison
equal deleted inserted replaced
128:5b59ebc267e1 129:5643e97d9367
1 // Actual implementation of the methods
2 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginAnswerBuffer(
3 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
4 {
5 PythonLock::LogCall("Calling method OrthancPluginAnswerBuffer() on object of class OrthancPluginRestOutput");
6
7 if (self->object_ == NULL)
8 {
9 PyErr_SetString(PyExc_ValueError, "Invalid object");
10 return NULL;
11 }
12
13 Py_buffer arg0;
14 const char* arg2 = NULL;
15
16 if (!PyArg_ParseTuple(args, "s*s", &arg0, &arg2))
17 {
18 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)");
19 return NULL;
20 }
21 OrthancPluginAnswerBuffer(OrthancPlugins::GetGlobalContext(), self->object_, arg0.buf, arg0.len, arg2);
22 PyBuffer_Release(&arg0);
23
24 Py_INCREF(Py_None);
25 return Py_None;
26 }
27
28 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginCompressAndAnswerPngImage(
29 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
30 {
31 PythonLock::LogCall("Calling method OrthancPluginCompressAndAnswerPngImage() on object of class OrthancPluginRestOutput");
32
33 if (self->object_ == NULL)
34 {
35 PyErr_SetString(PyExc_ValueError, "Invalid object");
36 return NULL;
37 }
38
39 long int arg0 = 0;
40 unsigned long arg1 = 0;
41 unsigned long arg2 = 0;
42 unsigned long arg3 = 0;
43 Py_buffer arg4;
44
45 if (!PyArg_ParseTuple(args, "lkkks*", &arg0, &arg1, &arg2, &arg3, &arg4))
46 {
47 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (5 arguments expected)");
48 return NULL;
49 }
50 OrthancPluginCompressAndAnswerPngImage(OrthancPlugins::GetGlobalContext(), self->object_, static_cast<OrthancPluginPixelFormat>(arg0), arg1, arg2, arg3, arg4.buf);
51 PyBuffer_Release(&arg4);
52
53 Py_INCREF(Py_None);
54 return Py_None;
55 }
56
57 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginRedirect(
58 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
59 {
60 PythonLock::LogCall("Calling method OrthancPluginRedirect() on object of class OrthancPluginRestOutput");
61
62 if (self->object_ == NULL)
63 {
64 PyErr_SetString(PyExc_ValueError, "Invalid object");
65 return NULL;
66 }
67
68 const char* arg0 = NULL;
69
70 if (!PyArg_ParseTuple(args, "s", &arg0))
71 {
72 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
73 return NULL;
74 }
75 OrthancPluginRedirect(OrthancPlugins::GetGlobalContext(), self->object_, arg0);
76
77
78 Py_INCREF(Py_None);
79 return Py_None;
80 }
81
82 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendHttpStatusCode(
83 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
84 {
85 PythonLock::LogCall("Calling method OrthancPluginSendHttpStatusCode() on object of class OrthancPluginRestOutput");
86
87 if (self->object_ == NULL)
88 {
89 PyErr_SetString(PyExc_ValueError, "Invalid object");
90 return NULL;
91 }
92
93 unsigned short arg0 = 0;
94
95 if (!PyArg_ParseTuple(args, "H", &arg0))
96 {
97 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
98 return NULL;
99 }
100 OrthancPluginSendHttpStatusCode(OrthancPlugins::GetGlobalContext(), self->object_, arg0);
101
102
103 Py_INCREF(Py_None);
104 return Py_None;
105 }
106
107 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendUnauthorized(
108 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
109 {
110 PythonLock::LogCall("Calling method OrthancPluginSendUnauthorized() on object of class OrthancPluginRestOutput");
111
112 if (self->object_ == NULL)
113 {
114 PyErr_SetString(PyExc_ValueError, "Invalid object");
115 return NULL;
116 }
117
118 const char* arg0 = NULL;
119
120 if (!PyArg_ParseTuple(args, "s", &arg0))
121 {
122 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
123 return NULL;
124 }
125 OrthancPluginSendUnauthorized(OrthancPlugins::GetGlobalContext(), self->object_, arg0);
126
127
128 Py_INCREF(Py_None);
129 return Py_None;
130 }
131
132 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendMethodNotAllowed(
133 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
134 {
135 PythonLock::LogCall("Calling method OrthancPluginSendMethodNotAllowed() on object of class OrthancPluginRestOutput");
136
137 if (self->object_ == NULL)
138 {
139 PyErr_SetString(PyExc_ValueError, "Invalid object");
140 return NULL;
141 }
142
143 const char* arg0 = NULL;
144
145 if (!PyArg_ParseTuple(args, "s", &arg0))
146 {
147 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
148 return NULL;
149 }
150 OrthancPluginSendMethodNotAllowed(OrthancPlugins::GetGlobalContext(), self->object_, arg0);
151
152
153 Py_INCREF(Py_None);
154 return Py_None;
155 }
156
157 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSetCookie(
158 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
159 {
160 PythonLock::LogCall("Calling method OrthancPluginSetCookie() on object of class OrthancPluginRestOutput");
161
162 if (self->object_ == NULL)
163 {
164 PyErr_SetString(PyExc_ValueError, "Invalid object");
165 return NULL;
166 }
167
168 const char* arg0 = NULL;
169 const char* arg1 = NULL;
170
171 if (!PyArg_ParseTuple(args, "ss", &arg0, &arg1))
172 {
173 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)");
174 return NULL;
175 }
176 OrthancPluginSetCookie(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1);
177
178
179 Py_INCREF(Py_None);
180 return Py_None;
181 }
182
183 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSetHttpHeader(
184 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
185 {
186 PythonLock::LogCall("Calling method OrthancPluginSetHttpHeader() on object of class OrthancPluginRestOutput");
187
188 if (self->object_ == NULL)
189 {
190 PyErr_SetString(PyExc_ValueError, "Invalid object");
191 return NULL;
192 }
193
194 const char* arg0 = NULL;
195 const char* arg1 = NULL;
196
197 if (!PyArg_ParseTuple(args, "ss", &arg0, &arg1))
198 {
199 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)");
200 return NULL;
201 }
202 OrthancPluginSetHttpHeader(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1);
203
204
205 Py_INCREF(Py_None);
206 return Py_None;
207 }
208
209 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginStartMultipartAnswer(
210 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
211 {
212 PythonLock::LogCall("Calling method OrthancPluginStartMultipartAnswer() on object of class OrthancPluginRestOutput");
213
214 if (self->object_ == NULL)
215 {
216 PyErr_SetString(PyExc_ValueError, "Invalid object");
217 return NULL;
218 }
219
220 const char* arg0 = NULL;
221 const char* arg1 = NULL;
222
223 if (!PyArg_ParseTuple(args, "ss", &arg0, &arg1))
224 {
225 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)");
226 return NULL;
227 }
228 OrthancPluginErrorCode code = OrthancPluginStartMultipartAnswer(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1);
229
230
231 if (code == OrthancPluginErrorCode_Success)
232 {
233 Py_INCREF(Py_None);
234 return Py_None;
235 }
236 else
237 {
238 PythonLock::RaiseException(code);
239 return NULL;
240 }
241 }
242
243 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendMultipartItem(
244 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
245 {
246 PythonLock::LogCall("Calling method OrthancPluginSendMultipartItem() on object of class OrthancPluginRestOutput");
247
248 if (self->object_ == NULL)
249 {
250 PyErr_SetString(PyExc_ValueError, "Invalid object");
251 return NULL;
252 }
253
254 Py_buffer arg0;
255
256 if (!PyArg_ParseTuple(args, "s*", &arg0))
257 {
258 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
259 return NULL;
260 }
261 OrthancPluginErrorCode code = OrthancPluginSendMultipartItem(OrthancPlugins::GetGlobalContext(), self->object_, arg0.buf, arg0.len);
262 PyBuffer_Release(&arg0);
263
264 if (code == OrthancPluginErrorCode_Success)
265 {
266 Py_INCREF(Py_None);
267 return Py_None;
268 }
269 else
270 {
271 PythonLock::RaiseException(code);
272 return NULL;
273 }
274 }
275
276 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendHttpStatus(
277 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
278 {
279 PythonLock::LogCall("Calling method OrthancPluginSendHttpStatus() on object of class OrthancPluginRestOutput");
280
281 if (self->object_ == NULL)
282 {
283 PyErr_SetString(PyExc_ValueError, "Invalid object");
284 return NULL;
285 }
286
287 unsigned short arg0 = 0;
288 const char* arg1 = NULL;
289 unsigned long arg2 = 0;
290
291 if (!PyArg_ParseTuple(args, "Hsk", &arg0, &arg1, &arg2))
292 {
293 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (3 arguments expected)");
294 return NULL;
295 }
296 OrthancPluginSendHttpStatus(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1, arg2);
297
298
299 Py_INCREF(Py_None);
300 return Py_None;
301 }
302
303 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginCompressAndAnswerJpegImage(
304 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
305 {
306 PythonLock::LogCall("Calling method OrthancPluginCompressAndAnswerJpegImage() on object of class OrthancPluginRestOutput");
307
308 if (self->object_ == NULL)
309 {
310 PyErr_SetString(PyExc_ValueError, "Invalid object");
311 return NULL;
312 }
313
314 long int arg0 = 0;
315 unsigned long arg1 = 0;
316 unsigned long arg2 = 0;
317 unsigned long arg3 = 0;
318 Py_buffer arg4;
319 unsigned char arg5 = 0;
320
321 if (!PyArg_ParseTuple(args, "lkkks*b", &arg0, &arg1, &arg2, &arg3, &arg4, &arg5))
322 {
323 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (6 arguments expected)");
324 return NULL;
325 }
326 OrthancPluginCompressAndAnswerJpegImage(OrthancPlugins::GetGlobalContext(), self->object_, static_cast<OrthancPluginPixelFormat>(arg0), arg1, arg2, arg3, arg4.buf, arg5);
327 PyBuffer_Release(&arg4);
328
329 Py_INCREF(Py_None);
330 return Py_None;
331 }
332
333 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSetHttpErrorDetails(
334 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
335 {
336 PythonLock::LogCall("Calling method OrthancPluginSetHttpErrorDetails() on object of class OrthancPluginRestOutput");
337
338 if (self->object_ == NULL)
339 {
340 PyErr_SetString(PyExc_ValueError, "Invalid object");
341 return NULL;
342 }
343
344 const char* arg0 = NULL;
345 unsigned char arg1 = 0;
346
347 if (!PyArg_ParseTuple(args, "sb", &arg0, &arg1))
348 {
349 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)");
350 return NULL;
351 }
352 OrthancPluginSetHttpErrorDetails(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1);
353
354
355 Py_INCREF(Py_None);
356 return Py_None;
357 }
358