Mercurial > hg > orthanc-python
comparison Sources/Autogenerated/sdk_OrthancPluginStorageArea.methods.h @ 184:f34f3a149c22 java-code-model
added class PythonThreadsAllower
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 02 Jul 2024 15:49:05 +0200 |
parents | e9be3c9294d4 |
children | 55473de7694f |
comparison
equal
deleted
inserted
replaced
183:d31f216c9462 | 184:f34f3a149c22 |
---|---|
19 { | 19 { |
20 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (4 arguments expected)"); | 20 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (4 arguments expected)"); |
21 return NULL; | 21 return NULL; |
22 } | 22 } |
23 | 23 |
24 OrthancPluginErrorCode code = OrthancPluginStorageAreaCreate(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1.buf, arg2, static_cast<OrthancPluginContentType>(arg3)); | 24 OrthancPluginErrorCode code; |
25 { | |
26 PythonThreadsAllower allower; | |
27 code = OrthancPluginStorageAreaCreate(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1.buf, arg2, static_cast<OrthancPluginContentType>(arg3)); | |
28 } | |
25 PyBuffer_Release(&arg1); | 29 PyBuffer_Release(&arg1); |
26 | 30 |
27 if (code == OrthancPluginErrorCode_Success) | 31 if (code == OrthancPluginErrorCode_Success) |
28 { | 32 { |
29 Py_INCREF(Py_None); | 33 Py_INCREF(Py_None); |
55 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)"); | 59 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)"); |
56 return NULL; | 60 return NULL; |
57 } | 61 } |
58 | 62 |
59 OrthancPlugins::MemoryBuffer buffer; | 63 OrthancPlugins::MemoryBuffer buffer; |
60 OrthancPluginErrorCode code = OrthancPluginStorageAreaRead(OrthancPlugins::GetGlobalContext(), *buffer, self->object_, arg0, static_cast<OrthancPluginContentType>(arg1)); | 64 OrthancPluginErrorCode code; |
65 { | |
66 PythonThreadsAllower allower; | |
67 code = OrthancPluginStorageAreaRead(OrthancPlugins::GetGlobalContext(), *buffer, self->object_, arg0, static_cast<OrthancPluginContentType>(arg1)); | |
68 } | |
61 | 69 |
62 if (code == OrthancPluginErrorCode_Success) | 70 if (code == OrthancPluginErrorCode_Success) |
63 { | 71 { |
64 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); | 72 return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize()); |
65 } | 73 } |
88 { | 96 { |
89 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)"); | 97 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)"); |
90 return NULL; | 98 return NULL; |
91 } | 99 } |
92 | 100 |
93 OrthancPluginErrorCode code = OrthancPluginStorageAreaRemove(OrthancPlugins::GetGlobalContext(), self->object_, arg0, static_cast<OrthancPluginContentType>(arg1)); | 101 OrthancPluginErrorCode code; |
102 { | |
103 PythonThreadsAllower allower; | |
104 code = OrthancPluginStorageAreaRemove(OrthancPlugins::GetGlobalContext(), self->object_, arg0, static_cast<OrthancPluginContentType>(arg1)); | |
105 } | |
94 | 106 |
95 | 107 |
96 if (code == OrthancPluginErrorCode_Success) | 108 if (code == OrthancPluginErrorCode_Success) |
97 { | 109 { |
98 Py_INCREF(Py_None); | 110 Py_INCREF(Py_None); |
122 { | 134 { |
123 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); | 135 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
124 return NULL; | 136 return NULL; |
125 } | 137 } |
126 | 138 |
127 OrthancPluginErrorCode code = OrthancPluginReconstructMainDicomTags(OrthancPlugins::GetGlobalContext(), self->object_, static_cast<OrthancPluginResourceType>(arg0)); | 139 OrthancPluginErrorCode code; |
140 { | |
141 PythonThreadsAllower allower; | |
142 code = OrthancPluginReconstructMainDicomTags(OrthancPlugins::GetGlobalContext(), self->object_, static_cast<OrthancPluginResourceType>(arg0)); | |
143 } | |
128 | 144 |
129 | 145 |
130 if (code == OrthancPluginErrorCode_Success) | 146 if (code == OrthancPluginErrorCode_Success) |
131 { | 147 { |
132 Py_INCREF(Py_None); | 148 Py_INCREF(Py_None); |