annotate Sources/Autogenerated/sdk_OrthancPluginJob.methods.h @ 219:3678a028f1f6

making the project REUSE-compliant
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 03 Jul 2024 18:05:11 +0200
parents 55473de7694f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
219
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 186
diff changeset
1 /**
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 186
diff changeset
2 * SPDX-FileCopyrightText: 2020-2023 Osimis S.A., 2024-2024 Orthanc Team SRL, 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 186
diff changeset
3 * SPDX-License-Identifier: AGPL-3.0-or-later
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 186
diff changeset
4 */
3678a028f1f6 making the project REUSE-compliant
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 186
diff changeset
5
186
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
6 /**
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
7 * Python plugin for Orthanc
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
8 * Copyright (C) 2020-2023 Osimis S.A., Belgium
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
9 * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
10 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
11 *
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
12 * This program is free software: you can redistribute it and/or
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
13 * modify it under the terms of the GNU Affero General Public License
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
14 * as published by the Free Software Foundation, either version 3 of
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
15 * the License, or (at your option) any later version.
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
16 *
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
17 * This program is distributed in the hope that it will be useful, but
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
20 * Affero General Public License for more details.
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
21 *
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
22 * You should have received a copy of the GNU Affero General Public License
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
23 * along with this program. If not, see <http://www.gnu.org/licenses/>.
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
24 **/
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
25
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
26
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
27 // WARNING: Auto-generated file. Do not modify it by hand.
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
28
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 184
diff changeset
29
129
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 // Actual implementation of the methods
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 static PyObject *sdk_OrthancPluginJob_OrthancPluginSubmitJob(
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 sdk_OrthancPluginJob_Object* self, PyObject *args)
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 {
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 PythonLock::LogCall("Calling method OrthancPluginSubmitJob() on object of class OrthancPluginJob");
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 if (self->object_ == NULL)
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 {
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 PyErr_SetString(PyExc_ValueError, "Invalid object");
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 return NULL;
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 }
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41
177
008be55355a4 regenerating the wrapper after patching SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 149
diff changeset
42 long int arg0 = 0;
129
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43
177
008be55355a4 regenerating the wrapper after patching SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 149
diff changeset
44 if (!PyArg_ParseTuple(args, "l", &arg0))
129
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 {
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 return NULL;
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 149
diff changeset
49
129
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 OrthancPlugins::OrthancString s;
184
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
51 {
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
52 PythonThreadsAllower allower;
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
53 s.Assign(OrthancPluginSubmitJob(OrthancPlugins::GetGlobalContext(), self->object_, arg0));
f34f3a149c22 added class PythonThreadsAllower
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 178
diff changeset
54 }
129
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 if (s.GetContent() == NULL)
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 {
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 return NULL;
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 }
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 else
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 {
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 return PyUnicode_FromString(s.GetContent());
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 }
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 }
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66