|
lintel 0.2.0
|
#include <ContentType.h>
Classes | |
| struct | Mapping |
Public Types | |
| enum | Value { UNDEFINED , TextCss , TextCsv , TextPlain , TextVtt , TextHtml , ImageApng , ImageAvif , ImageBmp , ImageGif , ImagePng , ImageSvgXml , ImageWebp , ImageXIcon , ImageTiff , ImageJpeg , VideoMp4 , VideoMpeg , VideoWebm , AudioMp3 , AudioMpeg , AudioWebm , AudioWave , FontOtf , FontTtf , FontWoff , FontWoff2 , ApplicationX7vCompressed , ApplicationAtomXml , ApplicationPdf , ApplicationJavascript , ApplicationJson , ApplicationRssXml , ApplicationXTar , ApplicationXhtmlXml , ApplicationXsltXml , ApplicationXml , ApplicationGzip , ApplicationZip , ApplicationWasm } |
Public Member Functions | |
| constexpr | ContentType (Value value) |
| ContentType (const std::string &contentType) | |
| constexpr | operator Value () const |
| operator bool ()=delete | |
| constexpr Value | getValue () const |
| std::string | getName () const |
Static Public Attributes | |
| static constexpr std::array< Mapping, 39 > | kNameToValue |
| static constexpr std::array< Mapping, 39 > | kValueToName |
Represents an HTTP Content-Type with string-to-enum mapping
| value | the content type enum value |
|
explicit |
| contentType | string representation (e.g. "application/json") |
| std::string lintel::ContentType::getName | ( | ) | const |
|
explicitdelete |
Sorted by name for binary search in build()
Sorted by value for lookup in getName()