Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
net_instaweb::UrlSegmentEncoder Class Reference

#include "url_segment_encoder.h"

Inheritance diagram for net_instaweb::UrlSegmentEncoder:
net_instaweb::CssUrlEncoder net_instaweb::ImageUrlEncoder net_instaweb::UrlMultipartEncoder

Public Member Functions

virtual void Encode (const StringVector &urls, const ResourceContext *data, GoogleString *url_segment) const
 
virtual bool Decode (const StringPiece &url_segment, StringVector *urls, ResourceContext *out_data, MessageHandler *handler) const
 

Detailed Description

Base class that describes encoding of url segments by rewriters. Most instances of this will want to delegate to UrlEscaper.

Member Function Documentation

virtual bool net_instaweb::UrlSegmentEncoder::Decode ( const StringPiece &  url_segment,
StringVector *  urls,
ResourceContext *  out_data,
MessageHandler handler 
) const
virtual

Decode URLs from "url_segment". Note that there may be other meta-data encoded in url_segment, which this function will write into out_data, if present.

Reimplemented in net_instaweb::ImageUrlEncoder, net_instaweb::CssUrlEncoder, and net_instaweb::UrlMultipartEncoder.

virtual void net_instaweb::UrlSegmentEncoder::Encode ( const StringVector &  urls,
const ResourceContext *  data,
GoogleString url_segment 
) const
virtual

Encodes arbitrary text so it can be used in a url segment. A url segment must contain only characters that are legal in URLs, and exclude "/" and "." which are used for a higher level encoding scheme into which this must fit.

'data' is optional – it can be NULL and it is up to the encoder to decide what to do.

Reimplemented in net_instaweb::ImageUrlEncoder, net_instaweb::CssUrlEncoder, and net_instaweb::UrlMultipartEncoder.


The documentation for this class was generated from the following file: