mailinfo.hon commit Merge branch 'sh/p4-multi-depot' (aecb997)
   1#ifndef MAILINFO_H
   2#define MAILINFO_H
   3
   4#define MAX_BOUNDARIES 5
   5
   6struct mailinfo {
   7        FILE *input;
   8        FILE *output;
   9        FILE *patchfile;
  10
  11        struct strbuf name;
  12        struct strbuf email;
  13        int keep_subject;
  14        int keep_non_patch_brackets_in_subject;
  15        int add_message_id;
  16        int use_scissors;
  17        int use_inbody_headers;
  18        const char *metainfo_charset;
  19
  20        struct strbuf *content[MAX_BOUNDARIES];
  21        struct strbuf **content_top;
  22        struct strbuf charset;
  23        char *message_id;
  24        enum  {
  25                TE_DONTCARE, TE_QP, TE_BASE64
  26        } transfer_encoding;
  27        int patch_lines;
  28        int filter_stage; /* still reading log or are we copying patch? */
  29        int header_stage; /* still checking in-body headers? */
  30        struct strbuf **p_hdr_data;
  31        struct strbuf **s_hdr_data;
  32
  33        struct strbuf log_message;
  34        int input_error;
  35};
  36
  37extern void setup_mailinfo(struct mailinfo *);
  38extern int mailinfo(struct mailinfo *, const char *msg, const char *patch);
  39extern void clear_mailinfo(struct mailinfo *);
  40
  41#endif /* MAILINFO_H */