1 /** 2 * @file 3 * Manage where the email is piped to external commands 4 * 5 * @authors 6 * Copyright (C) 2018 Richard Russon <rich@flatcap.org> 7 * 8 * @copyright 9 * This program is free software: you can redistribute it and/or modify it under 10 * the terms of the GNU General Public License as published by the Free Software 11 * Foundation, either version 2 of the License, or (at your option) any later 12 * version. 13 * 14 * This program is distributed in the hope that it will be useful, but WITHOUT 15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 16 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 17 * details. 18 * 19 * You should have received a copy of the GNU General Public License along with 20 * this program. If not, see <http://www.gnu.org/licenses/>. 21 */ 22 23 #ifndef MUTT_COMMANDS_H 24 #define MUTT_COMMANDS_H 25 26 #include <stdbool.h> 27 #include <stdio.h> 28 29 struct Body; 30 struct Email; 31 struct EmailList; 32 struct Envelope; 33 struct Mailbox; 34 35 /** 36 * enum MessageTransformOpt - Message transformation option 37 */ 38 enum MessageTransformOpt 39 { 40 TRANSFORM_NONE = 0, ///< No transformation 41 TRANSFORM_DECRYPT, ///< Decrypt message 42 TRANSFORM_DECODE, ///< Decode message 43 }; 44 45 /** 46 * enum MessageSaveOpt - Message save option 47 */ 48 enum MessageSaveOpt 49 { 50 SAVE_COPY = 0, ///< Copy message, making a duplicate in another mailbox 51 SAVE_MOVE, ///< Move message to another mailbox, removing the original 52 }; 53 54 void ci_bounce_message(struct Mailbox *m, struct EmailList *el); 55 void mutt_check_stats(struct Mailbox *m); 56 bool mutt_check_traditional_pgp(struct Mailbox *m, struct EmailList *el); 57 void mutt_commands_cleanup(void); 58 void mutt_display_address(struct Envelope *env); 59 bool mutt_edit_content_type(struct Email *e, struct Body *b, FILE *fp); 60 void mutt_enter_command(void); 61 void mutt_pipe_message(struct Mailbox *m, struct EmailList *el); 62 void mutt_print_message(struct Mailbox *m, struct EmailList *el); 63 int mutt_save_message(struct Mailbox *m, struct EmailList *el, enum MessageSaveOpt, enum MessageTransformOpt transform_opt); 64 int mutt_save_message_ctx(struct Mailbox *m_src, struct Email *e, enum MessageSaveOpt save_opt, enum MessageTransformOpt transform_opt, struct Mailbox *m_dst); 65 bool mutt_select_sort(bool reverse); 66 bool mutt_shell_escape(void); 67 68 #endif /* MUTT_COMMANDS_H */ 69