annotate Sources/Autogenerated/sdk_OrthancPluginRestOutput.impl.h @ 75:cbfc72a53970

refactoring calls to PythonLock::RaiseException()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 09 Aug 2021 16:59:59 +0200
parents 32de70a1e4c7
children eb6ac5a801d1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Python plugin for Orthanc
56
23f3099bed47 upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 41
diff changeset
3 * Copyright (C) 2020-2021 Osimis S.A., Belgium
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 *
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 * This program is free software: you can redistribute it and/or
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 * modify it under the terms of the GNU Affero General Public License
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * as published by the Free Software Foundation, either version 3 of
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * the License, or (at your option) any later version.
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 *
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful, but
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * Affero General Public License for more details.
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 *
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * You should have received a copy of the GNU Affero General Public License
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 **/
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19
63
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
20 // Forward declaration of the autogenerated methods
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginAnswerBuffer(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginCompressAndAnswerPngImage(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginRedirect(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendHttpStatusCode(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendUnauthorized(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendMethodNotAllowed(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSetCookie(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSetHttpHeader(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginStartMultipartAnswer(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendMultipartItem(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendHttpStatus(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginCompressAndAnswerJpegImage(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSetHttpErrorDetails(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
63
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
47 // End of forward declarations
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
48
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
49
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
50 // Forward declaration of the custom methods
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
51 // End of forward declarations
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 static PyMethodDef sdk_OrthancPluginRestOutput_Methods[] = {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 { "AnswerBuffer",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginAnswerBuffer, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 "Generated from C function OrthancPluginAnswerBuffer()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 { "CompressAndAnswerPngImage",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginCompressAndAnswerPngImage, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 "Generated from C function OrthancPluginCompressAndAnswerPngImage()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 { "Redirect",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginRedirect, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 "Generated from C function OrthancPluginRedirect()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 { "SendHttpStatusCode",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginSendHttpStatusCode, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 "Generated from C function OrthancPluginSendHttpStatusCode()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 { "SendUnauthorized",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginSendUnauthorized, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 "Generated from C function OrthancPluginSendUnauthorized()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 { "SendMethodNotAllowed",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginSendMethodNotAllowed, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 "Generated from C function OrthancPluginSendMethodNotAllowed()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 { "SetCookie",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginSetCookie, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 "Generated from C function OrthancPluginSetCookie()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 { "SetHttpHeader",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginSetHttpHeader, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 "Generated from C function OrthancPluginSetHttpHeader()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 { "StartMultipartAnswer",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginStartMultipartAnswer, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 "Generated from C function OrthancPluginStartMultipartAnswer()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 { "SendMultipartItem",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginSendMultipartItem, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 "Generated from C function OrthancPluginSendMultipartItem()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 { "SendHttpStatus",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginSendHttpStatus, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 "Generated from C function OrthancPluginSendHttpStatus()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 { "CompressAndAnswerJpegImage",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginCompressAndAnswerJpegImage, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 "Generated from C function OrthancPluginCompressAndAnswerJpegImage()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 { "SetHttpErrorDetails",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginSetHttpErrorDetails, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 "Generated from C function OrthancPluginSetHttpErrorDetails()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 { NULL } /* Sentinel */
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 };
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 static int sdk_OrthancPluginRestOutput_Constructor(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 sdk_OrthancPluginRestOutput_Object *self, PyObject *args, PyObject *kwds)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
101 PythonLock::LogCall("Creating Python object of class OrthancPluginRestOutput");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 self->object_ = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 self->borrowed_ = false;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 long long object = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 unsigned char borrowed = false;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 if (PyArg_ParseTuple(args, "Lb", &object, &borrowed))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 self->object_ = reinterpret_cast<OrthancPluginRestOutput*>(static_cast<intptr_t>(object));
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 self->borrowed_ = borrowed;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 return 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 else
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 PyErr_SetString(PyExc_ValueError, "Expected a pair (pointer, borrowed) in the constructor");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 return -1;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 /**
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 * Static global structure => the fields that are beyond the last
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 * initialized field are set to zero.
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 * https://stackoverflow.com/a/11152199/881731
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 **/
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 static PyTypeObject sdk_OrthancPluginRestOutput_Type = {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 PyVarObject_HEAD_INIT(NULL, 0)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 "orthanc.RestOutput", /* tp_name */
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 sizeof(sdk_OrthancPluginRestOutput_Object), /* tp_basicsize */
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 };
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 // Actual implementation of the methods
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginAnswerBuffer(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
141 PythonLock::LogCall("Calling method OrthancPluginAnswerBuffer() on object of class OrthancPluginRestOutput");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 Py_buffer arg0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 const char* arg2 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152 if (!PyArg_ParseTuple(args, "s*s", &arg0, &arg2))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 OrthancPluginAnswerBuffer(OrthancPlugins::GetGlobalContext(), self->object_, arg0.buf, arg0.len, arg2);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 PyBuffer_Release(&arg0);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161 return Py_None;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginCompressAndAnswerPngImage(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
167 PythonLock::LogCall("Calling method OrthancPluginCompressAndAnswerPngImage() on object of class OrthancPluginRestOutput");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175 long int arg0 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176 unsigned long arg1 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177 unsigned long arg2 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178 unsigned long arg3 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179 Py_buffer arg4;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181 if (!PyArg_ParseTuple(args, "lkkks*", &arg0, &arg1, &arg2, &arg3, &arg4))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (5 arguments expected)");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
185 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186 OrthancPluginCompressAndAnswerPngImage(OrthancPlugins::GetGlobalContext(), self->object_, static_cast<OrthancPluginPixelFormat>(arg0), arg1, arg2, arg3, arg4.buf);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187 PyBuffer_Release(&arg4);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
188
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
189 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
190 return Py_None;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
191 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
192
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
193 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginRedirect(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
194 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
195 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
196 PythonLock::LogCall("Calling method OrthancPluginRedirect() on object of class OrthancPluginRestOutput");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
197
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
198 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
199 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
200 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
201 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
202 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
203
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
204 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
205
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
206 if (!PyArg_ParseTuple(args, "s", &arg0))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
207 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
209 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
210 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
211 OrthancPluginRedirect(OrthancPlugins::GetGlobalContext(), self->object_, arg0);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
212
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
213
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
214 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
215 return Py_None;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
216 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
217
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
218 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendHttpStatusCode(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
219 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
220 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
221 PythonLock::LogCall("Calling method OrthancPluginSendHttpStatusCode() on object of class OrthancPluginRestOutput");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
222
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
223 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
224 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
225 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
226 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
227 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
228
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
229 unsigned short arg0 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
230
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
231 if (!PyArg_ParseTuple(args, "H", &arg0))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
232 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
233 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
234 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
235 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
236 OrthancPluginSendHttpStatusCode(OrthancPlugins::GetGlobalContext(), self->object_, arg0);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
237
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
238
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
239 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
240 return Py_None;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
241 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
242
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
243 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendUnauthorized(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
244 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
245 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
246 PythonLock::LogCall("Calling method OrthancPluginSendUnauthorized() on object of class OrthancPluginRestOutput");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
247
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
248 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
249 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
250 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
251 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
252 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
253
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
254 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
255
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
256 if (!PyArg_ParseTuple(args, "s", &arg0))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
257 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
258 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
259 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
260 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
261 OrthancPluginSendUnauthorized(OrthancPlugins::GetGlobalContext(), self->object_, arg0);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
262
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
263
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
264 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
265 return Py_None;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
266 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
267
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
268 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendMethodNotAllowed(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
269 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
270 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
271 PythonLock::LogCall("Calling method OrthancPluginSendMethodNotAllowed() on object of class OrthancPluginRestOutput");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
272
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
273 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
274 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
275 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
276 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
277 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
278
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
279 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
280
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
281 if (!PyArg_ParseTuple(args, "s", &arg0))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
282 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
283 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
284 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
285 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
286 OrthancPluginSendMethodNotAllowed(OrthancPlugins::GetGlobalContext(), self->object_, arg0);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
287
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
288
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
289 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
290 return Py_None;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
291 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
292
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
293 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSetCookie(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
294 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
295 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
296 PythonLock::LogCall("Calling method OrthancPluginSetCookie() on object of class OrthancPluginRestOutput");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
297
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
298 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
299 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
300 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
301 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
302 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
303
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
304 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
305 const char* arg1 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
306
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
307 if (!PyArg_ParseTuple(args, "ss", &arg0, &arg1))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
308 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
309 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
310 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
311 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
312 OrthancPluginSetCookie(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
313
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
314
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
315 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
316 return Py_None;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
317 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
318
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
319 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSetHttpHeader(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
320 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
321 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
322 PythonLock::LogCall("Calling method OrthancPluginSetHttpHeader() on object of class OrthancPluginRestOutput");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
323
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
324 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
325 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
326 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
327 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
328 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
329
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
330 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
331 const char* arg1 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
332
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
333 if (!PyArg_ParseTuple(args, "ss", &arg0, &arg1))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
334 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
335 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
336 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
337 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
338 OrthancPluginSetHttpHeader(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
339
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
340
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
341 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
342 return Py_None;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
343 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
344
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
345 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginStartMultipartAnswer(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
346 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
347 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
348 PythonLock::LogCall("Calling method OrthancPluginStartMultipartAnswer() on object of class OrthancPluginRestOutput");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
349
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
350 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
351 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
352 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
353 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
354 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
355
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
356 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
357 const char* arg1 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
358
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
359 if (!PyArg_ParseTuple(args, "ss", &arg0, &arg1))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
360 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
361 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
362 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
363 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
364 OrthancPluginErrorCode code = OrthancPluginStartMultipartAnswer(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
365
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
366
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
367 if (code == OrthancPluginErrorCode_Success)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
368 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
369 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
370 return Py_None;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
371 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
372 else
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
373 {
75
cbfc72a53970 refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 63
diff changeset
374 PythonLock::RaiseException(code);
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
375 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
376 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
377 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
378
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
379 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendMultipartItem(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
380 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
381 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
382 PythonLock::LogCall("Calling method OrthancPluginSendMultipartItem() on object of class OrthancPluginRestOutput");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
383
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
384 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
385 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
386 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
387 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
388 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
389
41
393d2da0722a upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 28
diff changeset
390 Py_buffer arg0;
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
391
41
393d2da0722a upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 28
diff changeset
392 if (!PyArg_ParseTuple(args, "s*", &arg0))
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
393 {
41
393d2da0722a upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 28
diff changeset
394 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
395 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
396 }
41
393d2da0722a upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 28
diff changeset
397 OrthancPluginErrorCode code = OrthancPluginSendMultipartItem(OrthancPlugins::GetGlobalContext(), self->object_, arg0.buf, arg0.len);
393d2da0722a upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 28
diff changeset
398 PyBuffer_Release(&arg0);
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
399
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
400 if (code == OrthancPluginErrorCode_Success)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
401 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
402 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
403 return Py_None;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
404 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
405 else
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
406 {
75
cbfc72a53970 refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 63
diff changeset
407 PythonLock::RaiseException(code);
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
408 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
409 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
410 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
411
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
412 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendHttpStatus(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
413 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
414 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
415 PythonLock::LogCall("Calling method OrthancPluginSendHttpStatus() on object of class OrthancPluginRestOutput");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
416
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
417 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
418 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
419 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
420 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
421 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
422
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
423 unsigned short arg0 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
424 const char* arg1 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
425 unsigned long arg2 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
426
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
427 if (!PyArg_ParseTuple(args, "Hsk", &arg0, &arg1, &arg2))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
428 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
429 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (3 arguments expected)");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
430 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
431 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
432 OrthancPluginSendHttpStatus(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1, arg2);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
433
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
434
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
435 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
436 return Py_None;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
437 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
438
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
439 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginCompressAndAnswerJpegImage(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
440 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
441 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
442 PythonLock::LogCall("Calling method OrthancPluginCompressAndAnswerJpegImage() on object of class OrthancPluginRestOutput");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
443
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
444 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
445 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
446 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
447 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
448 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
449
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
450 long int arg0 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
451 unsigned long arg1 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
452 unsigned long arg2 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
453 unsigned long arg3 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
454 Py_buffer arg4;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
455 unsigned char arg5 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
456
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
457 if (!PyArg_ParseTuple(args, "lkkks*b", &arg0, &arg1, &arg2, &arg3, &arg4, &arg5))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
458 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
459 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (6 arguments expected)");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
460 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
461 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
462 OrthancPluginCompressAndAnswerJpegImage(OrthancPlugins::GetGlobalContext(), self->object_, static_cast<OrthancPluginPixelFormat>(arg0), arg1, arg2, arg3, arg4.buf, arg5);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
463 PyBuffer_Release(&arg4);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
464
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
465 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
466 return Py_None;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
467 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
468
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
469 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSetHttpErrorDetails(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
470 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
471 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
472 PythonLock::LogCall("Calling method OrthancPluginSetHttpErrorDetails() on object of class OrthancPluginRestOutput");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
473
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
474 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
475 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
476 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
477 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
478 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
479
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
480 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
481 unsigned char arg1 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
482
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
483 if (!PyArg_ParseTuple(args, "sb", &arg0, &arg1))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
484 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
485 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
486 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
487 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
488 OrthancPluginSetHttpErrorDetails(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
489
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
490
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
491 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
492 return Py_None;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
493 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
494
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
495
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
496
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
497 static void RegisterOrthancPluginRestOutputClass(PyObject* module)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
498 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
499 sdk_OrthancPluginRestOutput_Type.tp_new = PyType_GenericNew;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
500 sdk_OrthancPluginRestOutput_Type.tp_flags = Py_TPFLAGS_DEFAULT;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
501 sdk_OrthancPluginRestOutput_Type.tp_doc = "Generated from Orthanc C class: OrthancPluginRestOutput";
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
502 sdk_OrthancPluginRestOutput_Type.tp_methods = sdk_OrthancPluginRestOutput_Methods;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
503 sdk_OrthancPluginRestOutput_Type.tp_init = (initproc) sdk_OrthancPluginRestOutput_Constructor;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
504
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
505
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
506 if (PyType_Ready(&sdk_OrthancPluginRestOutput_Type) < 0)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
507 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
508 OrthancPlugins::LogError("Cannot register Python class: OrthancPluginRestOutput");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
509 ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
510 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
511
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
512 Py_INCREF(&sdk_OrthancPluginRestOutput_Type);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
513 if (PyModule_AddObject(module, "RestOutput", (PyObject *)&sdk_OrthancPluginRestOutput_Type) < 0)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
514 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
515 OrthancPlugins::LogError("Cannot register Python class: OrthancPluginRestOutput");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
516 Py_DECREF(&sdk_OrthancPluginRestOutput_Type);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
517 ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
518 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
519 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
520
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
521
63
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
522 PyTypeObject* GetOrthancPluginRestOutputType()
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
523 {
63
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
524 return &sdk_OrthancPluginRestOutput_Type;
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
525 }