NeoMutt  2025-12-11-435-g4ac674
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
copy_email.h
Go to the documentation of this file.
1
24
25#ifndef MUTT_EMAIL_COPY_EMAIL_H
26#define MUTT_EMAIL_COPY_EMAIL_H
27
28#include "config.h"
29#include <stdint.h>
30#include <stdio.h>
31
32struct Email;
33struct Mailbox;
34struct Message;
35
36typedef uint16_t CopyMessageFlags;
37#define MUTT_CM_NO_FLAGS 0
38#define MUTT_CM_NOHEADER (1 << 0)
39#define MUTT_CM_PREFIX (1 << 1)
40#define MUTT_CM_DECODE (1 << 2)
41#define MUTT_CM_DISPLAY (1 << 3)
42#define MUTT_CM_UPDATE (1 << 4)
43#define MUTT_CM_WEED (1 << 5)
44#define MUTT_CM_CHARCONV (1 << 6)
45#define MUTT_CM_PRINTING (1 << 7)
46#define MUTT_CM_REPLYING (1 << 8)
47#define MUTT_CM_DECODE_PGP (1 << 9)
48#define MUTT_CM_DECODE_SMIME (1 << 10)
49#define MUTT_CM_VERIFY (1 << 11)
50
52#define MUTT_CM_DECODE_CRYPT (MUTT_CM_DECODE_PGP | MUTT_CM_DECODE_SMIME)
53
54typedef uint32_t CopyHeaderFlags;
55#define CH_NO_FLAGS 0
56#define CH_UPDATE (1 << 0)
57#define CH_WEED (1 << 1)
58#define CH_DECODE (1 << 2)
59#define CH_XMIT (1 << 3)
60#define CH_FROM (1 << 4)
61#define CH_PREFIX (1 << 5)
62#define CH_NOSTATUS (1 << 6)
63#define CH_REORDER (1 << 7)
64#define CH_NONEWLINE (1 << 8)
65#define CH_MIME (1 << 9)
66#define CH_UPDATE_LEN (1 << 10)
67#define CH_TXTPLAIN (1 << 11)
68#define CH_NOLEN (1 << 12)
69#define CH_WEED_DELIVERED (1 << 13)
70#define CH_FORCE_FROM (1 << 14)
71#define CH_NOQFROM (1 << 15)
72#define CH_UPDATE_IRT (1 << 16)
73#define CH_UPDATE_REFS (1 << 17)
74#define CH_DISPLAY (1 << 18)
75#define CH_UPDATE_LABEL (1 << 19)
76#define CH_UPDATE_SUBJECT (1 << 20)
77#define CH_VIRTUAL (1 << 21)
78
79int mutt_copy_hdr(FILE *fp_in, FILE *fp_out, LOFF_T off_start, LOFF_T off_end, CopyHeaderFlags chflags, const char *prefix, int wraplen);
80
81int mutt_copy_header(FILE *fp_in, struct Email *e, FILE *fp_out, CopyHeaderFlags chflags, const char *prefix, int wraplen);
82
83int mutt_copy_message_fp(FILE *fp_out, FILE *fp_in, struct Email *e, CopyMessageFlags cmflags, CopyHeaderFlags chflags, int wraplen);
84int mutt_copy_message (FILE *fp_out, struct Email *e, struct Message *msg, CopyMessageFlags cmflags, CopyHeaderFlags chflags, int wraplen);
85
86int mutt_append_message(struct Mailbox *m_dst, struct Mailbox *m_src, struct Email *e, struct Message *msg, CopyMessageFlags cmflags, CopyHeaderFlags chflags);
87
88#endif /* MUTT_EMAIL_COPY_EMAIL_H */
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_email.c:432
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_email.c:992
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_email.c:112
int mutt_copy_message(FILE *fp_out, struct Email *e, struct Message *msg, CopyMessageFlags cmflags, CopyHeaderFlags chflags, int wraplen)
Copy a message from a Mailbox.
Definition copy_email.c:917
uint32_t CopyHeaderFlags
Flags for mutt_copy_header(), e.g. CH_UPDATE.
Definition copy_email.h:54
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_email.c:663
uint16_t CopyMessageFlags
Flags for mutt_copy_message(), e.g. MUTT_CM_NOHEADER.
Definition copy_email.h:36
The envelope/body of an email.
Definition email.h:39
A mailbox.
Definition mailbox.h:78
A local copy of an email.
Definition message.h:34