comparison Plugins/Engine/PluginsJob.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
comparison
equal deleted inserted replaced
2813:6d5b20af216f 2814:7d1d3136f6cf
41 namespace Orthanc 41 namespace Orthanc
42 { 42 {
43 class PluginsJob : public IJob 43 class PluginsJob : public IJob
44 { 44 {
45 private: 45 private:
46 void *job_; 46 _OrthancPluginSubmitJob parameters_;
47 std::string type_; 47 std::string type_;
48 Json::Value publicContent_;
49 bool hasSerialized_;
50 Json::Value serialized_;
51 OrthancPluginJobFree free_;
52 OrthancPluginJobGetProgress getProgress_;
53 OrthancPluginJobStep step_;
54 OrthancPluginJobStop stop_;
55 OrthancPluginJobReset reset_;
56 48
57 public: 49 public:
58 PluginsJob(const _OrthancPluginSubmitJob& parameters); 50 PluginsJob(const _OrthancPluginSubmitJob& parameters);
59 51
60 virtual ~PluginsJob(); 52 virtual ~PluginsJob();
74 virtual void GetJobType(std::string& target) 66 virtual void GetJobType(std::string& target)
75 { 67 {
76 target = type_; 68 target = type_;
77 } 69 }
78 70
79 virtual void GetPublicContent(Json::Value& value) 71 virtual void GetPublicContent(Json::Value& value);
80 {
81 value = publicContent_;
82 }
83 72
84 virtual bool Serialize(Json::Value& value); 73 virtual bool Serialize(Json::Value& value);
85 }; 74 };
86 } 75 }
87 76