# HG changeset patch # User Sebastien Jodogne # Date 1448294967 -3600 # Node ID 796d0b087fb812ddd329837ce4e762e4da76138b # Parent 5ed8769b17f97b9ab44b49aff01bb7130b04da97 more consistent naming in worklist primitives diff -r 5ed8769b17f9 -r 796d0b087fb8 Plugins/Engine/OrthancPlugins.cpp --- 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(parameters); @@ -1940,7 +1940,7 @@ return true; } - case _OrthancPluginService_MarkWorklistAnswersIncomplete: + case _OrthancPluginService_WorklistMarkIncomplete: { const _OrthancPluginWorklistAnswersOperation& p = *reinterpret_cast(parameters); @@ -1948,7 +1948,7 @@ return true; } - case _OrthancPluginService_IsWorklistMatch: + case _OrthancPluginService_WorklistIsMatch: { const _OrthancPluginWorklistQueryOperation& p = *reinterpret_cast(parameters); @@ -1956,7 +1956,7 @@ return true; } - case _OrthancPluginService_GetWorklistQueryDicom: + case _OrthancPluginService_WorklistGetDicomQuery: { const _OrthancPluginWorklistQueryOperation& p = *reinterpret_cast(parameters); diff -r 5ed8769b17f9 -r 796d0b087fb8 Plugins/Include/orthanc/OrthancCPlugin.h --- 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, ¶ms); + return context->InvokeService(context, _OrthancPluginService_WorklistAddAnswer, ¶ms); } @@ -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, ¶ms); + return context->InvokeService(context, _OrthancPluginService_WorklistMarkIncomplete, ¶ms); } @@ -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, ¶ms) == OrthancPluginErrorCode_Success) + if (context->InvokeService(context, _OrthancPluginService_WorklistIsMatch, ¶ms) == 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, ¶ms); + return context->InvokeService(context, _OrthancPluginService_WorklistGetDicomQuery, ¶ms); } diff -r 5ed8769b17f9 -r 796d0b087fb8 Plugins/Samples/ModalityWorklists/Plugin.cpp --- 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; }