NeoMutt  2024-11-14-138-ge5ca67
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
copy.h
Go to the documentation of this file.
1
25#ifndef MUTT_COPY_H
26#define MUTT_COPY_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#define MUTT_CM_DECODE_CRYPT (MUTT_CM_DECODE_PGP | MUTT_CM_DECODE_SMIME)
51
52typedef uint32_t CopyHeaderFlags;
53#define CH_NO_FLAGS 0
54#define CH_UPDATE (1 << 0)
55#define CH_WEED (1 << 1)
56#define CH_DECODE (1 << 2)
57#define CH_XMIT (1 << 3)
58#define CH_FROM (1 << 4)
59#define CH_PREFIX (1 << 5)
60#define CH_NOSTATUS (1 << 6)
61#define CH_REORDER (1 << 7)
62#define CH_NONEWLINE (1 << 8)
63#define CH_MIME (1 << 9)
64#define CH_UPDATE_LEN (1 << 10)
65#define CH_TXTPLAIN (1 << 11)
66#define CH_NOLEN (1 << 12)
67#define CH_WEED_DELIVERED (1 << 13)
68#define CH_FORCE_FROM (1 << 14)
69#define CH_NOQFROM (1 << 15)
70#define CH_UPDATE_IRT (1 << 16)
71#define CH_UPDATE_REFS (1 << 17)
72#define CH_DISPLAY (1 << 18)
73#define CH_UPDATE_LABEL (1 << 19)
74#define CH_UPDATE_SUBJECT (1 << 20)
75#define CH_VIRTUAL (1 << 21)
76
77int mutt_copy_hdr(FILE *fp_in, FILE *fp_out, LOFF_T off_start, LOFF_T off_end, CopyHeaderFlags chflags, const char *prefix, int wraplen);
78
79int mutt_copy_header(FILE *fp_in, struct Email *e, FILE *fp_out, CopyHeaderFlags chflags, const char *prefix, int wraplen);
80
81int mutt_copy_message_fp(FILE *fp_out, FILE *fp_in, struct Email *e, CopyMessageFlags cmflags, CopyHeaderFlags chflags, int wraplen);
82int mutt_copy_message (FILE *fp_out, struct Email *e, struct Message *msg, CopyMessageFlags cmflags, CopyHeaderFlags chflags, int wraplen);
83
84int mutt_append_message(struct Mailbox *m_dst, struct Mailbox *m_src, struct Email *e, struct Message *msg, CopyMessageFlags cmflags, CopyHeaderFlags chflags);
85
86#endif /* MUTT_COPY_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.c:424
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:981
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:107
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.c:906
uint32_t CopyHeaderFlags
Flags for mutt_copy_header(), e.g. CH_UPDATE.
Definition: copy.h:52
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:652
uint16_t CopyMessageFlags
Flags for mutt_copy_message(), e.g. MUTT_CM_NOHEADER.
Definition: copy.h:36
The envelope/body of an email.
Definition: email.h:39
A mailbox.
Definition: mailbox.h:79
A local copy of an email.
Definition: message.h:34