NeoMutt  2018-07-16 +2481-68dcde
Teaching an old dog new tricks
DOXYGEN
copy.h
Go to the documentation of this file.
1 
23 #ifndef MUTT_COPY_H
24 #define MUTT_COPY_H
25 
26 #include "config.h"
27 #include <stdint.h>
28 #include <stdio.h>
29 
30 struct Email;
31 struct Mailbox;
32 
33 typedef uint16_t CopyMessageFlags;
34 #define MUTT_CM_NO_FLAGS 0
35 #define MUTT_CM_NOHEADER (1 << 0)
36 #define MUTT_CM_PREFIX (1 << 1)
37 #define MUTT_CM_DECODE (1 << 2)
38 #define MUTT_CM_DISPLAY (1 << 3)
39 #define MUTT_CM_UPDATE (1 << 4)
40 #define MUTT_CM_WEED (1 << 5)
41 #define MUTT_CM_CHARCONV (1 << 6)
42 #define MUTT_CM_PRINTING (1 << 7)
43 #define MUTT_CM_REPLYING (1 << 8)
44 #define MUTT_CM_DECODE_PGP (1 << 9)
45 #define MUTT_CM_DECODE_SMIME (1 << 10)
46 #define MUTT_CM_VERIFY (1 << 11)
47 #define MUTT_CM_DECODE_CRYPT (MUTT_CM_DECODE_PGP | MUTT_CM_DECODE_SMIME)
48 
49 typedef uint32_t CopyHeaderFlags;
50 #define CH_NO_FLAGS 0
51 #define CH_UPDATE (1 << 0)
52 #define CH_WEED (1 << 1)
53 #define CH_DECODE (1 << 2)
54 #define CH_XMIT (1 << 3)
55 #define CH_FROM (1 << 4)
56 #define CH_PREFIX (1 << 5)
57 #define CH_NOSTATUS (1 << 6)
58 #define CH_REORDER (1 << 7)
59 #define CH_NONEWLINE (1 << 8)
60 #define CH_MIME (1 << 9)
61 #define CH_UPDATE_LEN (1 << 10)
62 #define CH_TXTPLAIN (1 << 11)
63 #define CH_NOLEN (1 << 12)
64 #define CH_WEED_DELIVERED (1 << 13)
65 #define CH_FORCE_FROM (1 << 14)
66 #define CH_NOQFROM (1 << 15)
67 #define CH_UPDATE_IRT (1 << 16)
68 #define CH_UPDATE_REFS (1 << 17)
69 #define CH_DISPLAY (1 << 18)
70 #define CH_UPDATE_LABEL (1 << 19)
71 #define CH_UPDATE_SUBJECT (1 << 20)
72 #define CH_VIRTUAL (1 << 21)
73 
74 int mutt_copy_hdr(FILE *fp_in, FILE *fp_out, LOFF_T off_start, LOFF_T off_end, CopyHeaderFlags chflags, const char *prefix);
75 
76 int mutt_copy_header(FILE *fp_in, struct Email *e, FILE *fp_out, CopyHeaderFlags chflags, const char *prefix);
77 
78 int mutt_copy_message_fp(FILE *fp_out, FILE *fp_in, struct Email *e, CopyMessageFlags cmflags, CopyHeaderFlags chflags);
79 int mutt_copy_message (FILE *fp_out, struct Mailbox *m, struct Email *e, CopyMessageFlags cmflags, CopyHeaderFlags chflags);
80 
81 int mutt_append_message(struct Mailbox *dest, struct Mailbox *src, struct Email *e, CopyMessageFlags cmflags, CopyHeaderFlags chflags);
82 
83 #endif /* MUTT_COPY_H */
The envelope/body of an email.
Definition: email.h:39
int mutt_copy_message(FILE *fp_out, struct Mailbox *m, struct Email *e, CopyMessageFlags cmflags, CopyHeaderFlags chflags)
Copy a message from a Mailbox.
Definition: copy.c:806
uint16_t CopyMessageFlags
Flags for mutt_copy_message(), e.g. MUTT_CM_NOHEADER.
Definition: copy.h:31
int mutt_append_message(struct Mailbox *dest, struct Mailbox *src, struct Email *e, CopyMessageFlags cmflags, CopyHeaderFlags chflags)
Append a message.
Definition: copy.c:876
int mutt_copy_message_fp(FILE *fp_out, FILE *fp_in, struct Email *e, CopyMessageFlags cmflags, CopyHeaderFlags chflags)
make a copy of a message from a FILE pointer
Definition: copy.c:597
A mailbox.
Definition: mailbox.h:92
int mutt_copy_hdr(FILE *fp_in, FILE *fp_out, LOFF_T off_start, LOFF_T off_end, CopyHeaderFlags chflags, const char *prefix)
Copy header from one file to another.
Definition: copy.c:76
uint32_t CopyHeaderFlags
Flags for mutt_copy_header(), e.g. CH_UPDATE.
Definition: copy.h:49
int mutt_copy_header(FILE *fp_in, struct Email *e, FILE *fp_out, CopyHeaderFlags chflags, const char *prefix)
Copy Email header.
Definition: copy.c:391