comparison OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h @ 5389:0e5e675b9750

replaced "int" by "int32_t" in the SDK to prevent any ABI issue
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 21 Sep 2023 18:18:25 +0200
parents 33410f14033b
children b7e60d081b81
comparison
equal deleted inserted replaced
5388:c026301eee9e 5389:0e5e675b9750
1901 * @return 1 if and only if the versions are compatible. If the 1901 * @return 1 if and only if the versions are compatible. If the
1902 * result is 0, the initialization of the plugin should fail. 1902 * result is 0, the initialization of the plugin should fail.
1903 * @see OrthancPluginCheckVersion() 1903 * @see OrthancPluginCheckVersion()
1904 * @ingroup Callbacks 1904 * @ingroup Callbacks
1905 **/ 1905 **/
1906 ORTHANC_PLUGIN_INLINE int OrthancPluginCheckVersionAdvanced( 1906 ORTHANC_PLUGIN_INLINE int32_t OrthancPluginCheckVersionAdvanced(
1907 OrthancPluginContext* context, 1907 OrthancPluginContext* context,
1908 int expectedMajor, 1908 int32_t expectedMajor,
1909 int expectedMinor, 1909 int32_t expectedMinor,
1910 int expectedRevision) 1910 int32_t expectedRevision)
1911 { 1911 {
1912 int major, minor, revision; 1912 int32_t major, minor, revision;
1913 1913
1914 if (sizeof(int32_t) != sizeof(OrthancPluginErrorCode) || 1914 if (sizeof(int) != sizeof(int32_t) || /* Ensure binary compatibility with Orthanc SDK <= 1.12.1 */
1915 sizeof(int32_t) != sizeof(OrthancPluginErrorCode) ||
1915 sizeof(int32_t) != sizeof(OrthancPluginHttpMethod) || 1916 sizeof(int32_t) != sizeof(OrthancPluginHttpMethod) ||
1916 sizeof(int32_t) != sizeof(_OrthancPluginService) || 1917 sizeof(int32_t) != sizeof(_OrthancPluginService) ||
1917 sizeof(int32_t) != sizeof(_OrthancPluginProperty) || 1918 sizeof(int32_t) != sizeof(_OrthancPluginProperty) ||
1918 sizeof(int32_t) != sizeof(OrthancPluginPixelFormat) || 1919 sizeof(int32_t) != sizeof(OrthancPluginPixelFormat) ||
1919 sizeof(int32_t) != sizeof(OrthancPluginContentType) || 1920 sizeof(int32_t) != sizeof(OrthancPluginContentType) ||
2007 * @return 1 if and only if the versions are compatible. If the 2008 * @return 1 if and only if the versions are compatible. If the
2008 * result is 0, the initialization of the plugin should fail. 2009 * result is 0, the initialization of the plugin should fail.
2009 * @see OrthancPluginCheckVersionAdvanced() 2010 * @see OrthancPluginCheckVersionAdvanced()
2010 * @ingroup Callbacks 2011 * @ingroup Callbacks
2011 **/ 2012 **/
2012 ORTHANC_PLUGIN_INLINE int OrthancPluginCheckVersion( 2013 ORTHANC_PLUGIN_INLINE int32_t OrthancPluginCheckVersion(
2013 OrthancPluginContext* context) 2014 OrthancPluginContext* context)
2014 { 2015 {
2015 return OrthancPluginCheckVersionAdvanced( 2016 return OrthancPluginCheckVersionAdvanced(
2016 context, 2017 context,
2017 ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER, 2018 ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER,
3149 * @param instance The instance of interest. 3150 * @param instance The instance of interest.
3150 * @param metadata The metadata of interest. 3151 * @param metadata The metadata of interest.
3151 * @return 1 if the metadata is present, 0 if it is absent, -1 in case of error. 3152 * @return 1 if the metadata is present, 0 if it is absent, -1 in case of error.
3152 * @ingroup DicomInstance 3153 * @ingroup DicomInstance
3153 **/ 3154 **/
3154 ORTHANC_PLUGIN_INLINE int OrthancPluginHasInstanceMetadata( 3155 ORTHANC_PLUGIN_INLINE int32_t OrthancPluginHasInstanceMetadata(
3155 OrthancPluginContext* context, 3156 OrthancPluginContext* context,
3156 const OrthancPluginDicomInstance* instance, 3157 const OrthancPluginDicomInstance* instance,
3157 const char* metadata) 3158 const char* metadata)
3158 { 3159 {
3159 int64_t result; 3160 int64_t result;
6919 6920
6920 typedef struct 6921 typedef struct
6921 { 6922 {
6922 char** resultId; 6923 char** resultId;
6923 OrthancPluginJob *job; 6924 OrthancPluginJob *job;
6924 int priority; 6925 int32_t priority;
6925 } _OrthancPluginSubmitJob; 6926 } _OrthancPluginSubmitJob;
6926 6927
6927 /** 6928 /**
6928 * @brief Submit a new job to the jobs engine of Orthanc. 6929 * @brief Submit a new job to the jobs engine of Orthanc.
6929 * 6930 *
6938 * @ingroup Toolbox 6939 * @ingroup Toolbox
6939 **/ 6940 **/
6940 ORTHANC_PLUGIN_INLINE char *OrthancPluginSubmitJob( 6941 ORTHANC_PLUGIN_INLINE char *OrthancPluginSubmitJob(
6941 OrthancPluginContext *context, 6942 OrthancPluginContext *context,
6942 OrthancPluginJob *job, 6943 OrthancPluginJob *job,
6943 int priority) 6944 int32_t priority)
6944 { 6945 {
6945 char* resultId = NULL; 6946 char* resultId = NULL;
6946 6947
6947 _OrthancPluginSubmitJob params; 6948 _OrthancPluginSubmitJob params;
6948 memset(&params, 0, sizeof(params)); 6949 memset(&params, 0, sizeof(params));