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