|
Packit |
4511e4 |
#ifndef MAILINFO_H
|
|
Packit |
4511e4 |
#define MAILINFO_H
|
|
Packit |
4511e4 |
|
|
Packit Service |
b5fd21 |
#include "strbuf.h"
|
|
Packit Service |
b5fd21 |
|
|
Packit |
4511e4 |
#define MAX_BOUNDARIES 5
|
|
Packit |
4511e4 |
|
|
Packit |
4511e4 |
struct mailinfo {
|
|
Packit |
4511e4 |
FILE *input;
|
|
Packit |
4511e4 |
FILE *output;
|
|
Packit |
4511e4 |
FILE *patchfile;
|
|
Packit |
4511e4 |
|
|
Packit |
4511e4 |
struct strbuf name;
|
|
Packit |
4511e4 |
struct strbuf email;
|
|
Packit |
4511e4 |
int keep_subject;
|
|
Packit |
4511e4 |
int keep_non_patch_brackets_in_subject;
|
|
Packit |
4511e4 |
int add_message_id;
|
|
Packit |
4511e4 |
int use_scissors;
|
|
Packit |
4511e4 |
int use_inbody_headers;
|
|
Packit |
4511e4 |
const char *metainfo_charset;
|
|
Packit |
4511e4 |
|
|
Packit |
4511e4 |
struct strbuf *content[MAX_BOUNDARIES];
|
|
Packit |
4511e4 |
struct strbuf **content_top;
|
|
Packit |
4511e4 |
struct strbuf charset;
|
|
Packit Service |
b5fd21 |
unsigned int format_flowed:1;
|
|
Packit Service |
b5fd21 |
unsigned int delsp:1;
|
|
Packit |
4511e4 |
char *message_id;
|
|
Packit |
4511e4 |
enum {
|
|
Packit |
4511e4 |
TE_DONTCARE, TE_QP, TE_BASE64
|
|
Packit |
4511e4 |
} transfer_encoding;
|
|
Packit |
4511e4 |
int patch_lines;
|
|
Packit |
4511e4 |
int filter_stage; /* still reading log or are we copying patch? */
|
|
Packit |
4511e4 |
int header_stage; /* still checking in-body headers? */
|
|
Packit |
4511e4 |
struct strbuf inbody_header_accum;
|
|
Packit |
4511e4 |
struct strbuf **p_hdr_data;
|
|
Packit |
4511e4 |
struct strbuf **s_hdr_data;
|
|
Packit |
4511e4 |
|
|
Packit |
4511e4 |
struct strbuf log_message;
|
|
Packit |
4511e4 |
int input_error;
|
|
Packit |
4511e4 |
};
|
|
Packit |
4511e4 |
|
|
Packit Service |
b5fd21 |
void setup_mailinfo(struct mailinfo *);
|
|
Packit Service |
b5fd21 |
int mailinfo(struct mailinfo *, const char *msg, const char *patch);
|
|
Packit Service |
b5fd21 |
void clear_mailinfo(struct mailinfo *);
|
|
Packit |
4511e4 |
|
|
Packit |
4511e4 |
#endif /* MAILINFO_H */
|