changeset 1810:796d0b087fb8 worklists

more consistent naming in worklist primitives
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 23 Nov 2015 17:09:27 +0100
parents 5ed8769b17f9
children 67466dcd23b1 8e5600e699c0
files Plugins/Engine/OrthancPlugins.cpp Plugins/Include/orthanc/OrthancCPlugin.h Plugins/Samples/ModalityWorklists/Plugin.cpp
diffstat 3 files changed, 20 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Engine/OrthancPlugins.cpp	Mon Nov 23 17:02:42 2015 +0100
+++ b/Plugins/Engine/OrthancPlugins.cpp	Mon Nov 23 17:09:27 2015 +0100
@@ -1932,7 +1932,7 @@
         ApplyDicomToJson(service, parameters);
         return true;
 
-      case _OrthancPluginService_AddWorklistAnswer:
+      case _OrthancPluginService_WorklistAddAnswer:
       {
         const _OrthancPluginWorklistAnswersOperation& p =
           *reinterpret_cast<const _OrthancPluginWorklistAnswersOperation*>(parameters);
@@ -1940,7 +1940,7 @@
         return true;
       }
 
-      case _OrthancPluginService_MarkWorklistAnswersIncomplete:
+      case _OrthancPluginService_WorklistMarkIncomplete:
       {
         const _OrthancPluginWorklistAnswersOperation& p =
           *reinterpret_cast<const _OrthancPluginWorklistAnswersOperation*>(parameters);
@@ -1948,7 +1948,7 @@
         return true;
       }
 
-      case _OrthancPluginService_IsWorklistMatch:
+      case _OrthancPluginService_WorklistIsMatch:
       {
         const _OrthancPluginWorklistQueryOperation& p =
           *reinterpret_cast<const _OrthancPluginWorklistQueryOperation*>(parameters);
@@ -1956,7 +1956,7 @@
         return true;
       }
 
-      case _OrthancPluginService_GetWorklistQueryDicom:
+      case _OrthancPluginService_WorklistGetDicomQuery:
       {
         const _OrthancPluginWorklistQueryOperation& p =
           *reinterpret_cast<const _OrthancPluginWorklistQueryOperation*>(parameters);
--- a/Plugins/Include/orthanc/OrthancCPlugin.h	Mon Nov 23 17:02:42 2015 +0100
+++ b/Plugins/Include/orthanc/OrthancCPlugin.h	Mon Nov 23 17:09:27 2015 +0100
@@ -469,10 +469,10 @@
     _OrthancPluginService_DrawText = 6011,
 
     /* Primitives for handling worklists */
-    _OrthancPluginService_AddWorklistAnswer = 7000,
-    _OrthancPluginService_MarkWorklistAnswersIncomplete = 7001,
-    _OrthancPluginService_IsWorklistMatch = 7002,
-    _OrthancPluginService_GetWorklistQueryDicom = 7003,
+    _OrthancPluginService_WorklistAddAnswer = 7000,
+    _OrthancPluginService_WorklistMarkIncomplete = 7001,
+    _OrthancPluginService_WorklistIsMatch = 7002,
+    _OrthancPluginService_WorklistGetDicomQuery = 7003,
 
     _OrthancPluginService_INTERNAL = 0x7fffffff
   } _OrthancPluginService;
@@ -4126,7 +4126,7 @@
    * @return 0 if success, other value if error.
    * @ingroup Worklists
    **/
-  ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode  OrthancPluginWorklistAddWorklistAnswer(
+  ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode  OrthancPluginWorklistAddAnswer(
     OrthancPluginContext*             context,
     OrthancPluginWorklistAnswers*     answers,
     const OrthancPluginWorklistQuery* query,
@@ -4139,7 +4139,7 @@
     params.dicom = dicom;
     params.size = size;
 
-    return context->InvokeService(context, _OrthancPluginService_AddWorklistAnswer, &params);
+    return context->InvokeService(context, _OrthancPluginService_WorklistAddAnswer, &params);
   }
 
 
@@ -4156,7 +4156,7 @@
    * @return 0 if success, other value if error.
    * @ingroup Worklists
    **/
-  ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode  OrthancPluginMarkWorklistAnswersIncomplete(
+  ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode  OrthancPluginWorklistMarkIncomplete(
     OrthancPluginContext*          context,
     OrthancPluginWorklistAnswers*  answers)
   {
@@ -4166,7 +4166,7 @@
     params.dicom = NULL;
     params.size = 0;
 
-    return context->InvokeService(context, _OrthancPluginService_MarkWorklistAnswersIncomplete, &params);
+    return context->InvokeService(context, _OrthancPluginService_WorklistMarkIncomplete, &params);
   }
 
 
@@ -4185,8 +4185,7 @@
    * This function checks whether one worklist (encoded as a DICOM
    * file) matches the C-Find SCP query against modality
    * worklists. This function must be called before adding the
-   * worklist as an answer through
-   * OrthancPluginWorklistAddWorklistAnswer().
+   * worklist as an answer through OrthancPluginWorklistAddAnswer().
    *
    * @param context The Orthanc plugin context, as received by OrthancPluginInitialize().
    * @param query The worklist query, as received by the callback.
@@ -4195,7 +4194,7 @@
    * @return 1 if the worklist matches the query, 0 otherwise.
    * @ingroup Worklists
    **/
-  ORTHANC_PLUGIN_INLINE int32_t  OrthancPluginIsWorklistMatch(
+  ORTHANC_PLUGIN_INLINE int32_t  OrthancPluginWorklistIsMatch(
     OrthancPluginContext*              context,
     const OrthancPluginWorklistQuery*  query,
     const void*                        dicom,
@@ -4210,7 +4209,7 @@
     params.isMatch = &isMatch;
     params.target = NULL;
 
-    if (context->InvokeService(context, _OrthancPluginService_IsWorklistMatch, &params) == OrthancPluginErrorCode_Success)
+    if (context->InvokeService(context, _OrthancPluginService_WorklistIsMatch, &params) == OrthancPluginErrorCode_Success)
     {
       return isMatch;
     }
@@ -4234,7 +4233,7 @@
    * @return 0 if success, other value if error.
    * @ingroup Worklists
    **/
-  ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode  OrthancPluginGetWorklistQueryDicom(
+  ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode  OrthancPluginWorklistGetDicomQuery(
     OrthancPluginContext*              context,
     OrthancPluginMemoryBuffer*         target,
     const OrthancPluginWorklistQuery*  query)
@@ -4246,7 +4245,7 @@
     params.isMatch = NULL;
     params.target = target;
 
-    return context->InvokeService(context, _OrthancPluginService_GetWorklistQueryDicom, &params);
+    return context->InvokeService(context, _OrthancPluginService_WorklistGetDicomQuery, &params);
   }
 
 
--- a/Plugins/Samples/ModalityWorklists/Plugin.cpp	Mon Nov 23 17:02:42 2015 +0100
+++ b/Plugins/Samples/ModalityWorklists/Plugin.cpp	Mon Nov 23 17:09:27 2015 +0100
@@ -61,10 +61,10 @@
     return OrthancPluginErrorCode_Success;
   }
 
-  if (OrthancPluginIsWorklistMatch(context_, query, dicom.c_str(), dicom.size()))
+  if (OrthancPluginWorklistIsMatch(context_, query, dicom.c_str(), dicom.size()))
   {
     // This DICOM file matches the worklist query, add it to the answers
-    return OrthancPluginWorklistAddWorklistAnswer
+    return OrthancPluginWorklistAddAnswer
       (context_, answers, query, dicom.c_str(), dicom.size());
   }
   else
@@ -98,7 +98,7 @@
                           const OrthancPluginWorklistQuery* query)
 {
   OrthancPluginMemoryBuffer dicom;
-  if (OrthancPluginGetWorklistQueryDicom(context_, &dicom, query))
+  if (OrthancPluginWorklistGetDicomQuery(context_, &dicom, query))
   {
     return false;
   }