Google APIs Client Library for C++
Base64Codec Class Reference

Provdes a codec for encoding and decoding reader streams using Base64. More...

#include "client/data/base64_codec.h"

+ Inheritance diagram for Base64Codec:

List of all members.

Public Member Functions

 Base64Codec (int chunk_size, bool websafe)
 Standard constructor.
virtual ~Base64Codec ()
 Standard destructor.
virtual DataReaderNewManagedEncodingReader (DataReader *reader, Closure *deleter, util::Status *status)
 Returns a reader that will encode another reader using this codec.
virtual DataReaderNewManagedDecodingReader (DataReader *reader, Closure *deleter, util::Status *status)
 Returns a reader that will decode another reader using this codec.

Detailed Description

Provdes a codec for encoding and decoding reader streams using Base64.

Base64 is specified in http://tools.ietf.org/html/rfc4648

See also:
Base64CodecFactory

Constructor & Destructor Documentation

Base64Codec ( int  chunk_size,
bool  websafe 
)

Standard constructor.

param[in] chunk_size The desired chunk size to use when encoding / decoding streams might be adjusted slightly internally for comaptability with base-64. param[in] websafe If true then use the websafe base64 encoding.

virtual ~Base64Codec ( ) [virtual]

Standard destructor.


Member Function Documentation

virtual DataReader* NewManagedDecodingReader ( DataReader reader,
Closure *  deleter,
util::Status status 
) [virtual]

Returns a reader that will decode another reader using this codec.

Parameters:
[in]readerThe caller maintain ownership.
[in]deleterThe managed deleter may be used to delete the reader. NULL indicates an unmanaged reader.
[out]statusWill indicate ok or reason for failure.
Returns:
The reader will be an InvalidDataReader on failure, not NULL.

Implements Codec.

virtual DataReader* NewManagedEncodingReader ( DataReader reader,
Closure *  deleter,
util::Status status 
) [virtual]

Returns a reader that will encode another reader using this codec.

Parameters:
[in]readerThe caller maintain ownership.
[in]deleterThe managed deleter may be used to delete the reader. NULL indicates an unmanaged reader.
[out]statusWill indicate ok or reason for failure.
Returns:
The reader will be an InvalidDataReader on failure, not NULL.

Implements Codec.


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