Mercurial > hg > orthanc-transfers
annotate Framework/TransferQuery.h @ 77:1e396fb509ca default
updated copyright, as Orthanc Team now replaces Osimis
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 30 May 2024 22:44:10 +0200 |
parents | f4e828607f02 |
children |
rev | line source |
---|---|
0 | 1 /** |
2 * Transfers accelerator plugin for Orthanc | |
77
1e396fb509ca
updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
44
diff
changeset
|
3 * Copyright (C) 2018-2023 Osimis S.A., Belgium |
1e396fb509ca
updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
44
diff
changeset
|
4 * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium |
1e396fb509ca
updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
44
diff
changeset
|
5 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
0 | 6 * |
7 * This program is free software: you can redistribute it and/or | |
8 * modify it under the terms of the GNU Affero General Public License | |
9 * as published by the Free Software Foundation, either version 3 of | |
10 * the License, or (at your option) any later version. | |
11 * | |
12 * This program is distributed in the hope that it will be useful, but | |
13 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 * Affero General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU Affero General Public License | |
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
19 **/ | |
20 | |
21 | |
22 #pragma once | |
23 | |
24 #include "TransferToolbox.h" | |
25 | |
26 #include <json/value.h> | |
27 | |
28 namespace OrthancPlugins | |
29 { | |
30 class TransferQuery | |
31 { | |
32 private: | |
33 std::string peer_; | |
34 Json::Value resources_; | |
35 BucketCompression compression_; | |
36 bool hasOriginator_; | |
37 std::string originator_; | |
38 int priority_; | |
44
f4e828607f02
Added 'SenderTransferID' option that is added as an HTTP header in outgoing requests in PushMode
Alain Mazy <am@osimis.io>
parents:
33
diff
changeset
|
39 std::string senderTransferId_; |
0 | 40 |
41 public: | |
12 | 42 explicit TransferQuery(const Json::Value& body); |
0 | 43 |
44 const std::string& GetPeer() const | |
45 { | |
46 return peer_; | |
47 } | |
48 | |
49 BucketCompression GetCompression() const | |
50 { | |
51 return compression_; | |
52 } | |
53 | |
54 const Json::Value& GetResources() const | |
55 { | |
56 return resources_; | |
57 } | |
58 | |
59 bool HasOriginator() const | |
60 { | |
61 return hasOriginator_; | |
62 } | |
63 | |
64 const std::string& GetOriginator() const; | |
65 | |
66 int GetPriority() const | |
67 { | |
68 return priority_; | |
69 } | |
70 | |
44
f4e828607f02
Added 'SenderTransferID' option that is added as an HTTP header in outgoing requests in PushMode
Alain Mazy <am@osimis.io>
parents:
33
diff
changeset
|
71 const std::string& GetSenderTransferID() const; |
f4e828607f02
Added 'SenderTransferID' option that is added as an HTTP header in outgoing requests in PushMode
Alain Mazy <am@osimis.io>
parents:
33
diff
changeset
|
72 |
f4e828607f02
Added 'SenderTransferID' option that is added as an HTTP header in outgoing requests in PushMode
Alain Mazy <am@osimis.io>
parents:
33
diff
changeset
|
73 void GetHttpHeaders(std::map<std::string, std::string>& headers) const; |
f4e828607f02
Added 'SenderTransferID' option that is added as an HTTP header in outgoing requests in PushMode
Alain Mazy <am@osimis.io>
parents:
33
diff
changeset
|
74 |
0 | 75 void Serialize(Json::Value& target) const; |
76 }; | |
77 } |