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
}

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_

Member Enumeration Documentation

Enumerator:
kCeHtml 

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


Member Function Documentation

const char* net_instaweb::ContentType::file_extension (  )  const [inline]
Todo:
TODO(sligocki): Stop returning '.' in file_extension().
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()


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
Generated on Tue May 29 16:33:52 2012 for Page Speed Optimization Libraries by  doxygen 1.6.3