|  | Home |

# QMailPassThroughCodec Class Reference

The QMailPassThroughCodec class uses the QMailCodec interface to move data between streams without coding or decoding. More...

        #include <QMailPassThroughCodec>

This class is under development and is subject to change.

Inherits QMailCodec.

- List of all members, including inherited members

### Additional Inherited Members

- 9 public functions inherited from QMailCodec
- 3 static public members inherited from QMailCodec
- 2 protected functions inherited from QMailCodec

## Detailed Description

The QMailPassThroughCodec class uses the QMailCodec interface to move data between streams without coding or decoding.

The QMailPassThroughCodec allows client code to use the same QMailCodec interface to convert data between different ASCII encodings, or no encoding at all, without having to be aware of the details involved.

The pass-through codec is primarily useful when communicating with SMTP servers supporting the RFC 1652 (8BITMIME) extension, which permits the exchange of data without coding via 7-bit ASCII.

A QMailPassThroughCodec can be instantiated directly, but is more likely to be used polymorphically:

        // Get an object to perform the encoding required for the current server
        QMailCodec* encoder = getCodecForServer(currentServer());

        // If the codec returned is a QMailPassThroughCodec, the input data will
        // be written to the output stream without encoding to 7-bit ASCII
        encoder->encode(outputStream, inputStream);

See also QMailCodec.