comparison Sphinx/source/developers/creating-plugins.rst @ 25:669ea65ba7fb

fix links
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 20 Jul 2016 09:26:08 +0200
parents 25fa874803ab
children 2ee7f4462a6a
comparison
equal deleted inserted replaced
24:25fa874803ab 25:669ea65ba7fb
15 the official Orthanc repository 15 the official Orthanc repository
16 <https://bitbucket.org/sjodogne/orthanc/src/default/Plugins/Samples/>`__ 16 <https://bitbucket.org/sjodogne/orthanc/src/default/Plugins/Samples/>`__
17 (in the ``Plugins/Samples`` folder of the ``plugins`` branch). A 17 (in the ``Plugins/Samples`` folder of the ``plugins`` branch). A
18 tutorial showing how to implement a basic WADO server is `available on 18 tutorial showing how to implement a basic WADO server is `available on
19 CodeProject 19 CodeProject
20 <http://codeproject.com/Articles/797118/Implementing-a-WADO-Server-using-Orthanc>`__. 20 <http://www.codeproject.com/Articles/797118/Implementing-a-WADO-Server-using-Orthanc>`__.
21
22 We suggest developers to adopt the :ref:`coding style of the Orthanc
23 core <coding-style>`, although this is of course not required.
24
25 Do not hesitate to `contact us
26 <http://www.orthanc-server.com/static.php?page=contact>`__ if you wish
27 your plugin to be **indexed** in :ref:`this part of the Orthanc Book
28 <plugins-contributed>`!
29
30
31 Structure of the plugins
32 ------------------------
21 33
22 A plugin takes the form of a shared library (``.DLL`` under Windows, 34 A plugin takes the form of a shared library (``.DLL`` under Windows,
23 ``.so`` under Linux, ``.dylib`` under Apple OS X...) that must declare 4 35 ``.so`` under Linux, ``.dylib`` under Apple OS X...) that use the `ABI
24 public functions/symbols: 36 of the C language
37 <https://en.wikipedia.org/wiki/Application_binary_interface>`__ to
38 declare 4 public functions/symbols:
25 39
26 * ``int32_t OrthancPluginInitialize(OrthancPluginContext* context)``. This 40 * ``int32_t OrthancPluginInitialize(OrthancPluginContext* context)``. This
27 callback function is responsible for initializing the plugin. The 41 callback function is responsible for initializing the plugin. The
28 ``context`` argument gives access to the API of Orthanc. 42 ``context`` argument gives access to the API of Orthanc.
29 * ``void OrthancPluginFinalize()``. This function is responsible 43 * ``void OrthancPluginFinalize()``. This function is responsible
31 * ``const char* OrthancPluginGetName()``. This function must give a 45 * ``const char* OrthancPluginGetName()``. This function must give a
32 name to the plugin. 46 name to the plugin.
33 * ``const char* OrthancPluginGetVersion()``. This function must 47 * ``const char* OrthancPluginGetVersion()``. This function must
34 provide the version of the plugin. 48 provide the version of the plugin.
35 49
36 We suggest developers to adopt the :ref:`coding style of the Orthanc 50 *Remark:* The size of the memory buffers that are exchanged between
37 core <coding-style>`, although this is of course not required. 51 the Orthanc core and the plugins must be below 4GB. This is a
38 52 consequence of the fact that the Orthanc plugin SDK uses ``uint32_t``
39 Do not hesitate to `contact us 53 to encode the size of a memory buffer. We might extend the SDK in
40 <http://www.orthanc-server.com/static.php?page=contact>`__ if you wish 54 the future to deal with buffers whose size if above 4GB.
41 your plugin to be **indexed** in :ref:`this part of the Orthanc Book
42 <plugins-contributed>`!
43