annotate Sources/Autogenerated/sdk_GlobalFunctions.impl.h @ 208:315e1720a35f

documented orthanc.CreateImageFromBuffer()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 03 Jul 2024 12:56:18 +0200
parents 234681297600
children d7acfccc0d0b
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
166
6fada29b6759 updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 155
diff changeset
3 * Copyright (C) 2020-2023 Osimis S.A., Belgium
6fada29b6759 updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 155
diff changeset
4 * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium
155
71d305c29cfa updated year to 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 149
diff changeset
5 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * 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
8 * 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
9 * 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
10 * the License, or (at your option) any later version.
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * 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
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * Affero General Public License for more details.
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 *
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * 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
18 * 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
19 **/
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
186
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
22 // WARNING: Auto-generated file. Do not modify it by hand.
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
23
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
24
192
b0f096d2339e documentation of orthanc.RegisterRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 191
diff changeset
25 // Forward declaration of the custom global functions
208
315e1720a35f documented orthanc.CreateImageFromBuffer()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 205
diff changeset
26 extern PyObject *CreateImageFromBuffer(PyObject* module, PyObject *args);
205
234681297600 documented orthanc.LookupDictionary()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 203
diff changeset
27 extern PyObject *LookupDictionary(PyObject* module, PyObject *args);
203
28531e615104 documented orthanc.RegisterIncomingHttpRequestFilter() and orthanc.RegisterOnStoredInstanceCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 197
diff changeset
28 extern PyObject *RegisterIncomingHttpRequestFilter(PyObject* module, PyObject *args);
195
d7a6e75558ee documented orthanc.RegisterOnChangeCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 192
diff changeset
29 extern PyObject *RegisterOnChangeCallback(PyObject* module, PyObject *args);
203
28531e615104 documented orthanc.RegisterIncomingHttpRequestFilter() and orthanc.RegisterOnStoredInstanceCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 197
diff changeset
30 extern PyObject *RegisterOnStoredInstanceCallback(PyObject* module, PyObject *args);
192
b0f096d2339e documentation of orthanc.RegisterRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 191
diff changeset
31 extern PyObject *RegisterRestCallback(PyObject* module, PyObject *args);
b0f096d2339e documentation of orthanc.RegisterRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 191
diff changeset
32 // End of forward declarations
b0f096d2339e documentation of orthanc.RegisterRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 191
diff changeset
33
b0f096d2339e documentation of orthanc.RegisterRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 191
diff changeset
34
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
35 static PyObject* sdk_OrthancPluginAutodetectMimeType(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
36 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
37 PythonLock::LogCall("Calling Python global function: OrthancPluginAutodetectMimeType()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
38
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
39 const char* arg0 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
40
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
41 if (!PyArg_ParseTuple(args, "s", &arg0))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
42 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
43 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
44 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
45 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
46
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
47 const char* s;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
48 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
49 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
50 s = OrthancPluginAutodetectMimeType(OrthancPlugins::GetGlobalContext(), arg0);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
51 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
52
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
53 if (s == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
54 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
55 Py_INCREF(Py_None);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
56 return Py_None;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
57 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
58 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
59 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
60 return PyUnicode_FromString(s);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
61 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
62 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
63
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
64 static PyObject* sdk_OrthancPluginBufferCompression(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
65 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
66 PythonLock::LogCall("Calling Python global function: OrthancPluginBufferCompression()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
67
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
68 Py_buffer arg0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
69 long int arg2 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
70 unsigned char arg3 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
71
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
72 if (!PyArg_ParseTuple(args, "s*lb", &arg0, &arg2, &arg3))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
73 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
74 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (3 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
75 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
76 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
77
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
78 OrthancPlugins::MemoryBuffer buffer;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
79 OrthancPluginErrorCode code;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
80 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
81 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
82 code = OrthancPluginBufferCompression(OrthancPlugins::GetGlobalContext(), *buffer, arg0.buf, arg0.len, static_cast<OrthancPluginCompressionType>(arg2), arg3);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
83 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
84 PyBuffer_Release(&arg0);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
85 if (code == OrthancPluginErrorCode_Success)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
86 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
87 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
88 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
89 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
90 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
91 PythonLock::RaiseException(code);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
92 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
93 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
94 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
95
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
96 static PyObject* sdk_OrthancPluginCheckVersion(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
97 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
98 PythonLock::LogCall("Calling Python global function: OrthancPluginCheckVersion()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
99
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
100
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
101
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
102 long value;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
103 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
104 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
105 value = OrthancPluginCheckVersion(OrthancPlugins::GetGlobalContext());
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
106 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
107
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
108 return PyLong_FromLong(value);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
109 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
110
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 static PyObject* sdk_OrthancPluginCheckVersionAdvanced(PyObject* module, PyObject* args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
113 PythonLock::LogCall("Calling Python global function: OrthancPluginCheckVersionAdvanced()");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114
177
008be55355a4 regenerating the wrapper after patching SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
115 long int arg0 = 0;
008be55355a4 regenerating the wrapper after patching SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
116 long int arg1 = 0;
008be55355a4 regenerating the wrapper after patching SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
117 long int arg2 = 0;
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118
177
008be55355a4 regenerating the wrapper after patching SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
119 if (!PyArg_ParseTuple(args, "lll", &arg0, &arg1, &arg2))
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 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
122 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
124
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
125 long value;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
126 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
127 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
128 value = OrthancPluginCheckVersionAdvanced(OrthancPlugins::GetGlobalContext(), arg0, arg1, arg2);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
129 }
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 return PyLong_FromLong(value);
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
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
134 static PyObject* sdk_OrthancPluginCompressJpegImage(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
135 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
136 PythonLock::LogCall("Calling Python global function: OrthancPluginCompressJpegImage()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
137
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
138 long int arg0 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
139 unsigned long arg1 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
140 unsigned long arg2 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
141 unsigned long arg3 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
142 Py_buffer arg4;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
143 unsigned char arg5 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
144
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
145 if (!PyArg_ParseTuple(args, "lkkks*b", &arg0, &arg1, &arg2, &arg3, &arg4, &arg5))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
146 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
147 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (6 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
148 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
149 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
150
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
151 OrthancPlugins::MemoryBuffer buffer;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
152 OrthancPluginErrorCode code;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
153 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
154 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
155 code = OrthancPluginCompressJpegImage(OrthancPlugins::GetGlobalContext(), *buffer, static_cast<OrthancPluginPixelFormat>(arg0), arg1, arg2, arg3, arg4.buf, arg5);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
156 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
157 PyBuffer_Release(&arg4);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
158 if (code == OrthancPluginErrorCode_Success)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
159 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
160 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
161 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
162 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
163 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
164 PythonLock::RaiseException(code);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
165 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
166 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
167 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
168
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
169 static PyObject* sdk_OrthancPluginCompressPngImage(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
170 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
171 PythonLock::LogCall("Calling Python global function: OrthancPluginCompressPngImage()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
172
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
173 long int arg0 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
174 unsigned long arg1 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
175 unsigned long arg2 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
176 unsigned long arg3 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
177 Py_buffer arg4;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
178
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
179 if (!PyArg_ParseTuple(args, "lkkks*", &arg0, &arg1, &arg2, &arg3, &arg4))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
180 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
181 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (5 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
182 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
183 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
184
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
185 OrthancPlugins::MemoryBuffer buffer;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
186 OrthancPluginErrorCode code;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
187 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
188 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
189 code = OrthancPluginCompressPngImage(OrthancPlugins::GetGlobalContext(), *buffer, static_cast<OrthancPluginPixelFormat>(arg0), arg1, arg2, arg3, arg4.buf);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
190 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
191 PyBuffer_Release(&arg4);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
192 if (code == OrthancPluginErrorCode_Success)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
193 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
194 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
195 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
196 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
197 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
198 PythonLock::RaiseException(code);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
199 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
200 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
201 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
202
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
203 static PyObject* sdk_OrthancPluginComputeMd5(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
204 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
205 PythonLock::LogCall("Calling Python global function: OrthancPluginComputeMd5()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
206
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
207 Py_buffer arg0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
208
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
209 if (!PyArg_ParseTuple(args, "s*", &arg0))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
210 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
211 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
212 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
213 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
214
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
215 OrthancPlugins::OrthancString s;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
216 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
217 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
218 s.Assign(OrthancPluginComputeMd5(OrthancPlugins::GetGlobalContext(), arg0.buf, arg0.len));
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
219 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
220 PyBuffer_Release(&arg0);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
221 if (s.GetContent() == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
222 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
223 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
224 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
225 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
226 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
227 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
228 return PyUnicode_FromString(s.GetContent());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
229 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
230 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
231
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
232 static PyObject* sdk_OrthancPluginComputeSha1(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
233 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
234 PythonLock::LogCall("Calling Python global function: OrthancPluginComputeSha1()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
235
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
236 Py_buffer arg0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
237
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
238 if (!PyArg_ParseTuple(args, "s*", &arg0))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
239 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
240 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
241 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
242 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
243
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
244 OrthancPlugins::OrthancString s;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
245 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
246 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
247 s.Assign(OrthancPluginComputeSha1(OrthancPlugins::GetGlobalContext(), arg0.buf, arg0.len));
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
248 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
249 PyBuffer_Release(&arg0);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
250 if (s.GetContent() == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
251 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
252 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
253 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
254 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
255 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
256 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
257 return PyUnicode_FromString(s.GetContent());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
258 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
259 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
260
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
261 static PyObject* sdk_OrthancPluginCreateDicom(PyObject* module, PyObject* args)
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
262 {
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
263 PythonLock::LogCall("Calling Python global function: OrthancPluginCreateDicom()");
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
264
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
265 const char* arg0 = NULL;
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
266 PyObject* arg1 = NULL;
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
267 long int arg2 = 0;
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
268
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
269 if (!PyArg_ParseTuple(args, "sOl", &arg0, &arg1, &arg2))
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
270 {
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
271 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (3 arguments expected)");
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
272 return NULL;
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
273 }
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
274
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
275 if (arg1 != Py_None && Py_TYPE(arg1) != GetOrthancPluginImageType())
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
276 {
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
277 PyErr_SetString(PyExc_TypeError, "Invalid orthanc.OrthancPluginImage object");
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
278 return NULL;
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
279 }
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
280
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
281 OrthancPlugins::MemoryBuffer buffer;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
282 OrthancPluginErrorCode code;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
283 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
284 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
285 code = OrthancPluginCreateDicom(OrthancPlugins::GetGlobalContext(), *buffer, arg0, arg1 == Py_None ? NULL : reinterpret_cast<sdk_OrthancPluginImage_Object*>(arg1)->object_, static_cast<OrthancPluginCreateDicomFlags>(arg2));
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
286 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
287
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
288 if (code == OrthancPluginErrorCode_Success)
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
289 {
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
290 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize());
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
291 }
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
292 else
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
293 {
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
294 PythonLock::RaiseException(code);
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
295 return NULL;
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
296 }
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
297 }
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
298
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
299 static PyObject* sdk_OrthancPluginCreateDicom2(PyObject* module, PyObject* args)
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
300 {
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
301 PythonLock::LogCall("Calling Python global function: OrthancPluginCreateDicom2()");
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
302
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
303 const char* arg0 = NULL;
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
304 PyObject* arg1 = NULL;
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
305 long int arg2 = 0;
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
306 const char* arg3 = NULL;
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
307
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
308 if (!PyArg_ParseTuple(args, "sOls", &arg0, &arg1, &arg2, &arg3))
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
309 {
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
310 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (4 arguments expected)");
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
311 return NULL;
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
312 }
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
313
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
314 if (arg1 != Py_None && Py_TYPE(arg1) != GetOrthancPluginImageType())
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
315 {
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
316 PyErr_SetString(PyExc_TypeError, "Invalid orthanc.OrthancPluginImage object");
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
317 return NULL;
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
318 }
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
319
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
320 OrthancPlugins::MemoryBuffer buffer;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
321 OrthancPluginErrorCode code;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
322 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
323 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
324 code = OrthancPluginCreateDicom2(OrthancPlugins::GetGlobalContext(), *buffer, arg0, arg1 == Py_None ? NULL : reinterpret_cast<sdk_OrthancPluginImage_Object*>(arg1)->object_, static_cast<OrthancPluginCreateDicomFlags>(arg2), arg3);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
325 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
326
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
327 if (code == OrthancPluginErrorCode_Success)
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
328 {
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
329 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize());
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
330 }
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
331 else
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
332 {
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
333 PythonLock::RaiseException(code);
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
334 return NULL;
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
335 }
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
336 }
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
337
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
338 static PyObject* sdk_OrthancPluginCreateDicomInstance(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
339 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
340 PythonLock::LogCall("Calling Python global function: OrthancPluginCreateDicomInstance()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
341
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
342 Py_buffer arg0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
343
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
344 if (!PyArg_ParseTuple(args, "s*", &arg0))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
345 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
346 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
347 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
348 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
349
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
350 // This is the case of a constructor
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
351 OrthancPluginDicomInstance* obj;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
352 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
353 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
354 obj = OrthancPluginCreateDicomInstance(OrthancPlugins::GetGlobalContext(), arg0.buf, arg0.len);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
355 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
356 PyBuffer_Release(&arg0);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
357 if (obj == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
358 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
359 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
360 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
361 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
362 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
363 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
364 PyObject *argList = Py_BuildValue("Lb", obj, false /* not borrowed */);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
365 PyObject *python = PyObject_CallObject((PyObject *) &sdk_OrthancPluginDicomInstance_Type, argList);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
366 Py_DECREF(argList);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
367 return python;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
368 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
369 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
370
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
371 static PyObject* sdk_OrthancPluginCreateFindMatcher(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
372 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
373 PythonLock::LogCall("Calling Python global function: OrthancPluginCreateFindMatcher()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
374
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
375 Py_buffer arg0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
376
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
377 if (!PyArg_ParseTuple(args, "s*", &arg0))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
378 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
379 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
380 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
381 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
382
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
383 // This is the case of a constructor
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
384 OrthancPluginFindMatcher* obj;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
385 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
386 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
387 obj = OrthancPluginCreateFindMatcher(OrthancPlugins::GetGlobalContext(), arg0.buf, arg0.len);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
388 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
389 PyBuffer_Release(&arg0);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
390 if (obj == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
391 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
392 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
393 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
394 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
395 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
396 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
397 PyObject *argList = Py_BuildValue("Lb", obj, false /* not borrowed */);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
398 PyObject *python = PyObject_CallObject((PyObject *) &sdk_OrthancPluginFindMatcher_Type, argList);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
399 Py_DECREF(argList);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
400 return python;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
401 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
402 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
403
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
404 static PyObject* sdk_OrthancPluginCreateImage(PyObject* module, PyObject* args)
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
405 {
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
406 PythonLock::LogCall("Calling Python global function: OrthancPluginCreateImage()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
407
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
408 long int arg0 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
409 unsigned long arg1 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
410 unsigned long arg2 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
411
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
412 if (!PyArg_ParseTuple(args, "lkk", &arg0, &arg1, &arg2))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
413 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
414 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (3 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
415 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
416 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
417
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
418 // This is the case of a constructor
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
419 OrthancPluginImage* obj;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
420 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
421 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
422 obj = OrthancPluginCreateImage(OrthancPlugins::GetGlobalContext(), static_cast<OrthancPluginPixelFormat>(arg0), arg1, arg2);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
423 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
424
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
425 if (obj == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
426 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
427 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
428 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
429 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
430 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
431 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
432 PyObject *argList = Py_BuildValue("Lb", obj, false /* not borrowed */);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
433 PyObject *python = PyObject_CallObject((PyObject *) &sdk_OrthancPluginImage_Type, argList);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
434 Py_DECREF(argList);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
435 return python;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
436 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
437 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
438
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
439 static PyObject* sdk_OrthancPluginDecodeDicomImage(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
440 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
441 PythonLock::LogCall("Calling Python global function: OrthancPluginDecodeDicomImage()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
442
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
443 Py_buffer arg0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
444 unsigned long arg2 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
445
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
446 if (!PyArg_ParseTuple(args, "s*k", &arg0, &arg2))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
447 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
448 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
449 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
450 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
451
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
452 // This is the case of a constructor
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
453 OrthancPluginImage* obj;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
454 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
455 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
456 obj = OrthancPluginDecodeDicomImage(OrthancPlugins::GetGlobalContext(), arg0.buf, arg0.len, arg2);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
457 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
458 PyBuffer_Release(&arg0);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
459 if (obj == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
460 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
461 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
462 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
463 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
464 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
465 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
466 PyObject *argList = Py_BuildValue("Lb", obj, false /* not borrowed */);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
467 PyObject *python = PyObject_CallObject((PyObject *) &sdk_OrthancPluginImage_Type, argList);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
468 Py_DECREF(argList);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
469 return python;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
470 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
471 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
472
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
473 static PyObject* sdk_OrthancPluginDicomBufferToJson(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
474 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
475 PythonLock::LogCall("Calling Python global function: OrthancPluginDicomBufferToJson()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
476
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
477 Py_buffer arg0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
478 long int arg2 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
479 long int arg3 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
480 unsigned long arg4 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
481
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
482 if (!PyArg_ParseTuple(args, "s*llk", &arg0, &arg2, &arg3, &arg4))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
483 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
484 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (4 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
485 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
486 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
487
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
488 OrthancPlugins::OrthancString s;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
489 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
490 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
491 s.Assign(OrthancPluginDicomBufferToJson(OrthancPlugins::GetGlobalContext(), arg0.buf, arg0.len, static_cast<OrthancPluginDicomToJsonFormat>(arg2), static_cast<OrthancPluginDicomToJsonFlags>(arg3), arg4));
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
492 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
493 PyBuffer_Release(&arg0);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
494 if (s.GetContent() == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
495 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
496 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
497 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
498 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
499 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
500 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
501 return PyUnicode_FromString(s.GetContent());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
502 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
503 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
504
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
505 static PyObject* sdk_OrthancPluginDicomInstanceToJson(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
506 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
507 PythonLock::LogCall("Calling Python global function: OrthancPluginDicomInstanceToJson()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
508
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
509 const char* arg0 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
510 long int arg1 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
511 long int arg2 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
512 unsigned long arg3 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
513
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
514 if (!PyArg_ParseTuple(args, "sllk", &arg0, &arg1, &arg2, &arg3))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
515 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
516 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (4 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
517 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
518 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
519
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
520 OrthancPlugins::OrthancString s;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
521 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
522 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
523 s.Assign(OrthancPluginDicomInstanceToJson(OrthancPlugins::GetGlobalContext(), arg0, static_cast<OrthancPluginDicomToJsonFormat>(arg1), static_cast<OrthancPluginDicomToJsonFlags>(arg2), arg3));
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
524 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
525
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
526 if (s.GetContent() == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
527 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
528 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
529 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
530 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
531 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
532 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
533 return PyUnicode_FromString(s.GetContent());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
534 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
535 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
536
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
537 static PyObject* sdk_OrthancPluginExtendOrthancExplorer(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
538 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
539 PythonLock::LogCall("Calling Python global function: OrthancPluginExtendOrthancExplorer()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
540
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
541 const char* arg0 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
542
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
543 if (!PyArg_ParseTuple(args, "s", &arg0))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
544 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
545 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
546 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
547 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
548
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
549 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
550 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
551 OrthancPluginExtendOrthancExplorer(OrthancPlugins::GetGlobalContext(), arg0);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
552 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
553
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
554
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
555 Py_INCREF(Py_None);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
556 return Py_None;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
557 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
558
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
559 static PyObject* sdk_OrthancPluginGenerateRestApiAuthorizationToken(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
560 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
561 PythonLock::LogCall("Calling Python global function: OrthancPluginGenerateRestApiAuthorizationToken()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
562
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
563
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
564
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
565 OrthancPlugins::OrthancString s;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
566 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
567 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
568 s.Assign(OrthancPluginGenerateRestApiAuthorizationToken(OrthancPlugins::GetGlobalContext()));
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
569 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
570
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
571 if (s.GetContent() == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
572 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
573 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
574 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
575 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
576 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
577 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
578 return PyUnicode_FromString(s.GetContent());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
579 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
580 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
581
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
582 static PyObject* sdk_OrthancPluginGenerateUuid(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
583 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
584 PythonLock::LogCall("Calling Python global function: OrthancPluginGenerateUuid()");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
585
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
586
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
587
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
588 OrthancPlugins::OrthancString s;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
589 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
590 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
591 s.Assign(OrthancPluginGenerateUuid(OrthancPlugins::GetGlobalContext()));
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
592 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
593
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
594 if (s.GetContent() == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
595 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
596 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
597 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
598 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
599 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
600 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
601 return PyUnicode_FromString(s.GetContent());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
602 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
603 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
604
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
605 static PyObject* sdk_OrthancPluginGetCommandLineArgument(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
606 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
607 PythonLock::LogCall("Calling Python global function: OrthancPluginGetCommandLineArgument()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
608
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
609 unsigned long arg0 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
610
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
611 if (!PyArg_ParseTuple(args, "k", &arg0))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
612 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
613 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
614 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
615 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
616
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
617 OrthancPlugins::OrthancString s;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
618 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
619 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
620 s.Assign(OrthancPluginGetCommandLineArgument(OrthancPlugins::GetGlobalContext(), arg0));
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
621 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
622
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
623 if (s.GetContent() == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
624 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
625 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
626 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
627 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
628 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
629 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
630 return PyUnicode_FromString(s.GetContent());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
631 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
632 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
633
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
634 static PyObject* sdk_OrthancPluginGetCommandLineArgumentsCount(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
635 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
636 PythonLock::LogCall("Calling Python global function: OrthancPluginGetCommandLineArgumentsCount()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
637
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
638
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
639
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
640 long value;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
641 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
642 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
643 value = OrthancPluginGetCommandLineArgumentsCount(OrthancPlugins::GetGlobalContext());
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
644 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
645
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
646 return PyLong_FromLong(value);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
647 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
648
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
649 static PyObject* sdk_OrthancPluginGetConfiguration(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
650 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
651 PythonLock::LogCall("Calling Python global function: OrthancPluginGetConfiguration()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
652
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
653
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
654
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
655 OrthancPlugins::OrthancString s;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
656 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
657 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
658 s.Assign(OrthancPluginGetConfiguration(OrthancPlugins::GetGlobalContext()));
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
659 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
660
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
661 if (s.GetContent() == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
662 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
663 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
664 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
665 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
666 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
667 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
668 return PyUnicode_FromString(s.GetContent());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
669 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
670 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
671
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
672 static PyObject* sdk_OrthancPluginGetConfigurationPath(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
673 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
674 PythonLock::LogCall("Calling Python global function: OrthancPluginGetConfigurationPath()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
675
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
676
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
677
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
678 OrthancPlugins::OrthancString s;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
679 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
680 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
681 s.Assign(OrthancPluginGetConfigurationPath(OrthancPlugins::GetGlobalContext()));
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
682 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
683
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
684 if (s.GetContent() == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
685 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
686 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
687 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
688 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
689 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
690 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
691 return PyUnicode_FromString(s.GetContent());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
692 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
693 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
694
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
695 static PyObject* sdk_OrthancPluginGetDicomForInstance(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
696 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
697 PythonLock::LogCall("Calling Python global function: OrthancPluginGetDicomForInstance()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
698
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
699 const char* arg0 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
700
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
701 if (!PyArg_ParseTuple(args, "s", &arg0))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
702 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
703 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
704 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
705 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
706
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
707 OrthancPlugins::MemoryBuffer buffer;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
708 OrthancPluginErrorCode code;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
709 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
710 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
711 code = OrthancPluginGetDicomForInstance(OrthancPlugins::GetGlobalContext(), *buffer, arg0);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
712 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
713
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
714 if (code == OrthancPluginErrorCode_Success)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
715 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
716 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
717 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
718 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
719 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
720 PythonLock::RaiseException(code);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
721 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
722 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
723 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
724
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
725 static PyObject* sdk_OrthancPluginGetErrorDescription(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
726 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
727 PythonLock::LogCall("Calling Python global function: OrthancPluginGetErrorDescription()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
728
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
729 long int arg0 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
730
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
731 if (!PyArg_ParseTuple(args, "l", &arg0))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
732 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
733 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
734 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
735 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
736
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
737 const char* s;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
738 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
739 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
740 s = OrthancPluginGetErrorDescription(OrthancPlugins::GetGlobalContext(), static_cast<OrthancPluginErrorCode>(arg0));
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
741 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
742
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
743 if (s == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
744 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
745 Py_INCREF(Py_None);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
746 return Py_None;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
747 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
748 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
749 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
750 return PyUnicode_FromString(s);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
751 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
752 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
753
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
754 static PyObject* sdk_OrthancPluginGetExpectedDatabaseVersion(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
755 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
756 PythonLock::LogCall("Calling Python global function: OrthancPluginGetExpectedDatabaseVersion()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
757
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
758
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
759
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
760 long value;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
761 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
762 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
763 value = OrthancPluginGetExpectedDatabaseVersion(OrthancPlugins::GetGlobalContext());
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
764 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
765
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
766 return PyLong_FromLong(value);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
767 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
768
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
769 static PyObject* sdk_OrthancPluginGetFontName(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
770 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
771 PythonLock::LogCall("Calling Python global function: OrthancPluginGetFontName()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
772
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
773 unsigned long arg0 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
774
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
775 if (!PyArg_ParseTuple(args, "k", &arg0))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
776 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
777 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
778 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
779 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
780
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
781 const char* s;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
782 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
783 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
784 s = OrthancPluginGetFontName(OrthancPlugins::GetGlobalContext(), arg0);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
785 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
786
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
787 if (s == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
788 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
789 Py_INCREF(Py_None);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
790 return Py_None;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
791 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
792 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
793 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
794 return PyUnicode_FromString(s);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
795 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
796 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
797
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
798 static PyObject* sdk_OrthancPluginGetFontSize(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
799 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
800 PythonLock::LogCall("Calling Python global function: OrthancPluginGetFontSize()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
801
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
802 unsigned long arg0 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
803
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
804 if (!PyArg_ParseTuple(args, "k", &arg0))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
805 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
806 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
807 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
808 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
809
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
810 long value;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
811 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
812 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
813 value = OrthancPluginGetFontSize(OrthancPlugins::GetGlobalContext(), arg0);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
814 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
815
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
816 return PyLong_FromLong(value);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
817 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
818
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
819 static PyObject* sdk_OrthancPluginGetFontsCount(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
820 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
821 PythonLock::LogCall("Calling Python global function: OrthancPluginGetFontsCount()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
822
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
823
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
824
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
825 long value;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
826 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
827 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
828 value = OrthancPluginGetFontsCount(OrthancPlugins::GetGlobalContext());
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
829 }
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
830
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
831 return PyLong_FromLong(value);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
832 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
833
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
834 static PyObject* sdk_OrthancPluginGetGlobalProperty(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
835 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
836 PythonLock::LogCall("Calling Python global function: OrthancPluginGetGlobalProperty()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
837
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
838 long int arg0 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
839 const char* arg1 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
840
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
841 if (!PyArg_ParseTuple(args, "ls", &arg0, &arg1))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
842 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
843 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
844 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
845 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
846
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
847 OrthancPlugins::OrthancString s;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
848 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
849 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
850 s.Assign(OrthancPluginGetGlobalProperty(OrthancPlugins::GetGlobalContext(), arg0, arg1));
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
851 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
852
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
853 if (s.GetContent() == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
854 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
855 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
856 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
857 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
858 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
859 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
860 return PyUnicode_FromString(s.GetContent());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
861 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
862 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
863
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
864 static PyObject* sdk_OrthancPluginGetOrthancDirectory(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
865 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
866 PythonLock::LogCall("Calling Python global function: OrthancPluginGetOrthancDirectory()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
867
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
868
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
869
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
870 OrthancPlugins::OrthancString s;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
871 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
872 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
873 s.Assign(OrthancPluginGetOrthancDirectory(OrthancPlugins::GetGlobalContext()));
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
874 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
875
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
876 if (s.GetContent() == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
877 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
878 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
879 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
880 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
881 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
882 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
883 return PyUnicode_FromString(s.GetContent());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
884 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
885 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
886
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
887 static PyObject* sdk_OrthancPluginGetOrthancPath(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
888 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
889 PythonLock::LogCall("Calling Python global function: OrthancPluginGetOrthancPath()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
890
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
891
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
892
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
893 OrthancPlugins::OrthancString s;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
894 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
895 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
896 s.Assign(OrthancPluginGetOrthancPath(OrthancPlugins::GetGlobalContext()));
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
897 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
898
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
899 if (s.GetContent() == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
900 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
901 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
902 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
903 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
904 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
905 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
906 return PyUnicode_FromString(s.GetContent());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
907 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
908 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
909
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
910 static PyObject* sdk_OrthancPluginGetPeers(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
911 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
912 PythonLock::LogCall("Calling Python global function: OrthancPluginGetPeers()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
913
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
914
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
915
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
916 // This is the case of a constructor
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
917 OrthancPluginPeers* obj;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
918 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
919 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
920 obj = OrthancPluginGetPeers(OrthancPlugins::GetGlobalContext());
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
921 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
922
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
923 if (obj == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
924 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
925 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
926 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
927 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
928 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
929 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
930 PyObject *argList = Py_BuildValue("Lb", obj, false /* not borrowed */);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
931 PyObject *python = PyObject_CallObject((PyObject *) &sdk_OrthancPluginPeers_Type, argList);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
932 Py_DECREF(argList);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
933 return python;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
934 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
935 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
936
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
937 static PyObject* sdk_OrthancPluginGetTagName(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
938 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
939 PythonLock::LogCall("Calling Python global function: OrthancPluginGetTagName()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
940
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
941 unsigned short arg0 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
942 unsigned short arg1 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
943 const char* arg2 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
944
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
945 if (!PyArg_ParseTuple(args, "HHs", &arg0, &arg1, &arg2))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
946 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
947 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (3 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
948 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
949 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
950
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
951 OrthancPlugins::OrthancString s;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
952 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
953 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
954 s.Assign(OrthancPluginGetTagName(OrthancPlugins::GetGlobalContext(), arg0, arg1, arg2));
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
955 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
956
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
957 if (s.GetContent() == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
958 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
959 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
960 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
961 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
962 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
963 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
964 return PyUnicode_FromString(s.GetContent());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
965 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
966 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
967
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
968 static PyObject* sdk_OrthancPluginHttpDelete(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
969 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
970 PythonLock::LogCall("Calling Python global function: OrthancPluginHttpDelete()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
971
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
972 const char* arg0 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
973 const char* arg1 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
974 const char* arg2 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
975
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
976 if (!PyArg_ParseTuple(args, "sss", &arg0, &arg1, &arg2))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
977 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
978 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (3 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
979 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
980 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
981
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
982 OrthancPluginErrorCode code;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
983 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
984 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
985 code = OrthancPluginHttpDelete(OrthancPlugins::GetGlobalContext(), arg0, arg1, arg2);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
986 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
987
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
988
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
989 if (code == OrthancPluginErrorCode_Success)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
990 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
991 Py_INCREF(Py_None);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
992 return Py_None;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
993 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
994 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
995 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
996 PythonLock::RaiseException(code);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
997 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
998 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
999 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1000
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1001 static PyObject* sdk_OrthancPluginHttpGet(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1002 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1003 PythonLock::LogCall("Calling Python global function: OrthancPluginHttpGet()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1004
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1005 const char* arg0 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1006 const char* arg1 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1007 const char* arg2 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1008
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1009 if (!PyArg_ParseTuple(args, "sss", &arg0, &arg1, &arg2))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1010 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1011 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (3 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1012 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1013 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1014
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1015 OrthancPlugins::MemoryBuffer buffer;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1016 OrthancPluginErrorCode code;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1017 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1018 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1019 code = OrthancPluginHttpGet(OrthancPlugins::GetGlobalContext(), *buffer, arg0, arg1, arg2);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1020 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1021
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1022 if (code == OrthancPluginErrorCode_Success)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1023 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1024 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1025 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1026 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1027 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1028 PythonLock::RaiseException(code);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1029 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1030 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1031 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1032
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1033 static PyObject* sdk_OrthancPluginHttpPost(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1034 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1035 PythonLock::LogCall("Calling Python global function: OrthancPluginHttpPost()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1036
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1037 const char* arg0 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1038 Py_buffer arg1;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1039 const char* arg3 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1040 const char* arg4 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1041
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1042 if (!PyArg_ParseTuple(args, "ss*ss", &arg0, &arg1, &arg3, &arg4))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1043 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1044 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (4 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1045 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1046 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1047
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1048 OrthancPlugins::MemoryBuffer buffer;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1049 OrthancPluginErrorCode code;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1050 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1051 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1052 code = OrthancPluginHttpPost(OrthancPlugins::GetGlobalContext(), *buffer, arg0, arg1.buf, arg1.len, arg3, arg4);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1053 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1054 PyBuffer_Release(&arg1);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1055 if (code == OrthancPluginErrorCode_Success)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1056 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1057 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1058 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1059 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1060 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1061 PythonLock::RaiseException(code);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1062 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1063 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1064 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1065
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1066 static PyObject* sdk_OrthancPluginHttpPut(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1067 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1068 PythonLock::LogCall("Calling Python global function: OrthancPluginHttpPut()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1069
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1070 const char* arg0 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1071 Py_buffer arg1;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1072 const char* arg3 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1073 const char* arg4 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1074
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1075 if (!PyArg_ParseTuple(args, "ss*ss", &arg0, &arg1, &arg3, &arg4))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1076 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1077 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (4 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1078 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1079 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1080
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1081 OrthancPlugins::MemoryBuffer buffer;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1082 OrthancPluginErrorCode code;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1083 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1084 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1085 code = OrthancPluginHttpPut(OrthancPlugins::GetGlobalContext(), *buffer, arg0, arg1.buf, arg1.len, arg3, arg4);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1086 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1087 PyBuffer_Release(&arg1);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1088 if (code == OrthancPluginErrorCode_Success)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1089 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1090 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1091 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1092 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1093 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1094 PythonLock::RaiseException(code);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1095 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1096 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1097 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1098
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1099 static PyObject* sdk_OrthancPluginLogError(PyObject* module, PyObject* args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1100 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
1101 PythonLock::LogCall("Calling Python global function: OrthancPluginLogError()");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1102
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1103 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1104
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1105 if (!PyArg_ParseTuple(args, "s", &arg0))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1106 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1107 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
1108 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1109 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1110
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1111 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1112 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1113 OrthancPluginLogError(OrthancPlugins::GetGlobalContext(), arg0);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1114 }
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1115
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1116
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1117 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1118 return Py_None;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1119 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1120
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1121 static PyObject* sdk_OrthancPluginLogInfo(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1122 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1123 PythonLock::LogCall("Calling Python global function: OrthancPluginLogInfo()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1124
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1125 const char* arg0 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1126
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1127 if (!PyArg_ParseTuple(args, "s", &arg0))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1128 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1129 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1130 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1131 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1132
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1133 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1134 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1135 OrthancPluginLogInfo(OrthancPlugins::GetGlobalContext(), arg0);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1136 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1137
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1138
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1139 Py_INCREF(Py_None);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1140 return Py_None;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1141 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1142
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1143 static PyObject* sdk_OrthancPluginLogWarning(PyObject* module, PyObject* args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1144 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
1145 PythonLock::LogCall("Calling Python global function: OrthancPluginLogWarning()");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1146
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1147 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1148
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1149 if (!PyArg_ParseTuple(args, "s", &arg0))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1150 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1151 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
1152 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1153 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1154
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1155 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1156 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1157 OrthancPluginLogWarning(OrthancPlugins::GetGlobalContext(), arg0);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1158 }
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1159
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1160
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1161 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1162 return Py_None;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1163 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1164
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1165 static PyObject* sdk_OrthancPluginLookupInstance(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1166 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1167 PythonLock::LogCall("Calling Python global function: OrthancPluginLookupInstance()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1168
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1169 const char* arg0 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1171 if (!PyArg_ParseTuple(args, "s", &arg0))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1172 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1173 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1174 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1175 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1176
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1177 OrthancPlugins::OrthancString s;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1178 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1179 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1180 s.Assign(OrthancPluginLookupInstance(OrthancPlugins::GetGlobalContext(), arg0));
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1181 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1182
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1183 if (s.GetContent() == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1184 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1185 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1186 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1187 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1188 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1189 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1190 return PyUnicode_FromString(s.GetContent());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1191 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1192 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1193
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1194 static PyObject* sdk_OrthancPluginLookupPatient(PyObject* module, PyObject* args)
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1195 {
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1196 PythonLock::LogCall("Calling Python global function: OrthancPluginLookupPatient()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1197
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1198 const char* arg0 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1199
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1200 if (!PyArg_ParseTuple(args, "s", &arg0))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1201 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1202 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1203 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1204 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1205
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1206 OrthancPlugins::OrthancString s;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1207 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1208 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1209 s.Assign(OrthancPluginLookupPatient(OrthancPlugins::GetGlobalContext(), arg0));
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1210 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1211
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1212 if (s.GetContent() == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1213 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1214 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1215 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1216 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1217 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1218 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1219 return PyUnicode_FromString(s.GetContent());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1220 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1221 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1222
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1223 static PyObject* sdk_OrthancPluginLookupSeries(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1224 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1225 PythonLock::LogCall("Calling Python global function: OrthancPluginLookupSeries()");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1226
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1227 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1228
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1229 if (!PyArg_ParseTuple(args, "s", &arg0))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1230 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1231 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
1232 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1233 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1234
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1235 OrthancPlugins::OrthancString s;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1236 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1237 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1238 s.Assign(OrthancPluginLookupSeries(OrthancPlugins::GetGlobalContext(), arg0));
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1239 }
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1240
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1241 if (s.GetContent() == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1242 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1243 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1244 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1245 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1246 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1247 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1248 return PyUnicode_FromString(s.GetContent());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1249 }
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1250 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1251
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1252 static PyObject* sdk_OrthancPluginLookupStudy(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1253 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1254 PythonLock::LogCall("Calling Python global function: OrthancPluginLookupStudy()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1255
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1256 const char* arg0 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1257
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1258 if (!PyArg_ParseTuple(args, "s", &arg0))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1259 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1260 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1261 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1262 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1263
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1264 OrthancPlugins::OrthancString s;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1265 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1266 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1267 s.Assign(OrthancPluginLookupStudy(OrthancPlugins::GetGlobalContext(), arg0));
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1268 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1269
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1270 if (s.GetContent() == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1271 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1272 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1273 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1274 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1275 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1276 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1277 return PyUnicode_FromString(s.GetContent());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1278 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1279 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1280
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1281 static PyObject* sdk_OrthancPluginLookupStudyWithAccessionNumber(PyObject* module, PyObject* args)
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1282 {
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1283 PythonLock::LogCall("Calling Python global function: OrthancPluginLookupStudyWithAccessionNumber()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1284
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1285 const char* arg0 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1286
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1287 if (!PyArg_ParseTuple(args, "s", &arg0))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1288 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1289 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1290 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1291 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1292
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1293 OrthancPlugins::OrthancString s;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1294 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1295 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1296 s.Assign(OrthancPluginLookupStudyWithAccessionNumber(OrthancPlugins::GetGlobalContext(), arg0));
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1297 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1298
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1299 if (s.GetContent() == NULL)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1300 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1301 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1302 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1303 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1304 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1305 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1306 return PyUnicode_FromString(s.GetContent());
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1307 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1308 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1309
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1310 static PyObject* sdk_OrthancPluginReadFile(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1311 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1312 PythonLock::LogCall("Calling Python global function: OrthancPluginReadFile()");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1313
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1314 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1315
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1316 if (!PyArg_ParseTuple(args, "s", &arg0))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1317 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1318 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
1319 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1320 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1321
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1322 OrthancPlugins::MemoryBuffer buffer;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1323 OrthancPluginErrorCode code;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1324 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1325 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1326 code = OrthancPluginReadFile(OrthancPlugins::GetGlobalContext(), *buffer, arg0);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1327 }
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1328
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1329 if (code == OrthancPluginErrorCode_Success)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1330 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1331 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize());
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1332 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1333 else
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1334 {
77
e7ff5efb100d Custom exception "orthanc.OrthancException" is raised instead of "ValueError"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 75
diff changeset
1335 PythonLock::RaiseException(code);
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1336 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1337 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1338 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1339
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1340 static PyObject* sdk_OrthancPluginRegisterDictionaryTag(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1341 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1342 PythonLock::LogCall("Calling Python global function: OrthancPluginRegisterDictionaryTag()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1343
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1344 unsigned short arg0 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1345 unsigned short arg1 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1346 long int arg2 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1347 const char* arg3 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1348 unsigned long arg4 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1349 unsigned long arg5 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1350
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1351 if (!PyArg_ParseTuple(args, "HHlskk", &arg0, &arg1, &arg2, &arg3, &arg4, &arg5))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1352 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1353 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (6 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1354 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1355 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1356
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1357 OrthancPluginErrorCode code;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1358 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1359 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1360 code = OrthancPluginRegisterDictionaryTag(OrthancPlugins::GetGlobalContext(), arg0, arg1, static_cast<OrthancPluginValueRepresentation>(arg2), arg3, arg4, arg5);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1361 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1362
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1363
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1364 if (code == OrthancPluginErrorCode_Success)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1365 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1366 Py_INCREF(Py_None);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1367 return Py_None;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1368 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1369 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1370 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1371 PythonLock::RaiseException(code);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1372 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1373 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1374 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1375
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1376 static PyObject* sdk_OrthancPluginRegisterErrorCode(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1377 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1378 PythonLock::LogCall("Calling Python global function: OrthancPluginRegisterErrorCode()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1379
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1380 long int arg0 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1381 unsigned short arg1 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1382 const char* arg2 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1383
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1384 if (!PyArg_ParseTuple(args, "lHs", &arg0, &arg1, &arg2))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1385 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1386 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (3 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1387 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1388 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1389
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1390 OrthancPluginErrorCode code;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1391 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1392 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1393 code = OrthancPluginRegisterErrorCode(OrthancPlugins::GetGlobalContext(), arg0, arg1, arg2);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1394 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1395
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1396
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1397 if (code == OrthancPluginErrorCode_Success)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1398 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1399 Py_INCREF(Py_None);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1400 return Py_None;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1401 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1402 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1403 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1404 PythonLock::RaiseException(code);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1405 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1406 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1407 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1408
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1409 static PyObject* sdk_OrthancPluginRegisterPrivateDictionaryTag(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1410 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1411 PythonLock::LogCall("Calling Python global function: OrthancPluginRegisterPrivateDictionaryTag()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1412
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1413 unsigned short arg0 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1414 unsigned short arg1 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1415 long int arg2 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1416 const char* arg3 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1417 unsigned long arg4 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1418 unsigned long arg5 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1419 const char* arg6 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1420
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1421 if (!PyArg_ParseTuple(args, "HHlskks", &arg0, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1422 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1423 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (7 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1424 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1425 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1426
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1427 OrthancPluginErrorCode code;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1428 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1429 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1430 code = OrthancPluginRegisterPrivateDictionaryTag(OrthancPlugins::GetGlobalContext(), arg0, arg1, static_cast<OrthancPluginValueRepresentation>(arg2), arg3, arg4, arg5, arg6);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1431 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1432
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1433
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1434 if (code == OrthancPluginErrorCode_Success)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1435 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1436 Py_INCREF(Py_None);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1437 return Py_None;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1438 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1439 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1440 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1441 PythonLock::RaiseException(code);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1442 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1443 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1444 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1445
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1446 static PyObject* sdk_OrthancPluginRestApiDelete(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1447 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1448 PythonLock::LogCall("Calling Python global function: OrthancPluginRestApiDelete()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1449
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1450 const char* arg0 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1451
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1452 if (!PyArg_ParseTuple(args, "s", &arg0))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1453 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1454 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1455 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1456 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1457
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1458 OrthancPluginErrorCode code;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1459 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1460 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1461 code = OrthancPluginRestApiDelete(OrthancPlugins::GetGlobalContext(), arg0);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1462 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1463
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1464
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1465 if (code == OrthancPluginErrorCode_Success)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1466 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1467 Py_INCREF(Py_None);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1468 return Py_None;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1469 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1470 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1471 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1472 PythonLock::RaiseException(code);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1473 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1474 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1475 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1476
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1477 static PyObject* sdk_OrthancPluginRestApiDeleteAfterPlugins(PyObject* module, PyObject* args)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1478 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1479 PythonLock::LogCall("Calling Python global function: OrthancPluginRestApiDeleteAfterPlugins()");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1480
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1481 const char* arg0 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1482
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1483 if (!PyArg_ParseTuple(args, "s", &arg0))
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1484 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1485 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1486 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1487 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1488
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1489 OrthancPluginErrorCode code;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1490 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1491 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1492 code = OrthancPluginRestApiDeleteAfterPlugins(OrthancPlugins::GetGlobalContext(), arg0);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1493 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1494
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1495
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1496 if (code == OrthancPluginErrorCode_Success)
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1497 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1498 Py_INCREF(Py_None);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1499 return Py_None;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1500 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1501 else
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1502 {
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1503 PythonLock::RaiseException(code);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1504 return NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1505 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1506 }
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1507
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1508 static PyObject* sdk_OrthancPluginRestApiGet(PyObject* module, PyObject* args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1509 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
1510 PythonLock::LogCall("Calling Python global function: OrthancPluginRestApiGet()");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1511
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1512 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1513
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1514 if (!PyArg_ParseTuple(args, "s", &arg0))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1515 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1516 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
1517 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1518 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1519
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1520 OrthancPlugins::MemoryBuffer buffer;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1521 OrthancPluginErrorCode code;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1522 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1523 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1524 code = OrthancPluginRestApiGet(OrthancPlugins::GetGlobalContext(), *buffer, arg0);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1525 }
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1526
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1527 if (code == OrthancPluginErrorCode_Success)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1528 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1529 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize());
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1530 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1531 else
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1532 {
77
e7ff5efb100d Custom exception "orthanc.OrthancException" is raised instead of "ValueError"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 75
diff changeset
1533 PythonLock::RaiseException(code);
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1534 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1535 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1536 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1537
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1538 static PyObject* sdk_OrthancPluginRestApiGetAfterPlugins(PyObject* module, PyObject* args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1539 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
1540 PythonLock::LogCall("Calling Python global function: OrthancPluginRestApiGetAfterPlugins()");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1541
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1542 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1543
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1544 if (!PyArg_ParseTuple(args, "s", &arg0))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1545 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1546 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
1547 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1548 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1549
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1550 OrthancPlugins::MemoryBuffer buffer;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1551 OrthancPluginErrorCode code;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1552 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1553 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1554 code = OrthancPluginRestApiGetAfterPlugins(OrthancPlugins::GetGlobalContext(), *buffer, arg0);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1555 }
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1556
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1557 if (code == OrthancPluginErrorCode_Success)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1558 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1559 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize());
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1560 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1561 else
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1562 {
77
e7ff5efb100d Custom exception "orthanc.OrthancException" is raised instead of "ValueError"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 75
diff changeset
1563 PythonLock::RaiseException(code);
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1564 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1565 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1566 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1567
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1568 static PyObject* sdk_OrthancPluginRestApiPost(PyObject* module, PyObject* args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1569 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
1570 PythonLock::LogCall("Calling Python global function: OrthancPluginRestApiPost()");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1571
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1572 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1573 Py_buffer arg1;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1574
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1575 if (!PyArg_ParseTuple(args, "ss*", &arg0, &arg1))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1576 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1577 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
1578 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1579 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1580
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1581 OrthancPlugins::MemoryBuffer buffer;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1582 OrthancPluginErrorCode code;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1583 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1584 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1585 code = OrthancPluginRestApiPost(OrthancPlugins::GetGlobalContext(), *buffer, arg0, arg1.buf, arg1.len);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1586 }
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1587 PyBuffer_Release(&arg1);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1588 if (code == OrthancPluginErrorCode_Success)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1589 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1590 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize());
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1591 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1592 else
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1593 {
77
e7ff5efb100d Custom exception "orthanc.OrthancException" is raised instead of "ValueError"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 75
diff changeset
1594 PythonLock::RaiseException(code);
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1595 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1596 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1597 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1598
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1599 static PyObject* sdk_OrthancPluginRestApiPostAfterPlugins(PyObject* module, PyObject* args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1600 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
1601 PythonLock::LogCall("Calling Python global function: OrthancPluginRestApiPostAfterPlugins()");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1602
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1603 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1604 Py_buffer arg1;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1605
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1606 if (!PyArg_ParseTuple(args, "ss*", &arg0, &arg1))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1607 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1608 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
1609 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1610 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1611
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1612 OrthancPlugins::MemoryBuffer buffer;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1613 OrthancPluginErrorCode code;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1614 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1615 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1616 code = OrthancPluginRestApiPostAfterPlugins(OrthancPlugins::GetGlobalContext(), *buffer, arg0, arg1.buf, arg1.len);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1617 }
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1618 PyBuffer_Release(&arg1);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1619 if (code == OrthancPluginErrorCode_Success)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1620 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1621 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize());
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1622 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1623 else
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1624 {
77
e7ff5efb100d Custom exception "orthanc.OrthancException" is raised instead of "ValueError"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 75
diff changeset
1625 PythonLock::RaiseException(code);
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1626 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1627 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1628 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1629
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1630 static PyObject* sdk_OrthancPluginRestApiPut(PyObject* module, PyObject* args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1631 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
1632 PythonLock::LogCall("Calling Python global function: OrthancPluginRestApiPut()");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1633
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1634 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1635 Py_buffer arg1;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1636
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1637 if (!PyArg_ParseTuple(args, "ss*", &arg0, &arg1))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1638 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1639 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
1640 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1641 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1642
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1643 OrthancPlugins::MemoryBuffer buffer;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1644 OrthancPluginErrorCode code;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1645 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1646 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1647 code = OrthancPluginRestApiPut(OrthancPlugins::GetGlobalContext(), *buffer, arg0, arg1.buf, arg1.len);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1648 }
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1649 PyBuffer_Release(&arg1);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1650 if (code == OrthancPluginErrorCode_Success)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1651 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1652 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize());
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1653 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1654 else
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1655 {
77
e7ff5efb100d Custom exception "orthanc.OrthancException" is raised instead of "ValueError"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 75
diff changeset
1656 PythonLock::RaiseException(code);
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1657 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1658 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1659 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1660
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1661 static PyObject* sdk_OrthancPluginRestApiPutAfterPlugins(PyObject* module, PyObject* args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1662 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
1663 PythonLock::LogCall("Calling Python global function: OrthancPluginRestApiPutAfterPlugins()");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1664
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1665 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1666 Py_buffer arg1;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1667
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1668 if (!PyArg_ParseTuple(args, "ss*", &arg0, &arg1))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1669 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1670 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
1671 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1672 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1673
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1674 OrthancPlugins::MemoryBuffer buffer;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1675 OrthancPluginErrorCode code;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1676 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1677 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1678 code = OrthancPluginRestApiPutAfterPlugins(OrthancPlugins::GetGlobalContext(), *buffer, arg0, arg1.buf, arg1.len);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1679 }
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1680 PyBuffer_Release(&arg1);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1681 if (code == OrthancPluginErrorCode_Success)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1682 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1683 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize());
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1684 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1685 else
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1686 {
77
e7ff5efb100d Custom exception "orthanc.OrthancException" is raised instead of "ValueError"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 75
diff changeset
1687 PythonLock::RaiseException(code);
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1688 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1689 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1690 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1691
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1692 static PyObject* sdk_OrthancPluginSetDescription(PyObject* module, PyObject* args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1693 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
1694 PythonLock::LogCall("Calling Python global function: OrthancPluginSetDescription()");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1695
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1696 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1697
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1698 if (!PyArg_ParseTuple(args, "s", &arg0))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1699 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1700 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
1701 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1702 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1703
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1704 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1705 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1706 OrthancPluginSetDescription(OrthancPlugins::GetGlobalContext(), arg0);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1707 }
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1708
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1709
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1710 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1711 return Py_None;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1712 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1713
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1714 static PyObject* sdk_OrthancPluginSetGlobalProperty(PyObject* module, PyObject* args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1715 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
1716 PythonLock::LogCall("Calling Python global function: OrthancPluginSetGlobalProperty()");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1717
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1718 long int arg0 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1719 const char* arg1 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1720
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1721 if (!PyArg_ParseTuple(args, "ls", &arg0, &arg1))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1722 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1723 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
1724 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1725 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1726
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1727 OrthancPluginErrorCode code;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1728 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1729 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1730 code = OrthancPluginSetGlobalProperty(OrthancPlugins::GetGlobalContext(), arg0, arg1);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1731 }
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1732
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1733
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1734 if (code == OrthancPluginErrorCode_Success)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1735 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1736 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1737 return Py_None;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1738 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1739 else
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1740 {
75
cbfc72a53970 refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
1741 PythonLock::RaiseException(code);
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1742 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1743 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1744 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1745
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1746 static PyObject* sdk_OrthancPluginSetMetricsValue(PyObject* module, PyObject* args)
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1747 {
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1748 PythonLock::LogCall("Calling Python global function: OrthancPluginSetMetricsValue()");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1749
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1750 const char* arg0 = NULL;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1751 float arg1 = 0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1752 long int arg2 = 0;
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1753
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1754 if (!PyArg_ParseTuple(args, "sfl", &arg0, &arg1, &arg2))
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1755 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1756 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
1757 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1758 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1759
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1760 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1761 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1762 OrthancPluginSetMetricsValue(OrthancPlugins::GetGlobalContext(), arg0, arg1, static_cast<OrthancPluginMetricsType>(arg2));
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1763 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1764
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1765
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1766 Py_INCREF(Py_None);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1767 return Py_None;
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1768 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1769
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1770 static PyObject* sdk_OrthancPluginSetRootUri(PyObject* module, PyObject* args)
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1771 {
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1772 PythonLock::LogCall("Calling Python global function: OrthancPluginSetRootUri()");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1773
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1774 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1775
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1776 if (!PyArg_ParseTuple(args, "s", &arg0))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1777 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1778 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
1779 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1780 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1781
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1782 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1783 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1784 OrthancPluginSetRootUri(OrthancPlugins::GetGlobalContext(), arg0);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1785 }
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1786
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1787
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1788 Py_INCREF(Py_None);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1789 return Py_None;
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1790 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1791
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1792 static PyObject* sdk_OrthancPluginTranscodeDicomInstance(PyObject* module, PyObject* args)
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1793 {
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1794 PythonLock::LogCall("Calling Python global function: OrthancPluginTranscodeDicomInstance()");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1795
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1796 Py_buffer arg0;
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1797 const char* arg2 = NULL;
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1798
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1799 if (!PyArg_ParseTuple(args, "s*s", &arg0, &arg2))
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1800 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1801 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
1802 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1803 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1804
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1805 // This is the case of a constructor
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1806 OrthancPluginDicomInstance* obj;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1807 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1808 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1809 obj = OrthancPluginTranscodeDicomInstance(OrthancPlugins::GetGlobalContext(), arg0.buf, arg0.len, arg2);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1810 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1811 PyBuffer_Release(&arg0);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1812 if (obj == NULL)
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1813 {
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1814 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1815 return NULL;
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1816 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1817 else
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1818 {
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1819 PyObject *argList = Py_BuildValue("Lb", obj, false /* not borrowed */);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1820 PyObject *python = PyObject_CallObject((PyObject *) &sdk_OrthancPluginDicomInstance_Type, argList);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1821 Py_DECREF(argList);
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1822 return python;
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1823 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1824 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1825
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1826 static PyObject* sdk_OrthancPluginUncompressImage(PyObject* module, PyObject* args)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1827 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1
diff changeset
1828 PythonLock::LogCall("Calling Python global function: OrthancPluginUncompressImage()");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1829
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1830 Py_buffer arg0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1831 long int arg2 = 0;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1832
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1833 if (!PyArg_ParseTuple(args, "s*l", &arg0, &arg2))
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1834 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1835 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
1836 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1837 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1838
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1839 // This is the case of a constructor
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1840 OrthancPluginImage* obj;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1841 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1842 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1843 obj = OrthancPluginUncompressImage(OrthancPlugins::GetGlobalContext(), arg0.buf, arg0.len, static_cast<OrthancPluginImageFormat>(arg2));
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1844 }
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1845 PyBuffer_Release(&arg0);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1846 if (obj == NULL)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1847 {
75
cbfc72a53970 refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
1848 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1849 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1850 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1851 else
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1852 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1853 PyObject *argList = Py_BuildValue("Lb", obj, false /* not borrowed */);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1854 PyObject *python = PyObject_CallObject((PyObject *) &sdk_OrthancPluginImage_Type, argList);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1855 Py_DECREF(argList);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1856 return python;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1857 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1858 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1859
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1860 static PyObject* sdk_OrthancPluginWriteFile(PyObject* module, PyObject* args)
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1861 {
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1862 PythonLock::LogCall("Calling Python global function: OrthancPluginWriteFile()");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1863
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1864 const char* arg0 = NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1865 Py_buffer arg1;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1866
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1867 if (!PyArg_ParseTuple(args, "ss*", &arg0, &arg1))
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1868 {
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1869 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)");
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1870 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1871 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1872
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1873 OrthancPluginErrorCode code;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1874 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1875 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1876 code = OrthancPluginWriteFile(OrthancPlugins::GetGlobalContext(), arg0, arg1.buf, arg1.len);
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
1877 }
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1878 PyBuffer_Release(&arg1);
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1879
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1880 if (code == OrthancPluginErrorCode_Success)
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1881 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1882 Py_INCREF(Py_None);
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1883 return Py_None;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1884 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1885 else
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1886 {
75
cbfc72a53970 refactoring calls to PythonLock::RaiseException()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
1887 PythonLock::RaiseException(code);
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1888 return NULL;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1889 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1890 }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1891
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1892
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1893 static PyMethodDef ORTHANC_SDK_FUNCTIONS[] =
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1894 {
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1895 { "AutodetectMimeType", sdk_OrthancPluginAutodetectMimeType, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1896 "Generated from C function OrthancPluginAutodetectMimeType()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1897 { "BufferCompression", sdk_OrthancPluginBufferCompression, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1898 "Generated from C function OrthancPluginBufferCompression()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1899 { "CheckVersion", sdk_OrthancPluginCheckVersion, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1900 "Generated from C function OrthancPluginCheckVersion()" },
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1901 { "CheckVersionAdvanced", sdk_OrthancPluginCheckVersionAdvanced, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1902 "Generated from C function OrthancPluginCheckVersionAdvanced()" },
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1903 { "CompressJpegImage", sdk_OrthancPluginCompressJpegImage, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1904 "Generated from C function OrthancPluginCompressJpegImage()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1905 { "CompressPngImage", sdk_OrthancPluginCompressPngImage, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1906 "Generated from C function OrthancPluginCompressPngImage()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1907 { "ComputeMd5", sdk_OrthancPluginComputeMd5, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1908 "Generated from C function OrthancPluginComputeMd5()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1909 { "ComputeSha1", sdk_OrthancPluginComputeSha1, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1910 "Generated from C function OrthancPluginComputeSha1()" },
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1911 { "CreateDicom", sdk_OrthancPluginCreateDicom, METH_VARARGS,
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1912 "Generated from C function OrthancPluginCreateDicom()" },
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1913 { "CreateDicom2", sdk_OrthancPluginCreateDicom2, METH_VARARGS,
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 170
diff changeset
1914 "Generated from C function OrthancPluginCreateDicom2()" },
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1915 { "CreateDicomInstance", sdk_OrthancPluginCreateDicomInstance, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1916 "Generated from C function OrthancPluginCreateDicomInstance()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1917 { "CreateFindMatcher", sdk_OrthancPluginCreateFindMatcher, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1918 "Generated from C function OrthancPluginCreateFindMatcher()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1919 { "CreateImage", sdk_OrthancPluginCreateImage, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1920 "Generated from C function OrthancPluginCreateImage()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1921 { "DecodeDicomImage", sdk_OrthancPluginDecodeDicomImage, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1922 "Generated from C function OrthancPluginDecodeDicomImage()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1923 { "DicomBufferToJson", sdk_OrthancPluginDicomBufferToJson, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1924 "Generated from C function OrthancPluginDicomBufferToJson()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1925 { "DicomInstanceToJson", sdk_OrthancPluginDicomInstanceToJson, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1926 "Generated from C function OrthancPluginDicomInstanceToJson()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1927 { "ExtendOrthancExplorer", sdk_OrthancPluginExtendOrthancExplorer, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1928 "Generated from C function OrthancPluginExtendOrthancExplorer()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1929 { "GenerateRestApiAuthorizationToken", sdk_OrthancPluginGenerateRestApiAuthorizationToken, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1930 "Generated from C function OrthancPluginGenerateRestApiAuthorizationToken()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1931 { "GenerateUuid", sdk_OrthancPluginGenerateUuid, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1932 "Generated from C function OrthancPluginGenerateUuid()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1933 { "GetCommandLineArgument", sdk_OrthancPluginGetCommandLineArgument, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1934 "Generated from C function OrthancPluginGetCommandLineArgument()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1935 { "GetCommandLineArgumentsCount", sdk_OrthancPluginGetCommandLineArgumentsCount, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1936 "Generated from C function OrthancPluginGetCommandLineArgumentsCount()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1937 { "GetConfiguration", sdk_OrthancPluginGetConfiguration, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1938 "Generated from C function OrthancPluginGetConfiguration()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1939 { "GetConfigurationPath", sdk_OrthancPluginGetConfigurationPath, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1940 "Generated from C function OrthancPluginGetConfigurationPath()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1941 { "GetDicomForInstance", sdk_OrthancPluginGetDicomForInstance, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1942 "Generated from C function OrthancPluginGetDicomForInstance()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1943 { "GetErrorDescription", sdk_OrthancPluginGetErrorDescription, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1944 "Generated from C function OrthancPluginGetErrorDescription()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1945 { "GetExpectedDatabaseVersion", sdk_OrthancPluginGetExpectedDatabaseVersion, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1946 "Generated from C function OrthancPluginGetExpectedDatabaseVersion()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1947 { "GetFontName", sdk_OrthancPluginGetFontName, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1948 "Generated from C function OrthancPluginGetFontName()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1949 { "GetFontSize", sdk_OrthancPluginGetFontSize, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1950 "Generated from C function OrthancPluginGetFontSize()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1951 { "GetFontsCount", sdk_OrthancPluginGetFontsCount, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1952 "Generated from C function OrthancPluginGetFontsCount()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1953 { "GetGlobalProperty", sdk_OrthancPluginGetGlobalProperty, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1954 "Generated from C function OrthancPluginGetGlobalProperty()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1955 { "GetOrthancDirectory", sdk_OrthancPluginGetOrthancDirectory, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1956 "Generated from C function OrthancPluginGetOrthancDirectory()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1957 { "GetOrthancPath", sdk_OrthancPluginGetOrthancPath, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1958 "Generated from C function OrthancPluginGetOrthancPath()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1959 { "GetPeers", sdk_OrthancPluginGetPeers, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1960 "Generated from C function OrthancPluginGetPeers()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1961 { "GetTagName", sdk_OrthancPluginGetTagName, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1962 "Generated from C function OrthancPluginGetTagName()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1963 { "HttpDelete", sdk_OrthancPluginHttpDelete, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1964 "Generated from C function OrthancPluginHttpDelete()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1965 { "HttpGet", sdk_OrthancPluginHttpGet, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1966 "Generated from C function OrthancPluginHttpGet()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1967 { "HttpPost", sdk_OrthancPluginHttpPost, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1968 "Generated from C function OrthancPluginHttpPost()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1969 { "HttpPut", sdk_OrthancPluginHttpPut, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1970 "Generated from C function OrthancPluginHttpPut()" },
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1971 { "LogError", sdk_OrthancPluginLogError, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1972 "Generated from C function OrthancPluginLogError()" },
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1973 { "LogInfo", sdk_OrthancPluginLogInfo, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1974 "Generated from C function OrthancPluginLogInfo()" },
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1975 { "LogWarning", sdk_OrthancPluginLogWarning, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1976 "Generated from C function OrthancPluginLogWarning()" },
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1977 { "LookupInstance", sdk_OrthancPluginLookupInstance, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1978 "Generated from C function OrthancPluginLookupInstance()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1979 { "LookupPatient", sdk_OrthancPluginLookupPatient, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1980 "Generated from C function OrthancPluginLookupPatient()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1981 { "LookupSeries", sdk_OrthancPluginLookupSeries, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1982 "Generated from C function OrthancPluginLookupSeries()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1983 { "LookupStudy", sdk_OrthancPluginLookupStudy, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1984 "Generated from C function OrthancPluginLookupStudy()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1985 { "LookupStudyWithAccessionNumber", sdk_OrthancPluginLookupStudyWithAccessionNumber, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1986 "Generated from C function OrthancPluginLookupStudyWithAccessionNumber()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1987 { "ReadFile", sdk_OrthancPluginReadFile, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1988 "Generated from C function OrthancPluginReadFile()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1989 { "RegisterDictionaryTag", sdk_OrthancPluginRegisterDictionaryTag, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1990 "Generated from C function OrthancPluginRegisterDictionaryTag()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1991 { "RegisterErrorCode", sdk_OrthancPluginRegisterErrorCode, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1992 "Generated from C function OrthancPluginRegisterErrorCode()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1993 { "RegisterPrivateDictionaryTag", sdk_OrthancPluginRegisterPrivateDictionaryTag, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1994 "Generated from C function OrthancPluginRegisterPrivateDictionaryTag()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1995 { "RestApiDelete", sdk_OrthancPluginRestApiDelete, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1996 "Generated from C function OrthancPluginRestApiDelete()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1997 { "RestApiDeleteAfterPlugins", sdk_OrthancPluginRestApiDeleteAfterPlugins, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
1998 "Generated from C function OrthancPluginRestApiDeleteAfterPlugins()" },
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1999 { "RestApiGet", sdk_OrthancPluginRestApiGet, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2000 "Generated from C function OrthancPluginRestApiGet()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2001 { "RestApiGetAfterPlugins", sdk_OrthancPluginRestApiGetAfterPlugins, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2002 "Generated from C function OrthancPluginRestApiGetAfterPlugins()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2003 { "RestApiPost", sdk_OrthancPluginRestApiPost, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2004 "Generated from C function OrthancPluginRestApiPost()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2005 { "RestApiPostAfterPlugins", sdk_OrthancPluginRestApiPostAfterPlugins, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2006 "Generated from C function OrthancPluginRestApiPostAfterPlugins()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2007 { "RestApiPut", sdk_OrthancPluginRestApiPut, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2008 "Generated from C function OrthancPluginRestApiPut()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2009 { "RestApiPutAfterPlugins", sdk_OrthancPluginRestApiPutAfterPlugins, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2010 "Generated from C function OrthancPluginRestApiPutAfterPlugins()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2011 { "SetDescription", sdk_OrthancPluginSetDescription, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2012 "Generated from C function OrthancPluginSetDescription()" },
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2013 { "SetGlobalProperty", sdk_OrthancPluginSetGlobalProperty, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2014 "Generated from C function OrthancPluginSetGlobalProperty()" },
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
2015 { "SetMetricsValue", sdk_OrthancPluginSetMetricsValue, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
2016 "Generated from C function OrthancPluginSetMetricsValue()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
2017 { "SetRootUri", sdk_OrthancPluginSetRootUri, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
2018 "Generated from C function OrthancPluginSetRootUri()" },
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
2019 { "TranscodeDicomInstance", sdk_OrthancPluginTranscodeDicomInstance, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
2020 "Generated from C function OrthancPluginTranscodeDicomInstance()" },
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2021 { "UncompressImage", sdk_OrthancPluginUncompressImage, METH_VARARGS,
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2022 "Generated from C function OrthancPluginUncompressImage()" },
170
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
2023 { "WriteFile", sdk_OrthancPluginWriteFile, METH_VARARGS,
b49eeb36cd0d removed generation of code model, now part of orthanc-java
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
2024 "Generated from C function OrthancPluginWriteFile()" },
208
315e1720a35f documented orthanc.CreateImageFromBuffer()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 205
diff changeset
2025 { "CreateImageFromBuffer", CreateImageFromBuffer, METH_VARARGS,
315e1720a35f documented orthanc.CreateImageFromBuffer()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 205
diff changeset
2026 "Implemented in C++ function CreateImageFromBuffer()" },
205
234681297600 documented orthanc.LookupDictionary()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 203
diff changeset
2027 { "LookupDictionary", LookupDictionary, METH_VARARGS,
234681297600 documented orthanc.LookupDictionary()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 203
diff changeset
2028 "Implemented in C++ function LookupDictionary()" },
203
28531e615104 documented orthanc.RegisterIncomingHttpRequestFilter() and orthanc.RegisterOnStoredInstanceCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 197
diff changeset
2029 { "RegisterIncomingHttpRequestFilter", RegisterIncomingHttpRequestFilter, METH_VARARGS,
28531e615104 documented orthanc.RegisterIncomingHttpRequestFilter() and orthanc.RegisterOnStoredInstanceCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 197
diff changeset
2030 "Implemented in C++ function RegisterIncomingHttpRequestFilter()" },
195
d7a6e75558ee documented orthanc.RegisterOnChangeCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 192
diff changeset
2031 { "RegisterOnChangeCallback", RegisterOnChangeCallback, METH_VARARGS,
d7a6e75558ee documented orthanc.RegisterOnChangeCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 192
diff changeset
2032 "Implemented in C++ function RegisterOnChangeCallback()" },
203
28531e615104 documented orthanc.RegisterIncomingHttpRequestFilter() and orthanc.RegisterOnStoredInstanceCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 197
diff changeset
2033 { "RegisterOnStoredInstanceCallback", RegisterOnStoredInstanceCallback, METH_VARARGS,
28531e615104 documented orthanc.RegisterIncomingHttpRequestFilter() and orthanc.RegisterOnStoredInstanceCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 197
diff changeset
2034 "Implemented in C++ function RegisterOnStoredInstanceCallback()" },
192
b0f096d2339e documentation of orthanc.RegisterRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 191
diff changeset
2035 { "RegisterRestCallback", RegisterRestCallback, METH_VARARGS,
b0f096d2339e documentation of orthanc.RegisterRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 191
diff changeset
2036 "Implemented in C++ function RegisterRestCallback()" },
1
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2037 { NULL, NULL }
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2038 };
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2039
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2040
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2041 PyMethodDef* GetOrthancSdkFunctions()
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2042 {
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2043 return ORTHANC_SDK_FUNCTIONS;
fef9a239df5c adding auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2044 }