Mercurial > hg > orthanc
diff 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 |
line wrap: on
line diff
--- a/Core/DicomNetworking/RemoteModalityParameters.h Tue Oct 09 12:51:20 2018 +0200 +++ b/Core/DicomNetworking/RemoteModalityParameters.h Tue Oct 09 14:19:48 2018 +0200 @@ -44,17 +44,27 @@ class RemoteModalityParameters { private: - std::string aet_; - std::string host_; - uint16_t port_; - ModalityManufacturer manufacturer_; + std::string aet_; + std::string host_; + uint16_t port_; + ModalityManufacturer manufacturer_; + bool allowEcho_; + bool allowStore_; + bool allowFind_; + bool allowMove_; + bool allowGet_; + + void Clear(); void UnserializeArray(const Json::Value& serialized); void UnserializeObject(const Json::Value& serialized); public: - RemoteModalityParameters(); + RemoteModalityParameters() + { + Clear(); + } RemoteModalityParameters(const Json::Value& serialized) { @@ -91,10 +101,7 @@ return port_; } - void SetPortNumber(uint16_t port) - { - port_ = port; - } + void SetPortNumber(uint16_t port); ModalityManufacturer GetManufacturer() const { @@ -111,6 +118,11 @@ manufacturer_ = StringToModalityManufacturer(manufacturer); } + bool IsRequestAllowed(DicomRequestType type) const; + + void SetRequestAllowed(DicomRequestType type, + bool allowed); + void Unserialize(const Json::Value& modality); bool IsAdvancedFormatNeeded() const;