Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IUuencode::encodeBlock ( const P6CHAR pIn,
P6UINT32  inSize,
P6UINT16  mode,
const P6CHAR pFileName,
P6CHAR pEncoded,
P6UINT32  cBuffer,
P6UINT32 pWritten 
)
pure virtual

This encoding scheme converts the input into a safe set of characters.

All characters are modified by adding a value of 0x20 to result in a valid character set of {0x20 .. 0x5F}. If an encoded value equals 0x20 (or space) it is converted to the Grave Accent character (0x60) as a convention since spaces at the end of a line can be truncated in network protocols.

The parameter pEncoded can be set to NULL. In this case, this function returns the buffer size required to perform the encode operation.

Note that this encoding function does not modify the line terimation convention of the original data. The generated encoded data uses only a line feed character for line termination as this was the convention used in the uuencode definition (was initially built for Unix systems).

Parameters
pIn[ in ] Text or binary data to be encoded into uuencoded format
inSize[ in ] The number of bytes containing data in the buffer pointed to by pIn
mode[ in ] The Unix file privilege bits to be placed on the "begin" line (e.g., 644).
pFileName[ in ] The name of the file that the orginal data was taken from.
pEncoded[ out ] The data pointed to by pIn converted into uuencoding.
cBuffer[ in ] Number of bytes in the buffer pointed to by pEncoded.
pWritten[ out ] Optional can be NULL, returns the number of bytes written into pEncoded. This parameter cannot be NULL when pEncoded is also NULL.
Returns
SuccessP6R::eOk 
FailureP6R::eInvalidArgpIn or pFileName is NULL. Or inSize is zero or mode is greater than 999. If pEncoded and pWritten are NULL.
P6R::eTooSmallThe buffer pEncoded is too small to contain the generated value.
P6R::eNotInitializedA successful call to initialize has not been done.