Mercurial > hg > orthanc
comparison Core/Enumerations.cpp @ 3799:320a2d224902
merge
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Wed, 01 Apr 2020 10:15:33 +0200 |
parents | f29843323daf |
children | 9fe1d64a748c |
comparison
equal
deleted
inserted
replaced
3798:c38b82bb6fd3 | 3799:320a2d224902 |
---|---|
364 return "No request handler factory for DICOM C-Find Modality SCP"; | 364 return "No request handler factory for DICOM C-Find Modality SCP"; |
365 | 365 |
366 case ErrorCode_AlreadyExistingTag: | 366 case ErrorCode_AlreadyExistingTag: |
367 return "Cannot override the value of a tag that already exists"; | 367 return "Cannot override the value of a tag that already exists"; |
368 | 368 |
369 case ErrorCode_NoStorageCommitmentHandler: | |
370 return "No request handler factory for DICOM N-ACTION SCP (storage commitment)"; | |
371 | |
369 case ErrorCode_UnsupportedMediaType: | 372 case ErrorCode_UnsupportedMediaType: |
370 return "Unsupported media type"; | 373 return "Unsupported media type"; |
371 | 374 |
372 default: | 375 default: |
373 if (error >= ErrorCode_START_PLUGINS) | 376 if (error >= ErrorCode_START_PLUGINS) |
856 return "Move"; | 859 return "Move"; |
857 break; | 860 break; |
858 | 861 |
859 case DicomRequestType_Store: | 862 case DicomRequestType_Store: |
860 return "Store"; | 863 return "Store"; |
864 break; | |
865 | |
866 case DicomRequestType_NAction: | |
867 return "N-ACTION"; | |
868 break; | |
869 | |
870 case DicomRequestType_NEventReport: | |
871 return "N-EVENT-REPORT"; | |
861 break; | 872 break; |
862 | 873 |
863 default: | 874 default: |
864 throw OrthancException(ErrorCode_ParameterOutOfRange); | 875 throw OrthancException(ErrorCode_ParameterOutOfRange); |
865 } | 876 } |
1155 throw OrthancException(ErrorCode_ParameterOutOfRange); | 1166 throw OrthancException(ErrorCode_ParameterOutOfRange); |
1156 } | 1167 } |
1157 } | 1168 } |
1158 | 1169 |
1159 | 1170 |
1171 const char* EnumerationToString(StorageCommitmentFailureReason reason) | |
1172 { | |
1173 switch (reason) | |
1174 { | |
1175 case StorageCommitmentFailureReason_Success: | |
1176 return "Success"; | |
1177 | |
1178 case StorageCommitmentFailureReason_ProcessingFailure: | |
1179 return "A general failure in processing the operation was encountered"; | |
1180 | |
1181 case StorageCommitmentFailureReason_NoSuchObjectInstance: | |
1182 return "One or more of the elements in the Referenced SOP " | |
1183 "Instance Sequence was not available"; | |
1184 | |
1185 case StorageCommitmentFailureReason_ResourceLimitation: | |
1186 return "The SCP does not currently have enough resources to " | |
1187 "store the requested SOP Instance(s)"; | |
1188 | |
1189 case StorageCommitmentFailureReason_ReferencedSOPClassNotSupported: | |
1190 return "Storage Commitment has been requested for a SOP Instance " | |
1191 "with a SOP Class that is not supported by the SCP"; | |
1192 | |
1193 case StorageCommitmentFailureReason_ClassInstanceConflict: | |
1194 return "The SOP Class of an element in the Referenced SOP Instance Sequence " | |
1195 "did not correspond to the SOP class registered for this SOP Instance at the SCP"; | |
1196 | |
1197 case StorageCommitmentFailureReason_DuplicateTransactionUID: | |
1198 return "The Transaction UID of the Storage Commitment Request is already in use"; | |
1199 | |
1200 default: | |
1201 return "Unknown failure reason"; | |
1202 } | |
1203 } | |
1204 | |
1205 | |
1160 Encoding StringToEncoding(const char* encoding) | 1206 Encoding StringToEncoding(const char* encoding) |
1161 { | 1207 { |
1162 std::string s(encoding); | 1208 std::string s(encoding); |
1163 Toolbox::ToUpperCase(s); | 1209 Toolbox::ToUpperCase(s); |
1164 | 1210 |