Mercurial > hg > orthanc
comparison OrthancFramework/Sources/Enumerations.cpp @ 5406:aaf7c49a9ddc am-http-compression
tentative to implement smart HTTP compression with detection of transfer syntax
author | Alain Mazy <am@osimis.io> |
---|---|
date | Sat, 04 Nov 2023 13:42:30 +0100 |
parents | 08b5516c6e5e |
children |
comparison
equal
deleted
inserted
replaced
5405:62bb63346185 | 5406:aaf7c49a9ddc |
---|---|
33 #include <cassert> | 33 #include <cassert> |
34 #include <boost/algorithm/string/replace.hpp> | 34 #include <boost/algorithm/string/replace.hpp> |
35 | 35 |
36 namespace Orthanc | 36 namespace Orthanc |
37 { | 37 { |
38 static const char* const MIME_CSS = "text/css"; | |
39 static const char* const MIME_DICOM = "application/dicom"; | |
40 static const char* const MIME_GIF = "image/gif"; | |
41 static const char* const MIME_GZIP = "application/gzip"; | |
42 static const char* const MIME_HTML = "text/html"; | |
43 static const char* const MIME_JAVASCRIPT = "application/javascript"; | |
44 static const char* const MIME_JPEG2000 = "image/jp2"; | |
45 static const char* const MIME_NACL = "application/x-nacl"; | |
46 static const char* const MIME_PLAIN_TEXT = "text/plain"; | |
47 static const char* const MIME_PNACL = "application/x-pnacl"; | |
48 static const char* const MIME_SVG = "image/svg+xml"; | |
49 static const char* const MIME_WEB_ASSEMBLY = "application/wasm"; | |
50 static const char* const MIME_WOFF = "application/x-font-woff"; | |
51 static const char* const MIME_WOFF2 = "font/woff2"; | |
52 static const char* const MIME_XML_2 = "text/xml"; | |
53 static const char* const MIME_ZIP = "application/zip"; | |
54 static const char* const MIME_DICOM_WEB_JSON = "application/dicom+json"; | |
55 static const char* const MIME_DICOM_WEB_XML = "application/dicom+xml"; | |
56 static const char* const MIME_ICO = "image/x-icon"; | |
57 | |
58 // This function is autogenerated by the script | 38 // This function is autogenerated by the script |
59 // "Resources/CodeGeneration/GenerateErrorCodes.py" | 39 // "Resources/CodeGeneration/GenerateErrorCodes.py" |
60 const char* EnumerationToString(ErrorCode error) | 40 const char* EnumerationToString(ErrorCode error) |
61 { | 41 { |
62 switch (error) | 42 switch (error) |
2486 else | 2466 else |
2487 { | 2467 { |
2488 throw OrthancException(ErrorCode_InternalError); | 2468 throw OrthancException(ErrorCode_InternalError); |
2489 } | 2469 } |
2490 } | 2470 } |
2471 | |
2472 bool IsCompressedTransferSyntax(DicomTransferSyntax syntax) | |
2473 { | |
2474 switch (syntax) | |
2475 { | |
2476 case DicomTransferSyntax_LittleEndianImplicit: | |
2477 case DicomTransferSyntax_LittleEndianExplicit: | |
2478 case DicomTransferSyntax_BigEndianExplicit: | |
2479 return false; | |
2480 default: | |
2481 return true; | |
2482 } | |
2483 } | |
2491 } | 2484 } |
2492 | 2485 |
2493 | 2486 |
2494 #include "./Enumerations_TransferSyntaxes.impl.h" | 2487 #include "./Enumerations_TransferSyntaxes.impl.h" |