comparison Sources/Autogenerated/sdk_OrthancPluginRestOutput.methods.h @ 184:f34f3a149c22 java-code-model

added class PythonThreadsAllower
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 02 Jul 2024 15:49:05 +0200
parents 194ba7d6e0f4
children 55473de7694f
comparison
equal deleted inserted replaced
183:d31f216c9462 184:f34f3a149c22
17 { 17 {
18 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)"); 18 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)");
19 return NULL; 19 return NULL;
20 } 20 }
21 21
22 OrthancPluginAnswerBuffer(OrthancPlugins::GetGlobalContext(), self->object_, arg0.buf, arg0.len, arg2); 22 {
23 PythonThreadsAllower allower;
24 OrthancPluginAnswerBuffer(OrthancPlugins::GetGlobalContext(), self->object_, arg0.buf, arg0.len, arg2);
25 }
23 PyBuffer_Release(&arg0); 26 PyBuffer_Release(&arg0);
24 27
25 Py_INCREF(Py_None); 28 Py_INCREF(Py_None);
26 return Py_None; 29 return Py_None;
27 } 30 }
47 { 50 {
48 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (5 arguments expected)"); 51 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (5 arguments expected)");
49 return NULL; 52 return NULL;
50 } 53 }
51 54
52 OrthancPluginCompressAndAnswerPngImage(OrthancPlugins::GetGlobalContext(), self->object_, static_cast<OrthancPluginPixelFormat>(arg0), arg1, arg2, arg3, arg4.buf); 55 {
56 PythonThreadsAllower allower;
57 OrthancPluginCompressAndAnswerPngImage(OrthancPlugins::GetGlobalContext(), self->object_, static_cast<OrthancPluginPixelFormat>(arg0), arg1, arg2, arg3, arg4.buf);
58 }
53 PyBuffer_Release(&arg4); 59 PyBuffer_Release(&arg4);
54 60
55 Py_INCREF(Py_None); 61 Py_INCREF(Py_None);
56 return Py_None; 62 return Py_None;
57 } 63 }
73 { 79 {
74 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); 80 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
75 return NULL; 81 return NULL;
76 } 82 }
77 83
78 OrthancPluginRedirect(OrthancPlugins::GetGlobalContext(), self->object_, arg0); 84 {
85 PythonThreadsAllower allower;
86 OrthancPluginRedirect(OrthancPlugins::GetGlobalContext(), self->object_, arg0);
87 }
79 88
80 89
81 Py_INCREF(Py_None); 90 Py_INCREF(Py_None);
82 return Py_None; 91 return Py_None;
83 } 92 }
99 { 108 {
100 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); 109 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
101 return NULL; 110 return NULL;
102 } 111 }
103 112
104 OrthancPluginSendHttpStatusCode(OrthancPlugins::GetGlobalContext(), self->object_, arg0); 113 {
114 PythonThreadsAllower allower;
115 OrthancPluginSendHttpStatusCode(OrthancPlugins::GetGlobalContext(), self->object_, arg0);
116 }
105 117
106 118
107 Py_INCREF(Py_None); 119 Py_INCREF(Py_None);
108 return Py_None; 120 return Py_None;
109 } 121 }
125 { 137 {
126 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); 138 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
127 return NULL; 139 return NULL;
128 } 140 }
129 141
130 OrthancPluginSendUnauthorized(OrthancPlugins::GetGlobalContext(), self->object_, arg0); 142 {
143 PythonThreadsAllower allower;
144 OrthancPluginSendUnauthorized(OrthancPlugins::GetGlobalContext(), self->object_, arg0);
145 }
131 146
132 147
133 Py_INCREF(Py_None); 148 Py_INCREF(Py_None);
134 return Py_None; 149 return Py_None;
135 } 150 }
151 { 166 {
152 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); 167 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
153 return NULL; 168 return NULL;
154 } 169 }
155 170
156 OrthancPluginSendMethodNotAllowed(OrthancPlugins::GetGlobalContext(), self->object_, arg0); 171 {
172 PythonThreadsAllower allower;
173 OrthancPluginSendMethodNotAllowed(OrthancPlugins::GetGlobalContext(), self->object_, arg0);
174 }
157 175
158 176
159 Py_INCREF(Py_None); 177 Py_INCREF(Py_None);
160 return Py_None; 178 return Py_None;
161 } 179 }
178 { 196 {
179 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)"); 197 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)");
180 return NULL; 198 return NULL;
181 } 199 }
182 200
183 OrthancPluginSetCookie(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1); 201 {
202 PythonThreadsAllower allower;
203 OrthancPluginSetCookie(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1);
204 }
184 205
185 206
186 Py_INCREF(Py_None); 207 Py_INCREF(Py_None);
187 return Py_None; 208 return Py_None;
188 } 209 }
205 { 226 {
206 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)"); 227 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)");
207 return NULL; 228 return NULL;
208 } 229 }
209 230
210 OrthancPluginSetHttpHeader(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1); 231 {
232 PythonThreadsAllower allower;
233 OrthancPluginSetHttpHeader(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1);
234 }
211 235
212 236
213 Py_INCREF(Py_None); 237 Py_INCREF(Py_None);
214 return Py_None; 238 return Py_None;
215 } 239 }
232 { 256 {
233 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)"); 257 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)");
234 return NULL; 258 return NULL;
235 } 259 }
236 260
237 OrthancPluginErrorCode code = OrthancPluginStartMultipartAnswer(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1); 261 OrthancPluginErrorCode code;
262 {
263 PythonThreadsAllower allower;
264 code = OrthancPluginStartMultipartAnswer(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1);
265 }
238 266
239 267
240 if (code == OrthancPluginErrorCode_Success) 268 if (code == OrthancPluginErrorCode_Success)
241 { 269 {
242 Py_INCREF(Py_None); 270 Py_INCREF(Py_None);
266 { 294 {
267 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); 295 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
268 return NULL; 296 return NULL;
269 } 297 }
270 298
271 OrthancPluginErrorCode code = OrthancPluginSendMultipartItem(OrthancPlugins::GetGlobalContext(), self->object_, arg0.buf, arg0.len); 299 OrthancPluginErrorCode code;
300 {
301 PythonThreadsAllower allower;
302 code = OrthancPluginSendMultipartItem(OrthancPlugins::GetGlobalContext(), self->object_, arg0.buf, arg0.len);
303 }
272 PyBuffer_Release(&arg0); 304 PyBuffer_Release(&arg0);
273 305
274 if (code == OrthancPluginErrorCode_Success) 306 if (code == OrthancPluginErrorCode_Success)
275 { 307 {
276 Py_INCREF(Py_None); 308 Py_INCREF(Py_None);
301 { 333 {
302 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)"); 334 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)");
303 return NULL; 335 return NULL;
304 } 336 }
305 337
306 OrthancPluginSendHttpStatus(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1.buf, arg1.len); 338 {
339 PythonThreadsAllower allower;
340 OrthancPluginSendHttpStatus(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1.buf, arg1.len);
341 }
307 PyBuffer_Release(&arg1); 342 PyBuffer_Release(&arg1);
308 343
309 Py_INCREF(Py_None); 344 Py_INCREF(Py_None);
310 return Py_None; 345 return Py_None;
311 } 346 }
332 { 367 {
333 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (6 arguments expected)"); 368 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (6 arguments expected)");
334 return NULL; 369 return NULL;
335 } 370 }
336 371
337 OrthancPluginCompressAndAnswerJpegImage(OrthancPlugins::GetGlobalContext(), self->object_, static_cast<OrthancPluginPixelFormat>(arg0), arg1, arg2, arg3, arg4.buf, arg5); 372 {
373 PythonThreadsAllower allower;
374 OrthancPluginCompressAndAnswerJpegImage(OrthancPlugins::GetGlobalContext(), self->object_, static_cast<OrthancPluginPixelFormat>(arg0), arg1, arg2, arg3, arg4.buf, arg5);
375 }
338 PyBuffer_Release(&arg4); 376 PyBuffer_Release(&arg4);
339 377
340 Py_INCREF(Py_None); 378 Py_INCREF(Py_None);
341 return Py_None; 379 return Py_None;
342 } 380 }
359 { 397 {
360 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)"); 398 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)");
361 return NULL; 399 return NULL;
362 } 400 }
363 401
364 OrthancPluginSetHttpErrorDetails(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1); 402 {
365 403 PythonThreadsAllower allower;
366 404 OrthancPluginSetHttpErrorDetails(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1);
367 Py_INCREF(Py_None); 405 }
368 return Py_None; 406
369 } 407
370 408 Py_INCREF(Py_None);
409 return Py_None;
410 }
411