Mercurial > hg > orthanc-transfers
comparison Framework/PushMode/BucketPushQuery.h @ 44:f4e828607f02
Added 'SenderTransferID' option that is added as an HTTP header in outgoing requests in PushMode
author | Alain Mazy <am@osimis.io> |
---|---|
date | Wed, 19 Oct 2022 21:12:57 +0200 |
parents | 44a0430d7899 |
children | 1e396fb509ca |
comparison
equal
deleted
inserted
replaced
43:c3fefbb11321 | 44:f4e828607f02 |
---|---|
30 OrthancInstancesCache& cache_; | 30 OrthancInstancesCache& cache_; |
31 TransferBucket bucket_; | 31 TransferBucket bucket_; |
32 std::string peer_; | 32 std::string peer_; |
33 std::string uri_; | 33 std::string uri_; |
34 BucketCompression compression_; | 34 BucketCompression compression_; |
35 std::map<std::string, std::string> headers_; | |
35 | 36 |
36 public: | 37 public: |
37 BucketPushQuery(OrthancInstancesCache& cache, | 38 BucketPushQuery(OrthancInstancesCache& cache, |
38 const TransferBucket& bucket, | 39 const TransferBucket& bucket, |
39 const std::string& peer, | 40 const std::string& peer, |
40 const std::string& transactionUri, | 41 const std::string& transactionUri, |
41 size_t bucketIndex, | 42 size_t bucketIndex, |
42 BucketCompression compression); | 43 BucketCompression compression, |
44 const std::map<std::string, std::string>& headers); | |
43 | 45 |
44 virtual Orthanc::HttpMethod GetMethod() const | 46 virtual Orthanc::HttpMethod GetMethod() const |
45 { | 47 { |
46 return Orthanc::HttpMethod_Put; | 48 return Orthanc::HttpMethod_Put; |
47 } | 49 } |
58 | 60 |
59 virtual void ReadBody(std::string& body) const; | 61 virtual void ReadBody(std::string& body) const; |
60 | 62 |
61 virtual void HandleAnswer(const void* answer, | 63 virtual void HandleAnswer(const void* answer, |
62 size_t size); | 64 size_t size); |
65 | |
66 virtual void GetHttpHeaders(std::map<std::string, std::string>& headers) const | |
67 { | |
68 headers = headers_; | |
69 } | |
63 }; | 70 }; |
64 } | 71 } |