Mercurial > hg > orthanc
comparison OrthancServer/ServerJobs/OrthancPeerStoreJob.cpp @ 2664:a21b244efb37 jobs
serialization of DicomModalityStoreJob, OrthancPeerStoreJob and ResourceModificationJob
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 07 Jun 2018 21:37:40 +0200 |
parents | c691fcf66071 |
children | eaf10085ffa1 |
comparison
equal
deleted
inserted
replaced
2663:228e2783ce83 | 2664:a21b244efb37 |
---|---|
99 | 99 |
100 Json::Value v; | 100 Json::Value v; |
101 peer_.ToJson(v); | 101 peer_.ToJson(v); |
102 value["Peer"] = v; | 102 value["Peer"] = v; |
103 } | 103 } |
104 | |
105 | |
106 static const char* PEER = "Peer"; | |
107 | |
108 OrthancPeerStoreJob::OrthancPeerStoreJob(ServerContext& context, | |
109 const Json::Value& serialized) : | |
110 SetOfInstancesJob(serialized), | |
111 context_(context) | |
112 { | |
113 peer_ = WebServiceParameters(serialized[PEER]); | |
114 } | |
115 | |
116 | |
117 bool OrthancPeerStoreJob::Serialize(Json::Value& target) | |
118 { | |
119 if (!SetOfInstancesJob::Serialize(target)) | |
120 { | |
121 return false; | |
122 } | |
123 else | |
124 { | |
125 peer_.Serialize(target[PEER]); | |
126 return true; | |
127 } | |
128 } | |
104 } | 129 } |