comparison OrthancServer/ServerJobs/OrthancPeerStoreJob.h @ 3949:ef696db8426f transcoding

preparing transcoding in OrthancPeerStoreJob
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 19 May 2020 18:44:36 +0200
parents 2a170a8f1faf
children
comparison
equal deleted inserted replaced
3948:3d2fc1b5cc8c 3949:ef696db8426f
46 { 46 {
47 private: 47 private:
48 ServerContext& context_; 48 ServerContext& context_;
49 WebServiceParameters peer_; 49 WebServiceParameters peer_;
50 std::unique_ptr<HttpClient> client_; 50 std::unique_ptr<HttpClient> client_;
51 bool transcode_;
52 DicomTransferSyntax transferSyntax_;
51 53
52 protected: 54 protected:
53 virtual bool HandleInstance(const std::string& instance); 55 virtual bool HandleInstance(const std::string& instance);
54 56
55 virtual bool HandleTrailingStep(); 57 virtual bool HandleTrailingStep();
56 58
57 public: 59 public:
58 OrthancPeerStoreJob(ServerContext& context) : 60 OrthancPeerStoreJob(ServerContext& context) :
59 context_(context) 61 context_(context),
62 transcode_(false)
60 { 63 {
61 } 64 }
62 65
63 OrthancPeerStoreJob(ServerContext& context, 66 OrthancPeerStoreJob(ServerContext& context,
64 const Json::Value& serialize); 67 const Json::Value& serialize);
68 const WebServiceParameters& GetPeer() const 71 const WebServiceParameters& GetPeer() const
69 { 72 {
70 return peer_; 73 return peer_;
71 } 74 }
72 75
76 bool IsTranscode() const
77 {
78 return transcode_;
79 }
80
81 DicomTransferSyntax GetTransferSyntax() const;
82
83 void SetTranscode(DicomTransferSyntax syntax);
84
85 void SetTranscode(const std::string& transferSyntaxUid);
86
87 void ClearTranscode();
88
73 virtual void Stop(JobStopReason reason); // For pausing jobs 89 virtual void Stop(JobStopReason reason); // For pausing jobs
74 90
75 virtual void GetJobType(std::string& target) 91 virtual void GetJobType(std::string& target)
76 { 92 {
77 target = "OrthancPeerStore"; 93 target = "OrthancPeerStore";