Mercurial > hg > orthanc
comparison Core/DicomNetworking/RemoteModalityParameters.h @ 2872:9d08edde614b
Possibility to restrict the allowed DICOM commands for each modality
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 09 Oct 2018 14:19:48 +0200 |
parents | 6eebc2eb3168 |
children | 4e43e67f8ecf |
comparison
equal
deleted
inserted
replaced
2871:6eebc2eb3168 | 2872:9d08edde614b |
---|---|
42 namespace Orthanc | 42 namespace Orthanc |
43 { | 43 { |
44 class RemoteModalityParameters | 44 class RemoteModalityParameters |
45 { | 45 { |
46 private: | 46 private: |
47 std::string aet_; | 47 std::string aet_; |
48 std::string host_; | 48 std::string host_; |
49 uint16_t port_; | 49 uint16_t port_; |
50 ModalityManufacturer manufacturer_; | 50 ModalityManufacturer manufacturer_; |
51 bool allowEcho_; | |
52 bool allowStore_; | |
53 bool allowFind_; | |
54 bool allowMove_; | |
55 bool allowGet_; | |
56 | |
57 void Clear(); | |
51 | 58 |
52 void UnserializeArray(const Json::Value& serialized); | 59 void UnserializeArray(const Json::Value& serialized); |
53 | 60 |
54 void UnserializeObject(const Json::Value& serialized); | 61 void UnserializeObject(const Json::Value& serialized); |
55 | 62 |
56 public: | 63 public: |
57 RemoteModalityParameters(); | 64 RemoteModalityParameters() |
65 { | |
66 Clear(); | |
67 } | |
58 | 68 |
59 RemoteModalityParameters(const Json::Value& serialized) | 69 RemoteModalityParameters(const Json::Value& serialized) |
60 { | 70 { |
61 Unserialize(serialized); | 71 Unserialize(serialized); |
62 } | 72 } |
89 uint16_t GetPortNumber() const | 99 uint16_t GetPortNumber() const |
90 { | 100 { |
91 return port_; | 101 return port_; |
92 } | 102 } |
93 | 103 |
94 void SetPortNumber(uint16_t port) | 104 void SetPortNumber(uint16_t port); |
95 { | |
96 port_ = port; | |
97 } | |
98 | 105 |
99 ModalityManufacturer GetManufacturer() const | 106 ModalityManufacturer GetManufacturer() const |
100 { | 107 { |
101 return manufacturer_; | 108 return manufacturer_; |
102 } | 109 } |
109 void SetManufacturer(const std::string& manufacturer) | 116 void SetManufacturer(const std::string& manufacturer) |
110 { | 117 { |
111 manufacturer_ = StringToModalityManufacturer(manufacturer); | 118 manufacturer_ = StringToModalityManufacturer(manufacturer); |
112 } | 119 } |
113 | 120 |
121 bool IsRequestAllowed(DicomRequestType type) const; | |
122 | |
123 void SetRequestAllowed(DicomRequestType type, | |
124 bool allowed); | |
125 | |
114 void Unserialize(const Json::Value& modality); | 126 void Unserialize(const Json::Value& modality); |
115 | 127 |
116 bool IsAdvancedFormatNeeded() const; | 128 bool IsAdvancedFormatNeeded() const; |
117 | 129 |
118 void Serialize(Json::Value& target, | 130 void Serialize(Json::Value& target, |