32 #ifndef __KMIME_CODEC_IDENTITY_H__
33 #define __KMIME_CODEC_IDENTITY_H__
35 #include "kmime_codecs.h"
39 class IdentityCodec : public Codec {
42 IdentityCodec() : Codec() {}
47 TQByteArray encode( const TQByteArray & src, bool withCRLF ) const;
48 TQCString encodeToTQCString( const TQByteArray & src, bool withCRLF ) const;
49 TQByteArray decode( const TQByteArray & src, bool withCRLF ) const;
51 int maxEncodedSizeFor( int insize, bool withCRLF ) const {
58 int maxDecodedSizeFor( int insize, bool withCRLF ) const {
65 Encoder * makeEncoder( bool withCRLF= false ) const;
66 Decoder * makeDecoder( bool withCRLF= false ) const;
69 class SevenBitCodec : public IdentityCodec {
72 SevenBitCodec() : IdentityCodec() {}
77 const char * name() const { return "7bit"; }
80 class EightBitCodec : public IdentityCodec {
83 EightBitCodec() : IdentityCodec() {}
88 const char * name() const { return "8bit"; }
91 class BinaryCodec : public IdentityCodec {
94 BinaryCodec() : IdentityCodec() {}
99 const char * name() const { return "binary"; }
101 int maxEncodedSizeFor( int insize, bool ) {
104 int maxDecodedSizeFor( int insize, bool ) const {
108 TQCString encodeToTQCString( const TQByteArray &, bool ) const {
116 #endif // __KMIME_CODEC_IDENTITY_H__
|