Mercurial > hg > orthanc
comparison Core/Enumerations.h @ 2908:9d277f8ad698
new enumeration: MimeType
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 30 Oct 2018 16:16:07 +0100 |
parents | ae20fccdd867 |
children | 22524fd06225 |
comparison
equal
deleted
inserted
replaced
2907:0204af4ece6a | 2908:9d277f8ad698 |
---|---|
52 static const char* const MIME_BINARY = "application/octet-stream"; | 52 static const char* const MIME_BINARY = "application/octet-stream"; |
53 static const char* const MIME_DICOM = "application/dicom"; | 53 static const char* const MIME_DICOM = "application/dicom"; |
54 static const char* const MIME_JPEG = "image/jpeg"; | 54 static const char* const MIME_JPEG = "image/jpeg"; |
55 static const char* const MIME_JPEG2000 = "image/jp2"; | 55 static const char* const MIME_JPEG2000 = "image/jp2"; |
56 static const char* const MIME_JSON = "application/json"; | 56 static const char* const MIME_JSON = "application/json"; |
57 static const char* const MIME_JSON_UTF8 = "application/json; charset=utf-8"; | |
58 static const char* const MIME_XML_UTF8 = "application/xml; charset=utf-8"; | |
57 static const char* const MIME_PDF = "application/pdf"; | 59 static const char* const MIME_PDF = "application/pdf"; |
58 static const char* const MIME_PNG = "image/png"; | 60 static const char* const MIME_PNG = "image/png"; |
59 static const char* const MIME_XML = "application/xml"; | 61 static const char* const MIME_XML = "application/xml"; |
62 static const char* const MIME_XML_2 = "text/xml"; | |
63 static const char* const MIME_HTML = "text/html"; | |
60 static const char* const MIME_PLAIN_TEXT = "text/plain"; | 64 static const char* const MIME_PLAIN_TEXT = "text/plain"; |
65 static const char* const MIME_GZIP = "application/gzip"; | |
66 static const char* const MIME_JAVASCRIPT = "application/javascript"; | |
67 static const char* const MIME_CSS = "text/css"; | |
68 static const char* const MIME_GIF = "image/gif"; | |
69 static const char* const MIME_WEB_ASSEMBLY = "application/wasm"; | |
61 | 70 |
62 /** | 71 /** |
63 * "No Internet Media Type (aka MIME type, content type) for PBM has | 72 * "No Internet Media Type (aka MIME type, content type) for PBM has |
64 * been registered with IANA, but the unofficial value | 73 * been registered with IANA, but the unofficial value |
65 * image/x-portable-arbitrarymap is assigned by this specification, | 74 * image/x-portable-arbitrarymap is assigned by this specification, |
66 * to be consistent with conventional values for the older Netpbm | 75 * to be consistent with conventional values for the older Netpbm |
67 * formats." http://netpbm.sourceforge.net/doc/pam.html | 76 * formats." http://netpbm.sourceforge.net/doc/pam.html |
68 **/ | 77 **/ |
69 static const char* const MIME_PAM = "image/x-portable-arbitrarymap"; | 78 static const char* const MIME_PAM = "image/x-portable-arbitrarymap"; |
79 | |
80 | |
81 enum MimeType | |
82 { | |
83 MimeType_Binary, | |
84 MimeType_Dicom, | |
85 MimeType_Html, | |
86 MimeType_Jpeg, | |
87 MimeType_Jpeg2000, | |
88 MimeType_Json, | |
89 MimeType_Pam, | |
90 MimeType_Pdf, | |
91 MimeType_PlainText, | |
92 MimeType_Png, | |
93 MimeType_Xml, | |
94 MimeType_Gzip, | |
95 MimeType_JavaScript, | |
96 MimeType_Css, | |
97 MimeType_WebAssembly, | |
98 MimeType_Gif | |
99 }; | |
70 | 100 |
71 | 101 |
72 enum Endianness | 102 enum Endianness |
73 { | 103 { |
74 Endianness_Unknown, | 104 Endianness_Unknown, |
682 | 712 |
683 const char* EnumerationToString(ValueRepresentation vr); | 713 const char* EnumerationToString(ValueRepresentation vr); |
684 | 714 |
685 const char* EnumerationToString(JobState state); | 715 const char* EnumerationToString(JobState state); |
686 | 716 |
717 const char* EnumerationToString(MimeType mime); | |
718 | |
687 Encoding StringToEncoding(const char* encoding); | 719 Encoding StringToEncoding(const char* encoding); |
688 | 720 |
689 ResourceType StringToResourceType(const char* type); | 721 ResourceType StringToResourceType(const char* type); |
690 | 722 |
691 ImageFormat StringToImageFormat(const char* format); | 723 ImageFormat StringToImageFormat(const char* format); |
702 DicomVersion StringToDicomVersion(const std::string& version); | 734 DicomVersion StringToDicomVersion(const std::string& version); |
703 | 735 |
704 JobState StringToJobState(const std::string& state); | 736 JobState StringToJobState(const std::string& state); |
705 | 737 |
706 RequestOrigin StringToRequestOrigin(const std::string& origin); | 738 RequestOrigin StringToRequestOrigin(const std::string& origin); |
739 | |
740 MimeType StringToMimeType(const std::string& mime); | |
707 | 741 |
708 unsigned int GetBytesPerPixel(PixelFormat format); | 742 unsigned int GetBytesPerPixel(PixelFormat format); |
709 | 743 |
710 bool GetDicomEncoding(Encoding& encoding, | 744 bool GetDicomEncoding(Encoding& encoding, |
711 const char* specificCharacterSet); | 745 const char* specificCharacterSet); |