#include <kmime_codecs.h>
|
| virtual bool | encode (const char *&scursor, const char *const send, char *&dcursor, const char *const dend)=0 |
| virtual bool | finish (char *&dcursor, const char *const dend)=0 |
|
| enum | { maxBufferedChars = 8
} |
|
| | Encoder (bool withCRLF=false) |
| bool | write (char ch, char *&dcursor, const char *const dend) |
| bool | flushOutputBuffer (char *&dcursor, const char *const dend) |
| bool | writeCRLF (char *&dcursor, const char *const dend) |
Stateful encoder class, modelled after TQTextEncoder.
Stateful encoder class - Author
- Marc Mutz mutz@.nosp@m.kde..nosp@m.org
Definition at line 300 of file kmime_codecs.h.
◆ anonymous enum
◆ Encoder()
| KMime::Encoder::Encoder |
( |
bool | withCRLF = false | ) |
|
|
inlineprotected |
Protected constructor.
Use KMime::Codec::makeEncoder if you want one. The bool parameter determines whether lines end with CRLF (true) or LF (false, default).
Definition at line 306 of file kmime_codecs.h.
◆ ~Encoder()
| virtual KMime::Encoder::~Encoder |
( |
| ) |
|
|
inlinevirtual |
◆ encode()
| virtual bool KMime::Encoder::encode |
( |
const char *& | scursor, |
|
|
const char *const | send, |
|
|
char *& | dcursor, |
|
|
const char *const | dend ) |
|
pure virtual |
Encode a chunk of data, maintaining state information between calls.
See KMime::Codec for calling conventions.
◆ finish()
| virtual bool KMime::Encoder::finish |
( |
char *& | dcursor, |
|
|
const char *const | dend ) |
|
pure virtual |
Call this method to finalize the output stream.
Writes all remaining data and resets the encoder. See KMime::Codec for calling conventions.
◆ flushOutputBuffer()
| bool KMime::Encoder::flushOutputBuffer |
( |
char *& | dcursor, |
|
|
const char *const | dend ) |
|
protected |
Writes characters from the output buffer to the output stream.
Implementations of encode and finish should call this at the very beginning and for each iteration of the while loop. - Returns
- true if all chars could be written, false otherwise
Definition at line 223 of file kmime_codecs.cpp.
◆ write()
| bool KMime::Encoder::write |
( |
char | ch, |
|
|
char *& | dcursor, |
|
|
const char *const | dend ) |
|
inlineprotected |
Writes ch to the output stream or the output buffer, depending on whether or not the output stream has space left.
- Returns
- true if written to the output stream, false if buffered.
Definition at line 328 of file kmime_codecs.h.
◆ writeCRLF()
| bool KMime::Encoder::writeCRLF |
( |
char *& | dcursor, |
|
|
const char *const | dend ) |
|
inlineprotected |
Convenience function.
Outputs LF or CRLF, based on the state of mWithCRLF
Definition at line 350 of file kmime_codecs.h.
◆ Codec
◆ mOutputBufferCursor
| uchar KMime::Encoder::mOutputBufferCursor |
|
protected |
◆ mWithCRLF
| const bool KMime::Encoder::mWithCRLF |
|
protected |
The documentation for this class was generated from the following files:
|