diff options
| author | zhuzhenjun <[email protected]> | 2024-11-27 08:59:59 +0000 |
|---|---|---|
| committer | zhuzhenjun <[email protected]> | 2024-11-27 08:59:59 +0000 |
| commit | 021d5da694b9e73b01a87a3510c365193371cf52 (patch) | |
| tree | 0ac15411256b78ed81cd6682ae73264c70608759 /decoders/mail/mail_decoder_email.h | |
| parent | 3694c142d974ab35f55bde4a8519525b9afcbc84 (diff) | |
init mail decoderdev-mail-decoder
Diffstat (limited to 'decoders/mail/mail_decoder_email.h')
| -rw-r--r-- | decoders/mail/mail_decoder_email.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/decoders/mail/mail_decoder_email.h b/decoders/mail/mail_decoder_email.h index f6a2e7a..caf3935 100644 --- a/decoders/mail/mail_decoder_email.h +++ b/decoders/mail/mail_decoder_email.h @@ -211,13 +211,19 @@ struct email_parser long pre_uid; //IMAPЭ�鰴���ֽ�����ȡ�ʼ����ݵ���� long uid; - struct mail_decoder *mail_env_ref; size_t mail_seq; enum MAIL_PROTOCOL protocol; struct mail_header *header; struct mail_body *body; struct mail_attachment *current_attachment; struct mail_eml *eml; + + int eml_topic_id; + int header_topic_id; + int body_topic_id; + int attachment_topic_id; + struct mq_runtime *mq; + }; int mail_command_update(struct mail_command *command, enum MAIL_COMMAND cmd, const char *cmd_arg, size_t cmd_arg_len, const char *cmd_line, size_t cmd_line_len); @@ -250,11 +256,11 @@ int mail_eml_reset(struct mail_eml *eml); void mail_eml_free(struct mail_eml *eml); struct mail_eml *mail_eml_clone(struct mail_eml *eml); struct mail_eml *mail_eml_new(void); -int mail_publish_command(struct mail_decoder *env, struct session *sess, enum MAIL_PROTOCOL protocol, size_t mail_seq, struct mail_command *cmd); -int mail_publish_header(struct mail_decoder *env, struct session *sess, enum MAIL_PROTOCOL protocol, size_t mail_seq, struct mail_header *header); -int mail_publish_body(struct mail_decoder *env, struct session *sess, enum MAIL_PROTOCOL protocol, size_t mail_seq, struct mail_body *body); -int mail_publish_attachment(struct mail_decoder *env, struct session *sess, enum MAIL_PROTOCOL protocol, size_t mail_seq, struct mail_attachment *attachment); -int mail_publish_eml(struct mail_decoder *env, struct session *sess, enum MAIL_PROTOCOL protocol, struct mail_eml *eml); +int mail_publish_command(struct mq_runtime *mq, int topic_id, struct session *sess, enum MAIL_PROTOCOL protocol, size_t mail_seq, struct mail_command *cmd); +int mail_publish_header(struct mq_runtime *mq, int topic_id, struct session *sess, enum MAIL_PROTOCOL protocol, size_t mail_seq, struct mail_header *header); +int mail_publish_body(struct mq_runtime *mq, int topic_id, struct session *sess, enum MAIL_PROTOCOL protocol, size_t mail_seq, struct mail_body *body); +int mail_publish_attachment(struct mq_runtime *mq, int topic_id, struct session *sess, enum MAIL_PROTOCOL protocol, size_t mail_seq, struct mail_attachment *attachment); +int mail_publish_eml(struct mq_runtime *mq, int topic_id, struct session *sess, enum MAIL_PROTOCOL protocol, struct mail_eml *eml); void mail_message_free(void *msg, void *arg); char *mail_message_to_json(struct mail_message *msg); @@ -269,7 +275,7 @@ int email_parser_get_tcpdata(struct email_parser* eml_parser, const char *payloa int email_parser_entry(struct email_parser *eml_parser, struct session *sess, const char *email_line, size_t line_len, enum EML_LINE_TYPE line_type); int email_parser_reset(struct email_parser * eml_parser); void email_parser_free(struct email_parser *eml_parser); -struct email_parser * email_parser_new(struct mail_decoder *env, enum MAIL_PROTOCOL protocol, int is_c2s); +struct email_parser * email_parser_new(struct mq_runtime *mq, struct mail_topics *topics, enum MAIL_PROTOCOL protocol, int is_c2s); #endif |
