DwUuencode Man Page

## NAME

DwUuencode -- Class for performing uuencode or uudecode operations

## SYNOPSIS

    class DW_EXPORT DwUuencode {

    public:

        DwUuencode();
        virtual ~DwUuencode();
        void SetFileName(const char* aName);
        const char* FileName() const;
        void SetFileMode(DwUint16 aMode);
        DwUint16 FileMode() const;
        void SetBinaryChars(const DwString& aStr);
        const DwString& BinaryChars() const;
        void SetAsciiChars(const DwString& aStr);
        const DwString& AsciiChars() const;
        DwBool Encode();
        DwBool Decode();
    };

## DESCRIPTION

`DwUuencode` performs uuencode or uudecode operations. Uuencode is a format for encoding binary data into text characters for transmission through the mail system. The format also includes the file name and the file mode. (Note: The file mode is significant only in UNIX.) In MIME, the use of uuencode is deprecated; base64 is the preferred encoding for sending binary data.

To use `DwUuencode` for encoding binary data into uuencode format, set the file name, file mode, and binary data string using the member functions `SetFileName()`, `SetFileMode()`, and `SetBinaryChars()`. Then call the member function `Encode()`. Finally, retrieve the uuencoded text characters by calling `AsciiChars()`.

To use `DwUuencode` to decode uuencoded data, set the ASCII characters using the member function `SetAsciiChars()`, then call `Decode()`. Finally, retrieve the file name, file mode, and binary characters by calling `FileName()`, `FileMode()`, and `BinaryChars()`.

## Public Member Functions

void SetFileName(const char* aName)

Sets the file name to be included in the uuencoded output.

const char* FileName() const

Returns the file name extracted while uudecoding.

void SetFileMode(DwUint16 aMode)

Sets the file mode to be included in the uuencoded output. If the file mode is not explicitly set using this member function, a default value of 0644 (octal) is assumed.

DwUint16 FileMode() const

Returns the file mode extracted while uudecoding.

void SetBinaryChars(const DwString& aStr)

Sets the string of binary data to be used in the uuencode operation.

const DwString& BinaryChars() const

Returns the string of binary data extracted during a uudecode operation.

void SetAsciiChars(const DwString& aStr)

Sets the string of ASCII characters to used in the decode operation.

const DwString& AsciiChars() const

Returns the string of ASCII characters created during a uuencode operation.

DwBool Encode()

Creates an ASCII string of characters by uuencoding the file name, file mode, and binary data.

DwBool Decode()

Extracts the file name, file mode, and binary data from the ASCII characters via a uudecode operation.