Duplicate the structure of an entire email. More...
#include "config.h"#include <stdint.h>#include <stdio.h>
Include dependency graph for copy_email.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Macros | |
| #define | MUTT_CM_DECODE_CRYPT (MUTT_CM_DECODE_PGP | MUTT_CM_DECODE_SMIME) |
| Combination flag for decoding any kind of cryptography (PGP or S/MIME) | |
Typedefs | |
| typedef uint16_t | CopyMessageFlags |
| typedef uint32_t | CopyHeaderFlags |
Enumerations | |
| enum | CopyMessageFlag { MUTT_CM_NONE = 0 , MUTT_CM_NOHEADER = 1U << 0 , MUTT_CM_PREFIX = 1U << 1 , MUTT_CM_DECODE = 1U << 2 , MUTT_CM_DISPLAY = 1U << 3 , MUTT_CM_UPDATE = 1U << 4 , MUTT_CM_WEED = 1U << 5 , MUTT_CM_CHARCONV = 1U << 6 , MUTT_CM_PRINTING = 1U << 7 , MUTT_CM_REPLYING = 1U << 8 , MUTT_CM_DECODE_PGP = 1U << 9 , MUTT_CM_DECODE_SMIME = 1U << 10 , MUTT_CM_VERIFY = 1U << 11 } |
| Flags for mutt_copy_message(), e.g. More... | |
| enum | CopyHeaderFlag { CH_NONE = 0 , CH_UPDATE = 1U << 0 , CH_WEED = 1U << 1 , CH_DECODE = 1U << 2 , CH_XMIT = 1U << 3 , CH_FROM = 1U << 4 , CH_PREFIX = 1U << 5 , CH_NOSTATUS = 1U << 6 , CH_REORDER = 1U << 7 , CH_NONEWLINE = 1U << 8 , CH_MIME = 1U << 9 , CH_UPDATE_LEN = 1U << 10 , CH_TXTPLAIN = 1U << 11 , CH_NOLEN = 1U << 12 , CH_WEED_DELIVERED = 1U << 13 , CH_FORCE_FROM = 1U << 14 , CH_NOQFROM = 1U << 15 , CH_UPDATE_IRT = 1U << 16 , CH_UPDATE_REFS = 1U << 17 , CH_DISPLAY = 1U << 18 , CH_UPDATE_LABEL = 1U << 19 , CH_UPDATE_SUBJECT = 1U << 20 , CH_VIRTUAL = 1U << 21 } |
| Flags for mutt_copy_header(), e.g. More... | |
Functions | |
| 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. | |
| int | mutt_copy_header (FILE *fp_in, struct Email *e, FILE *fp_out, CopyHeaderFlags chflags, const char *prefix, int wraplen) |
| Copy Email header. | |
| 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. | |
| 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. | |
| 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. | |
Duplicate the structure of an entire email.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file copy_email.h.
| #define MUTT_CM_DECODE_CRYPT (MUTT_CM_DECODE_PGP | MUTT_CM_DECODE_SMIME) |
Combination flag for decoding any kind of cryptography (PGP or S/MIME)
Definition at line 58 of file copy_email.h.
| typedef uint16_t CopyMessageFlags |
Definition at line 55 of file copy_email.h.
| typedef uint32_t CopyHeaderFlags |
Definition at line 89 of file copy_email.h.
| enum CopyMessageFlag |
Flags for mutt_copy_message(), e.g.
Definition at line 39 of file copy_email.h.
| enum CopyHeaderFlag |
Flags for mutt_copy_header(), e.g.
Definition at line 63 of file copy_email.h.
| 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.
| fp_in | FILE pointer to read from |
| fp_out | FILE pointer to write to |
| off_start | Offset to start from |
| off_end | Offset to finish at |
| chflags | Flags, see CopyHeaderFlags |
| prefix | Prefix for quoting headers |
| wraplen | Width to wrap at (when chflags & CH_DISPLAY) |
| 0 | Success |
| -1 | Failure |
Ok, the only reason for not merging this with mutt_copy_header() below is to avoid creating a Email structure in message_handler(). Also, this one will wrap headers much more aggressively than the other one.
Definition at line 112 of file copy_email.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int mutt_copy_header | ( | FILE * | fp_in, |
| struct Email * | e, | ||
| FILE * | fp_out, | ||
| CopyHeaderFlags | chflags, | ||
| const char * | prefix, | ||
| int | wraplen ) |
Copy Email header.
| fp_in | FILE pointer to read from |
| e | |
| fp_out | FILE pointer to write to |
| chflags | See CopyHeaderFlags |
| prefix | Prefix for quoting headers (if CH_PREFIX is set) |
| wraplen | Width to wrap at (when chflags & CH_DISPLAY) |
| 0 | Success |
| -1 | Failure |
Definition at line 432 of file copy_email.c.
Here is the call graph for this function:
Here is the caller graph for this function:| 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.
| fp_out | Where to write output |
| fp_in | Where to get input |
| e | Email being copied |
| cmflags | Flags, see CopyMessageFlags |
| chflags | Flags, see CopyHeaderFlags |
| wraplen | Width to wrap at (when chflags & CH_DISPLAY) |
| 0 | Success |
| -1 | Failure |
Definition at line 663 of file copy_email.c.
Here is the call graph for this function:
Here is the caller graph for this function:| 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.
| fp_out | FILE pointer to write to |
| e | |
| msg | Message |
| cmflags | Flags, see CopyMessageFlags |
| chflags | Flags, see CopyHeaderFlags |
| wraplen | Width to wrap at (when chflags & CH_DISPLAY) |
| 0 | Success |
| -1 | Failure |
should be made to return -1 on fatal errors, and 1 on non-fatal errors like partial decode, where it is worth displaying as much as possible
Definition at line 920 of file copy_email.c.
Here is the call graph for this function:
Here is the caller graph for this function:| 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.
| m_dst | Destination Mailbox |
| m_src | Source Mailbox |
| e | |
| msg | Message |
| cmflags | Flags, see CopyMessageFlags |
| chflags | Flags, see CopyHeaderFlags |
| 0 | Success |
| -1 | Failure |
Definition at line 995 of file copy_email.c.
Here is the call graph for this function:
Here is the caller graph for this function: