annotate Sources/Autogenerated/sdk_GlobalFunctions.impl.h @ 205:234681297600

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