2 #include "../acl_cpp_define.hpp" 3 #include "../stdlib/pipe_stream.hpp" 5 #if !defined(ACL_MIME_DISABLE) 20 mime_code(
bool addCrlf,
bool addInvalid,
const char* encoding_type);
29 return encoding_type_;
44 virtual void encode_update(
const char *src,
int n,
55 virtual void encode_finish(
string* out);
70 virtual void decode_update(
const char *src,
int n,
string* out);
80 virtual void decode_finish(
string* out);
85 virtual void reset(
void);
91 virtual void add_crlf(
bool on);
97 virtual void add_invalid(
bool on);
104 static void create_decode_tab(
const unsigned char *toTab,
string *out);
113 void init(
const unsigned char* toTab,
114 const unsigned char* unTab,
unsigned char fillChar);
123 void set_status(
bool encoding =
true);
127 virtual int push_pop(
const char* in,
size_t len,
128 string* out,
size_t max = 0);
129 virtual int pop_end(
string* out,
size_t max = 0);
130 virtual void clear(
void);
141 static mime_code* create(
int encoding,
bool warn_unsupport =
true);
144 void encode(
string* out);
145 void decode(
string* out);
147 char m_encodeBuf[57];
149 char m_decodeBuf[76];
154 const unsigned char *m_toTab;
155 const unsigned char *m_unTab;
156 unsigned char m_fillChar;
158 char* encoding_type_;
163 #endif // !defined(ACL_MIME_DISABLE)
const char * get_encoding_type(void) const