2 #include "../acl_cpp_define.hpp" 3 #include "../stdlib/noncopyable.hpp" 8 #if !defined(ACL_MIME_DISABLE) 41 void primary_head_finish(
void);
47 bool primary_head_ok(
void)
const;
55 void update_begin(
const char* path);
71 bool update(
const char* data,
size_t len);
76 void update_end(
void);
83 bool parse(
const char* file_path);
97 bool save_as(
const char* file_path);
109 bool save_mail(
const char* path,
const char* filename,
110 bool enableDecode =
true,
const char* toCharset =
"gb2312",
122 mime_body* get_body_node(
bool htmlFirst,
bool enableDecode =
true,
123 const char* toCharset =
"gb2312", off_t off = 0);
132 mime_body* get_plain_body(
bool enableDecode =
true,
133 const char* toCharset =
"gb2312", off_t off = 0);
142 mime_body* get_html_body(
bool enableDecode =
true,
143 const char* toCharset =
"gb2312", off_t off = 0);
152 const std::list<mime_node*>& get_mime_nodes(
bool enableDecode =
true,
153 const char* toCharset =
"gb2312", off_t off = 0);
163 const std::list<mime_attach*>& get_attachments(
bool enableDecode =
true,
164 const char* toCharset =
"gb2312", off_t off = 0,
bool all =
true);
173 const std::list<mime_image*>& get_images(
bool enableDecode =
true,
174 const char* toCharset =
"gb2312", off_t off = 0);
175 mime_image* get_image(
const char* cld,
bool enableDecode =
true,
176 const char* toCharset =
"gb2312", off_t off = 0);
183 void mime_debug(
const char* save_path,
bool decode =
true);
250 m_primaryHeader.
add_to(addr);
261 m_primaryHeader.
add_cc(addr);
307 m_primaryHeader.
set_type(ctype, stype);
329 return m_primaryHeader.sender();
339 return m_primaryHeader.from();
349 return m_primaryHeader.replyto();
359 return m_primaryHeader.returnpath();
369 return m_primaryHeader.subject();
379 return m_primaryHeader.to_list();
389 return m_primaryHeader.cc_list();
399 return m_primaryHeader.bcc_list();
410 return m_primaryHeader.rcpt_list();
419 return m_primaryHeader.header_list();
429 return m_primaryHeader.header_value(
name);
440 return m_primaryHeader.header_values(
name, values);
449 return m_primaryHeader.get_ctype();
458 return m_primaryHeader.get_stype();
467 return m_primaryHeader;
473 MIME_STATE* m_pMimeState;
474 bool m_bPrimaryHeadFinish;
477 std::list<mime_node*>* m_pNodes;
478 std::list<mime_attach*>* m_pAttaches;
479 std::list<mime_image*>* m_pImages;
484 #endif // !defined(ACL_MIME_DISABLE) const std::list< char * > & cc_list(void) const
HTTP_API void const char * name
mime & set_sender(const char *addr)
mime & add_header(const char *name, const char *value)
mime & add_to(const char *addr)
const mime_head & primary_header(void) const
const string & returnpath(void) const
const std::list< char * > & rcpt_list(void) const
const std::list< char * > & to_list(void) const
const char * get_stype(void) const
mime & add_rcpt(const char *addr)
mime & set_type(const char *ctype, const char *stype)
const std::list< HEADER * > & header_list(void) const
const string & sender(void) const
mime & set_boundary(const char *s)
const std::list< char * > & bcc_list(void) const
const string & subject(void) const
const char * get_ctype(void) const
const char * header_value(const char *name) const
mime & add_cc(const char *addr)
mime & set_subject(const char *s)
mime & set_replyto(const char *addr)
mime & add_bcc(const char *addr)
int header_values(const char *name, std::list< const char * > *values) const
const string & from(void) const
const string & replyto(void) const
mime & set_from(const char *addr)
mime & set_returnpath(const char *addr)