Mercurial > hg > orthanc-python
comparison Sources/Plugin.cpp @ 50:70abe3ebbbfc
New Python function: "orthanc.RegisterIncomingHttpRequestFilter()"
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 08 Dec 2020 19:02:30 +0100 |
parents | 42de8b600c0c |
children | 23f3099bed47 |
comparison
equal
deleted
inserted
replaced
49:9e466631660a | 50:70abe3ebbbfc |
---|---|
22 | 22 |
23 // https://www.codevate.com/blog/7-concurrency-with-embedded-python-in-a-multi-threaded-c-application | 23 // https://www.codevate.com/blog/7-concurrency-with-embedded-python-in-a-multi-threaded-c-application |
24 // https://fr.slideshare.net/YiLungTsai/embed-python | 24 // https://fr.slideshare.net/YiLungTsai/embed-python |
25 | 25 |
26 | 26 |
27 #include "IncomingHttpRequestFilter.h" | |
28 #include "OnChangeCallback.h" | |
27 #include "OnStoredInstanceCallback.h" | 29 #include "OnStoredInstanceCallback.h" |
28 #include "OnChangeCallback.h" | 30 |
29 #include "RestCallbacks.h" | 31 #include "RestCallbacks.h" |
30 #include "PythonModule.h" | 32 #include "PythonModule.h" |
31 | 33 |
32 #include "Autogenerated/sdk.h" | 34 #include "Autogenerated/sdk.h" |
33 | 35 |
84 } | 86 } |
85 | 87 |
86 { | 88 { |
87 PyMethodDef f = { "RegisterOnStoredInstanceCallback", RegisterOnStoredInstanceCallback, | 89 PyMethodDef f = { "RegisterOnStoredInstanceCallback", RegisterOnStoredInstanceCallback, |
88 METH_VARARGS, "" }; | 90 METH_VARARGS, "" }; |
91 functions.push_back(f); | |
92 } | |
93 | |
94 { | |
95 // New in release 3.0 | |
96 PyMethodDef f = { "RegisterIncomingHttpRequestFilter", RegisterIncomingHttpRequestFilter, METH_VARARGS, "" }; | |
89 functions.push_back(f); | 97 functions.push_back(f); |
90 } | 98 } |
91 | 99 |
92 /** | 100 /** |
93 * Append all the global functions that were automatically generated | 101 * Append all the global functions that were automatically generated |
287 if (pythonEnabled_) | 295 if (pythonEnabled_) |
288 { | 296 { |
289 FinalizeOnChangeCallback(); | 297 FinalizeOnChangeCallback(); |
290 FinalizeRestCallbacks(); | 298 FinalizeRestCallbacks(); |
291 FinalizeOnStoredInstanceCallback(); | 299 FinalizeOnStoredInstanceCallback(); |
300 FinalizeIncomingHttpRequestFilter(); | |
292 | 301 |
293 PythonLock::GlobalFinalize(); | 302 PythonLock::GlobalFinalize(); |
294 } | 303 } |
295 } | 304 } |
296 | 305 |