]> granicus.if.org Git - neomutt/blob - protos.h
Fix mutt_write_mime_body() application/pgp-encrypted handling
[neomutt] / protos.h
1 /**
2  * @file
3  * Prototypes for many functions
4  *
5  * @authors
6  * Copyright (C) 1996-2000,2007,2010,2013 Michael R. Elkins <me@mutt.org>
7  * Copyright (C) 2013 Karel Zak <kzak@redhat.com>
8  *
9  * @copyright
10  * This program is free software: you can redistribute it and/or modify it under
11  * the terms of the GNU General Public License as published by the Free Software
12  * Foundation, either version 2 of the License, or (at your option) any later
13  * version.
14  *
15  * This program is distributed in the hope that it will be useful, but WITHOUT
16  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
18  * details.
19  *
20  * You should have received a copy of the GNU General Public License along with
21  * this program.  If not, see <http://www.gnu.org/licenses/>.
22  */
23
24 #ifndef MUTT_PROTOS_H
25 #define MUTT_PROTOS_H
26
27 #include "config.h"
28 #include <stddef.h>
29 #include <regex.h>
30 #include <stdbool.h>
31 #include <stdio.h>
32 #include "mutt.h"
33 #include "keymap.h"
34 #include "ncrypt/ncrypt.h"
35
36 struct Context;
37 struct Email;
38 struct EmailList;
39 struct EnterState;
40 struct Mailbox;
41 struct NotifyCallback;
42
43 /**
44  * enum XdgType - XDG variable types
45  */
46 enum XdgType
47 {
48   XDG_CONFIG_HOME, ///< XDG home dir: ~/.config
49   XDG_CONFIG_DIRS, ///< XDG system dir: /etc/xdg
50 };
51
52 /**
53  * enum EvMessage - Edit or View a message
54  */
55 enum EvMessage
56 {
57   EVM_VIEW, ///< View the message
58   EVM_EDIT, ///< Edit the message
59 };
60
61 int mutt_ev_message(struct Mailbox *m, struct EmailList *el, enum EvMessage action);
62
63 int mutt_system(const char *cmd);
64
65 int mutt_set_xdg_path(enum XdgType type, char *buf, size_t bufsize);
66 void mutt_help(enum MenuType menu);
67 void mutt_make_help(char *d, size_t dlen, const char *txt, enum MenuType menu, int op);
68 void mutt_set_flag_update(struct Mailbox *m, struct Email *e, int flag, bool bf, bool upd_mbox);
69 #define mutt_set_flag(m, e, flag, bf) mutt_set_flag_update(m, e, flag, bf, true)
70 void mutt_signal_init(void);
71 void mutt_emails_set_flag(struct Mailbox *m, struct EmailList *el, int flag, bool bf);
72 int mutt_change_flag(struct Mailbox *m, struct EmailList *el, bool bf);
73
74 int mutt_complete(char *buf, size_t buflen);
75 int mutt_prepare_template(FILE *fp, struct Mailbox *m, struct Email *e_new, struct Email *e, bool resend);
76 int mutt_enter_string(char *buf, size_t buflen, int col, CompletionFlags flags);
77 int mutt_enter_string_full(char *buf, size_t buflen, int col, CompletionFlags flags, bool multiple,
78                            char ***files, int *numfiles, struct EnterState *state);
79 int mutt_get_postponed(struct Context *ctx, struct Email *hdr, struct Email **cur, char *fcc, size_t fcclen);
80 SecurityFlags mutt_parse_crypt_hdr(const char *p, bool set_empty_signas, SecurityFlags crypt_app);
81 int mutt_num_postponed(struct Mailbox *m, bool force);
82 int mutt_thread_set_flag(struct Email *e, int flag, bool bf, bool subthread);
83 void mutt_update_num_postponed(void);
84 int mutt_is_quote_line(char *buf, regmatch_t *pmatch);
85
86 #ifndef HAVE_WCSCASECMP
87 int wcscasecmp(const wchar_t *a, const wchar_t *b);
88 #endif
89
90 int mutt_reply_observer(struct NotifyCallback *nc);
91
92 #endif /* MUTT_PROTOS_H */