vdr  1.7.27
Public Member Functions | Private Attributes | Static Private Attributes
cBase64Encoder Class Reference

#include <tools.h>

List of all members.

Public Member Functions

 cBase64Encoder (const uchar *Data, int Length, int MaxResult=64)
 ~cBase64Encoder ()
const char * NextLine (void)
 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 248 of file include/vdr/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 1155 of file tools.c.

References data, i, length, MALLOC, maxResult, and result.

Definition at line 1164 of file tools.c.

References result.

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.


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 1169 of file tools.c.

References b64, data, i, length, maxResult, and result.

Referenced by cSVDRP::CmdGRAB().

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.


Member Data Documentation

static const char * cBase64Encoder::b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" [static, private]

Definition at line 255 of file include/vdr/tools.h.

Referenced by NextLine().

const uchar * cBase64Encoder::data [private]

Definition at line 250 of file include/vdr/tools.h.

Referenced by cBase64Encoder(), and NextLine().

int cBase64Encoder::i [private]

Definition at line 253 of file include/vdr/tools.h.

Referenced by cBase64Encoder(), and NextLine().

int cBase64Encoder::length [private]

Definition at line 251 of file include/vdr/tools.h.

Referenced by cBase64Encoder(), and NextLine().

Definition at line 252 of file include/vdr/tools.h.

Referenced by cBase64Encoder(), and NextLine().

char * cBase64Encoder::result [private]

Definition at line 254 of file include/vdr/tools.h.

Referenced by cBase64Encoder(), NextLine(), and ~cBase64Encoder().


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