NeoMutt  2021-02-05-666-ge300cd
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 struct Message;
33 
34 typedef uint16_t CopyMessageFlags;
35 #define MUTT_CM_NO_FLAGS 0
36 #define MUTT_CM_NOHEADER (1 << 0)
37 #define MUTT_CM_PREFIX (1 << 1)
38 #define MUTT_CM_DECODE (1 << 2)
39 #define MUTT_CM_DISPLAY (1 << 3)
40 #define MUTT_CM_UPDATE (1 << 4)
41 #define MUTT_CM_WEED (1 << 5)
42 #define MUTT_CM_CHARCONV (1 << 6)
43 #define MUTT_CM_PRINTING (1 << 7)
44 #define MUTT_CM_REPLYING (1 << 8)
45 #define MUTT_CM_DECODE_PGP (1 << 9)
46 #define MUTT_CM_DECODE_SMIME (1 << 10)
47 #define MUTT_CM_VERIFY (1 << 11)
48 #define MUTT_CM_DECODE_CRYPT (MUTT_CM_DECODE_PGP | MUTT_CM_DECODE_SMIME)
49 
50 typedef uint32_t CopyHeaderFlags;
51 #define CH_NO_FLAGS 0
52 #define CH_UPDATE (1 << 0)
53 #define CH_WEED (1 << 1)
54 #define CH_DECODE (1 << 2)
55 #define CH_XMIT (1 << 3)
56 #define CH_FROM (1 << 4)
57 #define CH_PREFIX (1 << 5)
58 #define CH_NOSTATUS (1 << 6)
59 #define CH_REORDER (1 << 7)
60 #define CH_NONEWLINE (1 << 8)
61 #define CH_MIME (1 << 9)
62 #define CH_UPDATE_LEN (1 << 10)
63 #define CH_TXTPLAIN (1 << 11)
64 #define CH_NOLEN (1 << 12)
65 #define CH_WEED_DELIVERED (1 << 13)
66 #define CH_FORCE_FROM (1 << 14)
67 #define CH_NOQFROM (1 << 15)
68 #define CH_UPDATE_IRT (1 << 16)
69 #define CH_UPDATE_REFS (1 << 17)
70 #define CH_DISPLAY (1 << 18)
71 #define CH_UPDATE_LABEL (1 << 19)
72 #define CH_UPDATE_SUBJECT (1 << 20)
73 #define CH_VIRTUAL (1 << 21)
74 
75 int mutt_copy_hdr(FILE *fp_in, FILE *fp_out, LOFF_T off_start, LOFF_T off_end, CopyHeaderFlags chflags, const char *prefix, int wraplen);
76 
77 int mutt_copy_header(FILE *fp_in, struct Email *e, FILE *fp_out, CopyHeaderFlags chflags, const char *prefix, int wraplen);
78 
79 int mutt_copy_message_fp(FILE *fp_out, FILE *fp_in, struct Email *e, CopyMessageFlags cmflags, CopyHeaderFlags chflags, int wraplen);
80 int mutt_copy_message (FILE *fp_out, struct Mailbox *m, struct Email *e, struct Message *msg, CopyMessageFlags cmflags, CopyHeaderFlags chflags, int wraplen);
81 
82 int mutt_append_message(struct Mailbox *m_dst, struct Mailbox *m_src, struct Email *e, struct Message *msg, CopyMessageFlags cmflags, CopyHeaderFlags chflags);
83 
84 #endif /* MUTT_COPY_H */
The envelope/body of an email.
Definition: email.h:37
uint16_t CopyMessageFlags
Flags for mutt_copy_message(), e.g. MUTT_CM_NOHEADER.
Definition: copy.h:32
int mutt_copy_message(FILE *fp_out, struct Mailbox *m, struct Email *e, struct Message *msg, CopyMessageFlags cmflags, CopyHeaderFlags chflags, int wraplen)
Copy a message from a Mailbox.
Definition: copy.c:853
int mutt_copy_header(FILE *fp_in, struct Email *e, FILE *fp_out, CopyHeaderFlags chflags, const char *prefix, int wraplen)
Copy Email header.
Definition: copy.c:413
A local copy of an email.
Definition: mxapi.h:41
A mailbox.
Definition: mailbox.h:81
int mutt_copy_message_fp(FILE *fp_out, FILE *fp_in, struct Email *e, CopyMessageFlags cmflags, CopyHeaderFlags chflags, int wraplen)
make a copy of a message from a FILE pointer
Definition: copy.c:629
int mutt_append_message(struct Mailbox *m_dst, struct Mailbox *m_src, struct Email *e, struct Message *msg, CopyMessageFlags cmflags, CopyHeaderFlags chflags)
Append a message.
Definition: copy.c:923
uint32_t CopyHeaderFlags
Flags for mutt_copy_header(), e.g. CH_UPDATE.
Definition: copy.h:50
int mutt_copy_hdr(FILE *fp_in, FILE *fp_out, LOFF_T off_start, LOFF_T off_end, CopyHeaderFlags chflags, const char *prefix, int wraplen)
Copy header from one file to another.
Definition: copy.c:104