32 #ifndef __KMIME_CODEC_TQP__
33 #define __KMIME_CODEC_TQP__
35 #include "kmime_codecs.h"
40 class QuotedPrintableCodec : public Codec {
43 QuotedPrintableCodec() : Codec() {}
46 virtual ~QuotedPrintableCodec() {}
48 const char * name() const {
49 return "quoted-printable";
52 int maxEncodedSizeFor( int insize, bool withCRLF= false ) const {
54 int result = 3*insize;
56 result += (withCRLF ? 3 : 2) * (insize/25);
61 int maxDecodedSizeFor( int insize, bool withCRLF= false ) const;
63 Encoder * makeEncoder( bool withCRLF= false ) const;
64 Decoder * makeDecoder( bool withCRLF= false ) const;
68 class Rfc2047TQEncodingCodec : public Codec {
71 Rfc2047TQEncodingCodec() : Codec() {}
74 virtual ~Rfc2047TQEncodingCodec() {}
76 const char * name() const {
80 int maxEncodedSizeFor( int insize, bool withCRLF= false ) const {
87 int maxDecodedSizeFor( int insize, bool withCRLF= false ) const;
89 Encoder * makeEncoder( bool withCRLF= false ) const;
90 Decoder * makeDecoder( bool withCRLF= false ) const;
94 class Rfc2231EncodingCodec : public Codec {
97 Rfc2231EncodingCodec() : Codec() {}
100 virtual ~Rfc2231EncodingCodec() {}
102 const char * name() const {
103 return "x-kmime-rfc2231";
106 int maxEncodedSizeFor( int insize, bool withCRLF= false ) const {
112 int maxDecodedSizeFor( int insize, bool withCRLF= false ) const;
114 Encoder * makeEncoder( bool withCRLF= false ) const;
115 Decoder * makeDecoder( bool withCRLF= false ) const;
|