Mercurial > hg > orthanc
comparison Core/Enumerations.cpp @ 1772:53e045b5a8ec
MIME content type can be associated to custom attachments (cf. "UserContentType")
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 12 Nov 2015 14:36:27 +0100 |
parents | d143db00a794 |
children | 613df4362575 |
comparison
equal
deleted
inserted
replaced
1771:8790488ae98b | 1772:53e045b5a8ec |
---|---|
978 // The encoding was properly detected | 978 // The encoding was properly detected |
979 return true; | 979 return true; |
980 } | 980 } |
981 | 981 |
982 | 982 |
983 const char* GetMimeType(FileContentType type) | |
984 { | |
985 switch (type) | |
986 { | |
987 case FileContentType_Dicom: | |
988 return "application/dicom"; | |
989 | |
990 case FileContentType_DicomAsJson: | |
991 return "application/json"; | |
992 | |
993 default: | |
994 return "application/octet-stream"; | |
995 } | |
996 } | |
997 | |
998 | |
999 const char* GetFileExtension(FileContentType type) | |
1000 { | |
1001 switch (type) | |
1002 { | |
1003 case FileContentType_Dicom: | |
1004 return ".dcm"; | |
1005 | |
1006 case FileContentType_DicomAsJson: | |
1007 return ".json"; | |
1008 | |
1009 default: | |
1010 // Unknown file type | |
1011 return ""; | |
1012 } | |
1013 } | |
1014 | |
1015 | |
1016 ResourceType GetChildResourceType(ResourceType type) | 983 ResourceType GetChildResourceType(ResourceType type) |
1017 { | 984 { |
1018 switch (type) | 985 switch (type) |
1019 { | 986 { |
1020 case ResourceType_Patient: | 987 case ResourceType_Patient: |