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__
virtual bool decode(const char *&scursor, const char *const send, char *&dcursor, const char *const dend, bool withCRLF=false) const Convenience wrapper that can be used for small chunks of data when you can provide a large enough buf...
virtual bool encode(const char *&scursor, const char *const send, char *&dcursor, const char *const dend, bool withCRLF=false) const Convenience wrapper that can be used for small chunks of data when you can provide a large enough buf...
|