comparison OrthancFramework/Sources/Enumerations.cpp @ 4887:a29a6bdba9dd

mime type for .ico
author Alain Mazy <am@osimis.io>
date Wed, 16 Feb 2022 09:27:25 +0100
parents 43e613a7756b
children 8523078f3f4b
comparison
equal deleted inserted replaced
4886:228ce71e08a3 4887:a29a6bdba9dd
50 static const char* const MIME_WOFF2 = "font/woff2"; 50 static const char* const MIME_WOFF2 = "font/woff2";
51 static const char* const MIME_XML_2 = "text/xml"; 51 static const char* const MIME_XML_2 = "text/xml";
52 static const char* const MIME_ZIP = "application/zip"; 52 static const char* const MIME_ZIP = "application/zip";
53 static const char* const MIME_DICOM_WEB_JSON = "application/dicom+json"; 53 static const char* const MIME_DICOM_WEB_JSON = "application/dicom+json";
54 static const char* const MIME_DICOM_WEB_XML = "application/dicom+xml"; 54 static const char* const MIME_DICOM_WEB_XML = "application/dicom+xml";
55 static const char* const MIME_ICO = "image/x-icon";
55 56
56 // This function is autogenerated by the script 57 // This function is autogenerated by the script
57 // "Resources/GenerateErrorCodes.py" 58 // "Resources/GenerateErrorCodes.py"
58 const char* EnumerationToString(ErrorCode error) 59 const char* EnumerationToString(ErrorCode error)
59 { 60 {
1096 case MimeType_DicomWebJson: 1097 case MimeType_DicomWebJson:
1097 return MIME_DICOM_WEB_JSON; 1098 return MIME_DICOM_WEB_JSON;
1098 1099
1099 case MimeType_DicomWebXml: 1100 case MimeType_DicomWebXml:
1100 return MIME_DICOM_WEB_XML; 1101 return MIME_DICOM_WEB_XML;
1101 1102
1103 case MimeType_Ico:
1104 return MIME_ICO;
1105
1102 default: 1106 default:
1103 throw OrthancException(ErrorCode_ParameterOutOfRange); 1107 throw OrthancException(ErrorCode_ParameterOutOfRange);
1104 } 1108 }
1105 } 1109 }
1106 1110
1803 return true; 1807 return true;
1804 } 1808 }
1805 else if (source == MIME_DICOM_WEB_XML) 1809 else if (source == MIME_DICOM_WEB_XML)
1806 { 1810 {
1807 target = MimeType_DicomWebXml; 1811 target = MimeType_DicomWebXml;
1812 return true;
1813 }
1814 else if (source == MIME_ICO)
1815 {
1816 target = MimeType_Ico;
1808 return true; 1817 return true;
1809 } 1818 }
1810 else 1819 else
1811 { 1820 {
1812 return false; 1821 return false;