8#ifndef INCLUDED_BDLDE_QUOTEDPRINTABLEENCODER
9#define INCLUDED_BDLDE_QUOTEDPRINTABLEENCODER
471#include <bdlscm_version.h>
476#include <bsl_climits.h>
478#ifndef BDE_DONT_ALLOW_TRANSITIVE_INCLUDES
506 k_DEFAULT_MAX_LINELEN = 76
535 static const char *s_defaultEquivClass_p;
539 static const char *s_lineBreakModeName[];
551 char *d_equivClass_p;
558 char d_lastInputChar;
585 void appendSoftLineBreak(
char *out);
591 void appendHardLineBreak(
char *out);
597 void appendPrintable(
char *out,
char ch);
605 void appendAsHex(
char *out,
char ch,
bool isFinal =
false);
658 const char *extraCharsToEncode,
770 return s_lineBreakModeName[mode];
777 d_state = e_INITIAL_STATE;
788 return e_ERROR_STATE != d_state;
794 return e_DONE_STATE == d_state && 0 == d_deferred && 0 == d_bufferLength;
800 return e_ERROR_STATE == d_state;
806 return e_INITIAL_STATE == d_state;
813 return d_lineBreakMode;
819 return d_maxLineLength;
825 return d_deferred ? 3 : d_bufferLength;
831 return d_outputLength;
Definition bdlde_quotedprintableencoder.h:493
QuotedPrintableEncoder(const char *extraCharsToEncode, LineBreakMode lineBreakMode=e_CRLF_MODE, int maxLineLength=k_DEFAULT_MAX_LINELEN, bslma::Allocator *basicAllocator=0)
int numOutputPending() const
Definition bdlde_quotedprintableencoder.h:823
bool isInitialState() const
Definition bdlde_quotedprintableencoder.h:804
int endConvert(char *out, int *numOut, int maxNumOut=-1)
void reset()
Definition bdlde_quotedprintableencoder.h:775
int outputLength() const
Definition bdlde_quotedprintableencoder.h:829
bool isDone() const
Definition bdlde_quotedprintableencoder.h:792
~QuotedPrintableEncoder()
Destroy this object.
int maxLineLength() const
Definition bdlde_quotedprintableencoder.h:817
QuotedPrintableEncoder(LineBreakMode lineBreakMode=e_CRLF_MODE, int maxLineLength=k_DEFAULT_MAX_LINELEN, bslma::Allocator *basicAllocator=0)
LineBreakMode
Definition bdlde_quotedprintableencoder.h:521
@ e_LF_MODE
Definition bdlde_quotedprintableencoder.h:527
@ e_MIXED_MODE
Definition bdlde_quotedprintableencoder.h:529
@ e_BINARY_MODE
Definition bdlde_quotedprintableencoder.h:530
@ e_CRLF_MODE
Definition bdlde_quotedprintableencoder.h:525
LineBreakMode lineBreakMode() const
Definition bdlde_quotedprintableencoder.h:811
int convert(char *out, int *numOut, int *numIn, const char *begin, const char *end, int maxNumOut=-1)
EquivalenceClass
The input equivalence classes.
Definition bdlde_quotedprintableencoder.h:513
@ e_PC
Definition bdlde_quotedprintableencoder.h:514
@ e_WS
Definition bdlde_quotedprintableencoder.h:517
@ e_CR
Definition bdlde_quotedprintableencoder.h:515
@ e_CC
Definition bdlde_quotedprintableencoder.h:518
@ e_LF
Definition bdlde_quotedprintableencoder.h:516
bool isAccepting() const
Definition bdlde_quotedprintableencoder.h:786
bool isError() const
Definition bdlde_quotedprintableencoder.h:798
static const char * lineBreakModeToAscii(QuotedPrintableEncoder::LineBreakMode mode)
Definition bdlde_quotedprintableencoder.h:768
Definition bslma_allocator.h:545
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition bdlde_base64alphabet.h:118
Definition baljsn_encoder_testtypes.h:76
Definition bslma_usesbslmaallocator.h:344