KDE PIM / Developers / API Docs / libkmime

KMime::Encoder Class Reference

Stateful encoder class, modelled after Stateful encoder class. More...

#include <kmime_codecs.h>

Inherited by KMime::Base64Encoder, KMime::IdentityEnDecoder, KMime::QuotedPrintableEncoder, and KMime::Rfc2047QEncodingEncoder.

List of all members.

Public Member Functions

Protected Types

Protected Member Functions

Protected Attributes

Friends


Detailed Description

Stateful encoder class, modelled after Stateful encoder class.

See also:
QTextEncoder.
Author:
Marc Mutz <mutz@kde.org>


Member Enumeration Documentation

anonymous enum [protected]
 

Space in the output buffer.


Constructor & Destructor Documentation

KMime::Encoder::Encoder bool  withCRLF = false  )  [inline, protected]
 

Protected constructor.

Use KMime::Codec::makeEncoder if you want one. The bool parameter determines whether lines end with CRLF (true) or LF (false, default).


Member Function Documentation

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

See also:
KMime::Codec for calling conventions.

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

See also:
KMime::Codec for calling conventions.

bool KMime::Encoder::write char  ch,
char *&  dcursor,
const char *const   dend
[inline, protected]
 

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.

bool KMime::Encoder::flushOutputBuffer char *&  dcursor,
const char *const   dend
[protected]
 

Writes characters from the output buffer to the output stream.

Implementations of

See also:
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

bool KMime::Encoder::writeCRLF char *&  dcursor,
const char *const   dend
[inline, protected]
 

Convenience function.

Outputs LF or CRLF, based on the state of mWithCRLF


The documentation for this class was generated from the following files: