* Forwarding messages with attachments of content-type multipart,
[alpine.git] / alpine / mailcmd.h
blobd26d321c03c2ddcaa3798fcef7815c7a28eb8710
1 /*
2 * $Id: mailcmd.h 1012 2008-03-26 00:44:22Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2006-2008 University of Washington
6 * Copyright 2013-2014 Eduardo Chappa
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * ========================================================================
17 #ifndef PINE_MAILCMD_INCLUDED
18 #define PINE_MAILCMD_INCLUDED
21 #include <general.h>
22 #include "context.h"
23 #include "mailview.h"
24 #include "radio.h"
25 #include "listsel.h"
26 #include "../pith/mailcmd.h"
27 #include "../pith/mailindx.h"
28 #include "../pith/state.h"
29 #include "../pith/msgno.h"
30 #include "../pith/store.h"
31 #include "../pith/filter.h"
32 #include "../pith/string.h"
33 #include "../pith/hist.h"
36 #define USER_INPUT_TIMEOUT(ps) ((ps->hours_to_timeout > 0) && \
37 ((time(0) - time_of_last_input()) > 60*60*(ps->hours_to_timeout)))
40 #define GE_NONE 0x00 /* get_export_filename flags */
41 #define GE_IS_EXPORT 0x01 /* include EXPORT: in prompt */
42 #define GE_SEQ_SENSITIVE 0x02 /* Sensitive to seq # changes */
43 #define GE_NO_APPEND 0x04 /* No appending to file allowed */
44 #define GE_IS_IMPORT 0x08 /* No writing of file */
45 #define GE_ALLPARTS 0x10 /* Add AllParts toggle to options */
47 #define GER_NONE 0x00 /* get_export_filename return flags */
48 #define GER_OVER 0x01 /* overwrite of existing file */
49 #define GER_APPEND 0x02 /* append of existing file */
50 #define GER_ALLPARTS 0x04 /* AllParts toggle is on */
53 #define CAC_NONE 0x00 /* flags for choose_a_charset */
54 #define CAC_ALL 0x01 /* choose from entire list */
55 #define CAC_POSTING 0x02 /* choose from charsets useful for posting */
56 #define CAC_DISPLAY 0x04 /* choose from charsets useful for display */
59 typedef enum {DontAsk, NoDel, Del, RetNoDel, RetDel} SaveDel;
60 typedef enum {DontAskPreserve, NoPreserve, Preserve, RetNoPreserve, RetPreserve} SavePreserveOrder;
62 typedef enum {View, MsgIndx, ThrdIndx} CmdWhere;
65 /* exported protoypes */
66 void alpine_get_password(char *, char *, size_t);
67 int smime_import_certificate(char *, char *, size_t);
68 int process_cmd(struct pine *, MAILSTREAM *, MSGNO_S *, int, CmdWhere, int *);
69 char *pretty_command(UCS);
70 void bogus_command(UCS, char *);
71 void bogus_utf8_command(char *, char *);
72 int save_prompt(struct pine *, CONTEXT_S **, char *, size_t,
73 char *, ENVELOPE *, long, char *, SaveDel *,
74 SavePreserveOrder *);
75 int create_for_save_prompt(CONTEXT_S *, char *, int);
76 int expunge_prompt(MAILSTREAM *, char *, long);
77 int save_size_changed_prompt(long, int);
78 void expunge_and_close_begins(int, char *);
79 int simple_export(struct pine *, void *, SourceType, char *, char *);
80 int get_export_filename(struct pine *, char *, char *, char *, size_t, char *,
81 char *, ESCKEY_S *, int *, int, int, HISTORY_S **);
82 char *build_updown_cmd(char *, size_t, char *, char *, char*);
83 int bezerk_delimiter(ENVELOPE *, MESSAGECACHE *, gf_io_t, int);
84 long jump_to(MSGNO_S *, int, UCS, SCROLL_S *, CmdWhere);
85 char *broach_folder(int, int, int *, CONTEXT_S **);
86 int ask_mailbox_reopen(struct pine *, int *);
87 void visit_folder(struct pine *, char *, CONTEXT_S *, MAILSTREAM *, unsigned long);
88 int select_by_current(struct pine *, MSGNO_S *, CmdWhere);
89 int apply_command(struct pine *, MAILSTREAM *, MSGNO_S *, UCS, int, int);
90 char **choose_list_of_keywords(void);
91 char *choose_a_charset(int);
92 char **choose_list_of_charsets(void);
93 char *choose_item_from_list(char **, char **, char *, char *, HelpType, char *, char *);
94 int display_folder_list(CONTEXT_S **, char *, int,
95 int (*)(struct pine *, CONTEXT_S **, char *, int));
96 int file_lister(char *, char *, size_t, char *, size_t, int, int);
97 int read_msg_prompt(long, char *);
98 void advance_cur_after_delete(struct pine *, MAILSTREAM *, MSGNO_S *, CmdWhere);
99 void free_list_sel(LIST_SEL_S **);
100 #ifdef _WINDOWS
101 int header_mode_callback(int, long);
102 int zoom_mode_callback(int, long);
103 int any_selected_callback(int, long);
104 int flag_callback(int, long);
105 MPopup *flag_submenu(MESSAGECACHE *);
106 #endif
109 #endif /* PINE_MAILCMD_INCLUDED */