comparison Applications/Resources/Orthanc/Sdk-1.0.0/orthanc/OrthancCPlugin.h @ 1638:754ef576d945

sync
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 10 Nov 2020 16:26:47 +0100
parents 4fb8fdf03314
children
comparison
equal deleted inserted replaced
1637:d569effcd433 1638:754ef576d945
3 * 3 *
4 * This C/C++ SDK allows external developers to create plugins that 4 * This C/C++ SDK allows external developers to create plugins that
5 * can be loaded into Orthanc to extend its functionality. Each 5 * can be loaded into Orthanc to extend its functionality. Each
6 * Orthanc plugin must expose 4 public functions with the following 6 * Orthanc plugin must expose 4 public functions with the following
7 * signatures: 7 * signatures:
8 * 8 *
9 * -# <tt>int32_t OrthancPluginInitialize(const OrthancPluginContext* context)</tt>: 9 * -# <tt>int32_t OrthancPluginInitialize(const OrthancPluginContext* context)</tt>:
10 * This function is invoked by Orthanc when it loads the plugin on startup. 10 * This function is invoked by Orthanc when it loads the plugin on startup.
11 * The plugin must: 11 * The plugin must:
12 * - Check its compatibility with the Orthanc version using 12 * - Check its compatibility with the Orthanc version using
13 * ::OrthancPluginCheckVersion(). 13 * ::OrthancPluginCheckVersion().
29 * The plugin must return a string containing its version number. 29 * The plugin must return a string containing its version number.
30 * 30 *
31 * The name and the version of a plugin is only used to prevent it 31 * The name and the version of a plugin is only used to prevent it
32 * from being loaded twice. Note that, in C++, it is mandatory to 32 * from being loaded twice. Note that, in C++, it is mandatory to
33 * declare these functions within an <tt>extern "C"</tt> section. 33 * declare these functions within an <tt>extern "C"</tt> section.
34 * 34 *
35 * To ensure multi-threading safety, the various REST callbacks are 35 * To ensure multi-threading safety, the various REST callbacks are
36 * guaranteed to be executed in mutual exclusion since Orthanc 36 * guaranteed to be executed in mutual exclusion since Orthanc
37 * 0.8.5. If this feature is undesired (notably when developing 37 * 0.8.5. If this feature is undesired (notably when developing
38 * high-performance plugins handling simultaneous requests), use 38 * high-performance plugins handling simultaneous requests), use
39 * ::OrthancPluginRegisterRestCallbackNoLock(). 39 * ::OrthancPluginRegisterRestCallbackNoLock().
86 * modify file(s) with this exception, you may extend this exception to 86 * modify file(s) with this exception, you may extend this exception to
87 * your version of the file(s), but you are not obligated to do so. If 87 * your version of the file(s), but you are not obligated to do so. If
88 * you do not wish to do so, delete this exception statement from your 88 * you do not wish to do so, delete this exception statement from your
89 * version. If you delete this exception statement from all source files 89 * version. If you delete this exception statement from all source files
90 * in the program, then also delete it here. 90 * in the program, then also delete it here.
91 * 91 *
92 * This program is distributed in the hope that it will be useful, but 92 * This program is distributed in the hope that it will be useful, but
93 * WITHOUT ANY WARRANTY; without even the implied warranty of 93 * WITHOUT ANY WARRANTY; without even the implied warranty of
94 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 94 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
95 * General Public License for more details. 95 * General Public License for more details.
96 * 96 *