annotate Sources/Autogenerated/sdk_OrthancPluginRestOutput.impl.h @ 128:5b59ebc267e1 fix-leak

fixed leaks in the initialization of the enums
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 30 Aug 2023 11:02:20 +0200
parents eb6ac5a801d1
children 65ec5597ec70 5643e97d9367
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
101
eb6ac5a801d1 update to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 75
diff changeset
3 * Copyright (C) 2020-2022 Osimis S.A., Belgium
eb6ac5a801d1 update to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 75
diff changeset
4 * Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 *
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 * 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
7 * 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
8 * 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
9 * the License, or (at your option) any later version.
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 *
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 * 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
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * Affero General Public License for more details.
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 *
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * 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
17 * 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
18 **/
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
63
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
21 // Forward declaration of the autogenerated methods
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginAnswerBuffer(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginCompressAndAnswerPngImage(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginRedirect(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendHttpStatusCode(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendUnauthorized(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendMethodNotAllowed(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSetCookie(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSetHttpHeader(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginStartMultipartAnswer(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendMultipartItem(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendHttpStatus(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginCompressAndAnswerJpegImage(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 sdk_OrthancPluginRestOutput_Object* self, PyObject *args);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSetHttpErrorDetails(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 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
48 // 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
49
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
50
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
51 // 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
52 // End of forward declarations
1
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 static PyMethodDef sdk_OrthancPluginRestOutput_Methods[] = {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 { "AnswerBuffer",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginAnswerBuffer, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 "Generated from C function OrthancPluginAnswerBuffer()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 { "CompressAndAnswerPngImage",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginCompressAndAnswerPngImage, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 "Generated from C function OrthancPluginCompressAndAnswerPngImage()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 { "Redirect",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginRedirect, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 "Generated from C function OrthancPluginRedirect()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 { "SendHttpStatusCode",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginSendHttpStatusCode, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 "Generated from C function OrthancPluginSendHttpStatusCode()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 { "SendUnauthorized",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginSendUnauthorized, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 "Generated from C function OrthancPluginSendUnauthorized()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 { "SendMethodNotAllowed",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginSendMethodNotAllowed, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 "Generated from C function OrthancPluginSendMethodNotAllowed()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 { "SetCookie",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginSetCookie, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 "Generated from C function OrthancPluginSetCookie()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 { "SetHttpHeader",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginSetHttpHeader, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 "Generated from C function OrthancPluginSetHttpHeader()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 { "StartMultipartAnswer",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginStartMultipartAnswer, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 "Generated from C function OrthancPluginStartMultipartAnswer()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 { "SendMultipartItem",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginSendMultipartItem, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 "Generated from C function OrthancPluginSendMultipartItem()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 { "SendHttpStatus",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginSendHttpStatus, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 "Generated from C function OrthancPluginSendHttpStatus()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 { "CompressAndAnswerJpegImage",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginCompressAndAnswerJpegImage, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 "Generated from C function OrthancPluginCompressAndAnswerJpegImage()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 { "SetHttpErrorDetails",
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 (PyCFunction) sdk_OrthancPluginRestOutput_OrthancPluginSetHttpErrorDetails, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 "Generated from C function OrthancPluginSetHttpErrorDetails()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 { NULL } /* Sentinel */
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 static int sdk_OrthancPluginRestOutput_Constructor(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 sdk_OrthancPluginRestOutput_Object *self, PyObject *args, PyObject *kwds)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
102 PythonLock::LogCall("Creating Python object of class OrthancPluginRestOutput");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 self->object_ = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 self->borrowed_ = false;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 long long object = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 unsigned char borrowed = false;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 if (PyArg_ParseTuple(args, "Lb", &object, &borrowed))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 self->object_ = reinterpret_cast<OrthancPluginRestOutput*>(static_cast<intptr_t>(object));
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 self->borrowed_ = borrowed;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 return 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 else
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 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
119 return -1;
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 /**
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 * Static global structure => the fields that are beyond the last
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 * initialized field are set to zero.
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 * https://stackoverflow.com/a/11152199/881731
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 **/
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 static PyTypeObject sdk_OrthancPluginRestOutput_Type = {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 PyVarObject_HEAD_INIT(NULL, 0)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 "orthanc.RestOutput", /* tp_name */
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 sizeof(sdk_OrthancPluginRestOutput_Object), /* tp_basicsize */
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 // Actual implementation of the methods
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginAnswerBuffer(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
142 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
143
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 return NULL;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 Py_buffer arg0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 const char* arg2 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 if (!PyArg_ParseTuple(args, "s*s", &arg0, &arg2))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 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
156 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 OrthancPluginAnswerBuffer(OrthancPlugins::GetGlobalContext(), self->object_, arg0.buf, arg0.len, arg2);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 PyBuffer_Release(&arg0);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 return Py_None;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginCompressAndAnswerPngImage(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
168 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
169
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173 return NULL;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176 long int arg0 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177 unsigned long arg1 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178 unsigned long arg2 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179 unsigned long arg3 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180 Py_buffer arg4;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182 if (!PyArg_ParseTuple(args, "lkkks*", &arg0, &arg1, &arg2, &arg3, &arg4))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184 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
185 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187 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
188 PyBuffer_Release(&arg4);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
189
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
190 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
191 return Py_None;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
194 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginRedirect(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
195 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
196 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
197 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
198
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
199 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
200 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
201 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
202 return NULL;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
205 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
206
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
207 if (!PyArg_ParseTuple(args, "s", &arg0))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
209 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
210 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
211 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
212 OrthancPluginRedirect(OrthancPlugins::GetGlobalContext(), self->object_, arg0);
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
215 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
216 return Py_None;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
219 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendHttpStatusCode(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
220 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
221 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
222 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
223
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
224 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
225 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
226 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
227 return NULL;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
230 unsigned short arg0 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
231
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
232 if (!PyArg_ParseTuple(args, "H", &arg0))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
233 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
234 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
235 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
236 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
237 OrthancPluginSendHttpStatusCode(OrthancPlugins::GetGlobalContext(), self->object_, arg0);
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
240 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
241 return Py_None;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
244 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendUnauthorized(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
245 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
246 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
247 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
248
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
249 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
250 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
251 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
252 return NULL;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
255 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
256
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
257 if (!PyArg_ParseTuple(args, "s", &arg0))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
258 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
259 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
260 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
261 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
262 OrthancPluginSendUnauthorized(OrthancPlugins::GetGlobalContext(), self->object_, arg0);
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
265 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
266 return Py_None;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
269 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendMethodNotAllowed(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
270 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
271 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
272 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
273
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
274 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
275 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
276 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
277 return NULL;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
280 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
281
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
282 if (!PyArg_ParseTuple(args, "s", &arg0))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
283 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
284 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
285 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
286 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
287 OrthancPluginSendMethodNotAllowed(OrthancPlugins::GetGlobalContext(), self->object_, arg0);
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
290 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
291 return Py_None;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
294 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSetCookie(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
295 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
296 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
297 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
298
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
299 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
300 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
301 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
302 return NULL;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
305 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
306 const char* arg1 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
307
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
308 if (!PyArg_ParseTuple(args, "ss", &arg0, &arg1))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
309 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
310 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
311 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
312 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
313 OrthancPluginSetCookie(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1);
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
316 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
317 return Py_None;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
320 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSetHttpHeader(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
321 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
322 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
323 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
324
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
325 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
326 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
327 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
328 return NULL;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
331 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
332 const char* arg1 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
333
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
334 if (!PyArg_ParseTuple(args, "ss", &arg0, &arg1))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
335 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
336 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
337 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
338 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
339 OrthancPluginSetHttpHeader(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1);
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
342 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
343 return Py_None;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
346 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginStartMultipartAnswer(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
347 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
348 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
349 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
350
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
351 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
352 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
353 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
354 return NULL;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
357 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
358 const char* arg1 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
359
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
360 if (!PyArg_ParseTuple(args, "ss", &arg0, &arg1))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
361 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
362 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
363 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
364 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
365 OrthancPluginErrorCode code = OrthancPluginStartMultipartAnswer(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1);
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
368 if (code == OrthancPluginErrorCode_Success)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
369 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
370 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
371 return Py_None;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
372 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
373 else
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
374 {
75
cbfc72a53970 refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 63
diff changeset
375 PythonLock::RaiseException(code);
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
376 return NULL;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
380 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendMultipartItem(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
381 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
382 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
383 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
384
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
385 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
386 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
387 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
388 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
389 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
390
41
393d2da0722a upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 28
diff changeset
391 Py_buffer arg0;
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
392
41
393d2da0722a upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 28
diff changeset
393 if (!PyArg_ParseTuple(args, "s*", &arg0))
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
394 {
41
393d2da0722a upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 28
diff changeset
395 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
396 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
397 }
41
393d2da0722a upgrade to Orthanc SDK 1.7.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 28
diff changeset
398 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
399 PyBuffer_Release(&arg0);
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
400
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
401 if (code == OrthancPluginErrorCode_Success)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
402 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
403 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
404 return Py_None;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
405 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
406 else
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
407 {
75
cbfc72a53970 refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 63
diff changeset
408 PythonLock::RaiseException(code);
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
409 return NULL;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
413 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSendHttpStatus(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
414 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
415 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
416 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
417
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
418 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
419 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
420 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
421 return NULL;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
424 unsigned short arg0 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
425 const char* arg1 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
426 unsigned long arg2 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
427
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
428 if (!PyArg_ParseTuple(args, "Hsk", &arg0, &arg1, &arg2))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
429 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
430 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
431 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
432 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
433 OrthancPluginSendHttpStatus(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1, arg2);
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
436 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
437 return Py_None;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
440 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginCompressAndAnswerJpegImage(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
441 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
442 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
443 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
444
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
445 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
446 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
447 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
448 return NULL;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
451 long int arg0 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
452 unsigned long arg1 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
453 unsigned long arg2 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
454 unsigned long arg3 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
455 Py_buffer arg4;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
456 unsigned char arg5 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
457
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
458 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
459 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
460 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
461 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
462 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
463 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
464 PyBuffer_Release(&arg4);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
465
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
466 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
467 return Py_None;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
470 static PyObject *sdk_OrthancPluginRestOutput_OrthancPluginSetHttpErrorDetails(
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
471 sdk_OrthancPluginRestOutput_Object* self, PyObject *args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
472 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
473 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
474
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
475 if (self->object_ == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
476 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
477 PyErr_SetString(PyExc_ValueError, "Invalid object");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
478 return NULL;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
481 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
482 unsigned char arg1 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
483
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
484 if (!PyArg_ParseTuple(args, "sb", &arg0, &arg1))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
485 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
486 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
487 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
488 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
489 OrthancPluginSetHttpErrorDetails(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1);
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
492 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
493 return Py_None;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
498 static void RegisterOrthancPluginRestOutputClass(PyObject* module)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
499 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
500 sdk_OrthancPluginRestOutput_Type.tp_new = PyType_GenericNew;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
501 sdk_OrthancPluginRestOutput_Type.tp_flags = Py_TPFLAGS_DEFAULT;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
502 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
503 sdk_OrthancPluginRestOutput_Type.tp_methods = sdk_OrthancPluginRestOutput_Methods;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
504 sdk_OrthancPluginRestOutput_Type.tp_init = (initproc) sdk_OrthancPluginRestOutput_Constructor;
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
507 if (PyType_Ready(&sdk_OrthancPluginRestOutput_Type) < 0)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
508 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
509 OrthancPlugins::LogError("Cannot register Python class: OrthancPluginRestOutput");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
510 ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError);
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
513 Py_INCREF(&sdk_OrthancPluginRestOutput_Type);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
514 if (PyModule_AddObject(module, "RestOutput", (PyObject *)&sdk_OrthancPluginRestOutput_Type) < 0)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
515 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
516 OrthancPlugins::LogError("Cannot register Python class: OrthancPluginRestOutput");
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
517 Py_DECREF(&sdk_OrthancPluginRestOutput_Type);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
518 ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError);
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
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
522
63
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
523 PyTypeObject* GetOrthancPluginRestOutputType()
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
524 {
63
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
525 return &sdk_OrthancPluginRestOutput_Type;
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
526 }