Public Types | |
enum | Type { kHtml, kXhtml, kCeHtml, kJavascript, kCss, kText, kXml, kPng, kGif, kJpeg, kSwf, kWebp } |
Public Member Functions | |
const char * | mime_type () const |
const char * | file_extension () const |
Type | type () const |
bool | IsHtmlLike () const |
bool | IsXmlLike () const |
bool | IsFlash () const |
Return true iff this content type is Flash. | |
bool | IsImage () const |
Return true iff this content type is Image. | |
Static Public Member Functions | |
static int | MaxProducedExtensionLength () |
Public Attributes | |
const char * | mime_type_ |
const char * | file_extension_ |
includes ".", e.g. ".ext" | |
Type | type_ |
const char* net_instaweb::ContentType::file_extension | ( | ) | const [inline] |
bool net_instaweb::ContentType::IsHtmlLike | ( | ) | const |
Return true iff this content type is HTML, or XHTML, or some other such thing (e.g. CE-HTML) that we can rewrite.
bool net_instaweb::ContentType::IsXmlLike | ( | ) | const |
Return true iff this content type is XML of some kind (either XHTML or some other XML).
static int net_instaweb::ContentType::MaxProducedExtensionLength | ( | ) | [static] |
Returns the maximum extension length of any resource types our filters can create. Does not count the ".". See RewriteDriver::CreateOutputResourceWithPath()
const char* net_instaweb::ContentType::mime_type_ |
These fields should be private; we leave them public only so we can use struct literals in content_type.cc. Other code should use the above accessor methods instead of accessing these fields directly.