Page Speed Optimization Libraries  1.2.24.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes
net_instaweb::ContentType Struct Reference

List of all members.

Public Types

enum  Type {
  kHtml, kXhtml, kCeHtml, kJavascript,
  kCss, kText, kXml, kPng,
  kGif, kJpeg, kSwf, kWebp,
  kJson, kPdf, kVideo, kOther
}
 The MIME types we process. More...

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.
bool IsVideo () const
 Return true iff this content type is Video.

Static Public Member Functions

static int MaxProducedExtensionLength ()

Public Attributes

const char * mime_type_
const char * file_extension_
 includes ".", e.g. ".ext"
Type type_

Member Enumeration Documentation

The MIME types we process.

Enumerator:
kCeHtml 

See http://en.wikipedia.org/wiki/CE-HTML.

kOther 

Used to specify a new local ContentType in one test file.


Member Function Documentation

const char* net_instaweb::ContentType::file_extension ( ) const [inline]
Todo:
TODO(sligocki): Stop returning '.' in file_extension().

Return true iff this content type is HTML, or XHTML, or some other such thing (e.g. CE-HTML) that we can rewrite.

Return true iff this content type is XML of some kind (either XHTML or some other XML).

Returns the maximum extension length of any resource types our filters can create. Does not count the ".". See RewriteDriver::CreateOutputResourceWithPath()


Member Data Documentation

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.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines