Mercurial > hg > orthanc-python
comparison Sources/Autogenerated/sdk_GlobalFunctions.impl.h @ 49:9e466631660a
ugrade to Orthanc SDK 1.8.1
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 08 Dec 2020 16:30:25 +0100 |
parents | 393d2da0722a |
children | 23f3099bed47 |
comparison
equal
deleted
inserted
replaced
48:0f8c9ce124d6 | 49:9e466631660a |
---|---|
1655 { | 1655 { |
1656 // TODO => RAISE : https://stackoverflow.com/questions/60832317 | 1656 // TODO => RAISE : https://stackoverflow.com/questions/60832317 |
1657 //PythonLock::RaiseException(module, OrthancPluginErrorCode_InternalError); | 1657 //PythonLock::RaiseException(module, OrthancPluginErrorCode_InternalError); |
1658 PyErr_SetString(PyExc_ValueError, "Internal error"); | 1658 PyErr_SetString(PyExc_ValueError, "Internal error"); |
1659 return NULL; | 1659 return NULL; |
1660 } | |
1661 } | |
1662 | |
1663 static PyObject* sdk_OrthancPluginGenerateRestApiAuthorizationToken(PyObject* module, PyObject* args) | |
1664 { | |
1665 PythonLock::LogCall("Calling Python global function: OrthancPluginGenerateRestApiAuthorizationToken()"); | |
1666 | |
1667 | |
1668 OrthancPlugins::OrthancString s; | |
1669 s.Assign(OrthancPluginGenerateRestApiAuthorizationToken(OrthancPlugins::GetGlobalContext())); | |
1670 | |
1671 if (s.GetContent() == NULL) | |
1672 { | |
1673 // TODO => RAISE : https://stackoverflow.com/questions/60832317 | |
1674 //PythonLock::RaiseException(module, OrthancPluginErrorCode_InternalError); | |
1675 PyErr_SetString(PyExc_ValueError, "Internal error"); | |
1676 return NULL; | |
1677 } | |
1678 else | |
1679 { | |
1680 return PyUnicode_FromString(s.GetContent()); | |
1660 } | 1681 } |
1661 } | 1682 } |
1662 | 1683 |
1663 | 1684 |
1664 static PyMethodDef ORTHANC_SDK_FUNCTIONS[] = | 1685 static PyMethodDef ORTHANC_SDK_FUNCTIONS[] = |
1787 "Generated from C function OrthancPluginCreateDicomInstance()" }, | 1808 "Generated from C function OrthancPluginCreateDicomInstance()" }, |
1788 { "TranscodeDicomInstance", sdk_OrthancPluginTranscodeDicomInstance, METH_VARARGS, | 1809 { "TranscodeDicomInstance", sdk_OrthancPluginTranscodeDicomInstance, METH_VARARGS, |
1789 "Generated from C function OrthancPluginTranscodeDicomInstance()" }, | 1810 "Generated from C function OrthancPluginTranscodeDicomInstance()" }, |
1790 { "CreateMemoryBuffer", sdk_OrthancPluginCreateMemoryBuffer, METH_VARARGS, | 1811 { "CreateMemoryBuffer", sdk_OrthancPluginCreateMemoryBuffer, METH_VARARGS, |
1791 "Generated from C function OrthancPluginCreateMemoryBuffer()" }, | 1812 "Generated from C function OrthancPluginCreateMemoryBuffer()" }, |
1813 { "GenerateRestApiAuthorizationToken", sdk_OrthancPluginGenerateRestApiAuthorizationToken, METH_VARARGS, | |
1814 "Generated from C function OrthancPluginGenerateRestApiAuthorizationToken()" }, | |
1792 { NULL, NULL } | 1815 { NULL, NULL } |
1793 }; | 1816 }; |
1794 | 1817 |
1795 | 1818 |
1796 PyMethodDef* GetOrthancSdkFunctions() | 1819 PyMethodDef* GetOrthancSdkFunctions() |