Mercurial > hg > orthanc
diff Core/DicomNetworking/RemoteModalityParameters.cpp @ 3602:085283445db0 storage-commitment
AllowNAction in remote modality parameters
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 16 Jan 2020 15:28:32 +0100 |
parents | 4e43e67f8ecf |
children | c1e2b91c2ab4 |
line wrap: on
line diff
--- a/Core/DicomNetworking/RemoteModalityParameters.cpp Thu Jan 16 12:50:06 2020 +0100 +++ b/Core/DicomNetworking/RemoteModalityParameters.cpp Thu Jan 16 15:28:32 2020 +0100 @@ -48,6 +48,7 @@ static const char* KEY_ALLOW_GET = "AllowGet"; static const char* KEY_ALLOW_MOVE = "AllowMove"; static const char* KEY_ALLOW_STORE = "AllowStore"; +static const char* KEY_ALLOW_N_ACTION = "AllowNAction"; static const char* KEY_HOST = "Host"; static const char* KEY_MANUFACTURER = "Manufacturer"; static const char* KEY_PORT = "Port"; @@ -66,6 +67,7 @@ allowFind_ = true; allowMove_ = true; allowGet_ = true; + allowNAction_ = true; // For storage commitment } @@ -211,6 +213,11 @@ { allowMove_ = SerializationToolbox::ReadBoolean(serialized, KEY_ALLOW_MOVE); } + + if (serialized.isMember(KEY_ALLOW_N_ACTION)) + { + allowNAction_ = SerializationToolbox::ReadBoolean(serialized, KEY_ALLOW_N_ACTION); + } } @@ -233,6 +240,9 @@ case DicomRequestType_Store: return allowStore_; + case DicomRequestType_NAction: + return allowNAction_; + default: throw OrthancException(ErrorCode_ParameterOutOfRange); } @@ -264,6 +274,10 @@ allowStore_ = allowed; break; + case DicomRequestType_NAction: + allowNAction_ = allowed; + break; + default: throw OrthancException(ErrorCode_ParameterOutOfRange); } @@ -276,7 +290,8 @@ !allowStore_ || !allowFind_ || !allowGet_ || - !allowMove_); + !allowMove_ || + !allowNAction_); } @@ -296,6 +311,7 @@ target[KEY_ALLOW_FIND] = allowFind_; target[KEY_ALLOW_GET] = allowGet_; target[KEY_ALLOW_MOVE] = allowMove_; + target[KEY_ALLOW_N_ACTION] = allowNAction_; } else {