Mercurial > hg > orthanc
diff 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 |
line wrap: on
line diff
--- a/OrthancServer/ServerJobs/OrthancPeerStoreJob.cpp Thu Jun 07 18:18:02 2018 +0200 +++ b/OrthancServer/ServerJobs/OrthancPeerStoreJob.cpp Thu Jun 07 21:37:40 2018 +0200 @@ -101,4 +101,29 @@ peer_.ToJson(v); value["Peer"] = v; } + + + static const char* PEER = "Peer"; + + OrthancPeerStoreJob::OrthancPeerStoreJob(ServerContext& context, + const Json::Value& serialized) : + SetOfInstancesJob(serialized), + context_(context) + { + peer_ = WebServiceParameters(serialized[PEER]); + } + + + bool OrthancPeerStoreJob::Serialize(Json::Value& target) + { + if (!SetOfInstancesJob::Serialize(target)) + { + return false; + } + else + { + peer_.Serialize(target[PEER]); + return true; + } + } }