vdr  2.2.0
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
cBase64Encoder Class Reference

#include <tools.h>

Public Member Functions

 cBase64Encoder (const uchar *Data, int Length, int MaxResult=64)
 
 ~cBase64Encoder ()
 
const char * NextLine (void)
 

Private Attributes

const uchardata
 
int length
 
int maxResult
 
int i
 
char * result
 

Static Private Attributes

static const char * b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
 

Detailed Description

Definition at line 287 of file tools.h.

Constructor & Destructor Documentation

cBase64Encoder::cBase64Encoder ( const uchar Data,
int  Length,
int  MaxResult = 64 
)

Sets up a new base 64 encoder for the given Data, with the given Length.

Data will not be copied and must be valid as long as NextLine() will be called. MaxResult defines the maximum number of characters in any result line. The resulting lines may be shorter than MaxResult in case its value is not a multiple of 4.

Definition at line 1296 of file tools.c.

References MALLOC.

cBase64Encoder::~cBase64Encoder ( )

Definition at line 1305 of file tools.c.

Member Function Documentation

const char * cBase64Encoder::NextLine ( void  )

Returns the next line of encoded data (terminated by '\0'), or NULL if there is no more encoded data.

The caller must call NextLine() and process each returned line until NULL is returned, in order to get the entire data encoded. The returned data is only valid until the next time NextLine() is called, or until the object is destroyed.

Definition at line 1310 of file tools.c.

Referenced by cSVDRP::CmdGRAB().

Member Data Documentation

const char * cBase64Encoder::b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
staticprivate

Definition at line 294 of file tools.h.

Referenced by RgbToJpeg().

const uchar* cBase64Encoder::data
private

Definition at line 289 of file tools.h.

int cBase64Encoder::i
private

Definition at line 292 of file tools.h.

int cBase64Encoder::length
private

Definition at line 290 of file tools.h.

int cBase64Encoder::maxResult
private

Definition at line 291 of file tools.h.

char* cBase64Encoder::result
private

Definition at line 293 of file tools.h.


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