Mercurial > hg > orthanc
diff Plugins/Include/orthanc/OrthancCPlugin.h @ 2814:7d1d3136f6cf
more generic handling of content and serialization in plugin jobs
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 07 Sep 2018 10:09:17 +0200 |
parents | ea7aea6f6a95 |
children | 925d8dc03a23 |
line wrap: on
line diff
--- a/Plugins/Include/orthanc/OrthancCPlugin.h Thu Sep 06 18:24:44 2018 +0200 +++ b/Plugins/Include/orthanc/OrthancCPlugin.h Fri Sep 07 10:09:17 2018 +0200 @@ -1274,6 +1274,8 @@ typedef void (*OrthancPluginJobFree) (void* job); typedef float (*OrthancPluginJobGetProgress) (void* job); + typedef const char* (*OrthancPluginJobGetContent) (void* job); + typedef const char* (*OrthancPluginJobGetSerialized) (void* job); typedef OrthancPluginJobStepStatus (*OrthancPluginJobStep) (void* job); typedef OrthancPluginErrorCode (*OrthancPluginJobStop) (void* job, OrthancPluginJobStopReason reason); @@ -6041,48 +6043,48 @@ typedef struct { - char** resultId_; - void *job_; - int priority_; - const char *type_; - const char *content_; - const char *serialized_; - OrthancPluginJobFree free_; - OrthancPluginJobGetProgress getProgress_; - OrthancPluginJobStep step_; - OrthancPluginJobStop stop_; - OrthancPluginJobReset reset_; + char** resultId; + void *job; + OrthancPluginJobFree freeJob; + int priority; + const char *type; + OrthancPluginJobGetProgress getProgress; + OrthancPluginJobGetContent getContent; + OrthancPluginJobGetSerialized getSerialized; + OrthancPluginJobStep step; + OrthancPluginJobStop stop; + OrthancPluginJobReset reset; } _OrthancPluginSubmitJob; ORTHANC_PLUGIN_INLINE char *OrthancPluginSubmitJob( - OrthancPluginContext *context, - void *job, - int priority, - const char *type, - const char *content, - const char *serialized, - OrthancPluginJobFree freeJob, - OrthancPluginJobGetProgress getProgress, - OrthancPluginJobStep step, - OrthancPluginJobStop stop, - OrthancPluginJobReset reset) + OrthancPluginContext *context, + void *job, + OrthancPluginJobFree freeJob, + int priority, + const char *type, + OrthancPluginJobGetProgress getProgress, + OrthancPluginJobGetContent getContent, + OrthancPluginJobGetSerialized getSerialized, + OrthancPluginJobStep step, + OrthancPluginJobStop stop, + OrthancPluginJobReset reset) { char* resultId = NULL; _OrthancPluginSubmitJob params; memset(¶ms, 0, sizeof(params)); - params.resultId_ = &resultId; - params.job_ = job; - params.priority_ = priority; - params.free_ = freeJob; - params.type_ = type; - params.content_ = content; - params.serialized_ = serialized; - params.getProgress_ = getProgress; - params.step_ = step; - params.stop_ = stop; - params.reset_ = reset; + params.resultId = &resultId; + params.job = job; + params.freeJob = freeJob; + params.priority = priority; + params.type = type; + params.getProgress = getProgress; + params.getContent = getContent; + params.getSerialized = getSerialized; + params.step = step; + params.stop = stop; + params.reset = reset; if (context->InvokeService(context, _OrthancPluginService_SubmitJob, ¶ms) != OrthancPluginErrorCode_Success || resultId == NULL)