* Update to version 2.19.5
[alpine.git] / alpine / mailcmd.h
blob7f15d1f62eeb1b380a17c937730379c7b3fd794c
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 int process_cmd(struct pine *, MAILSTREAM *, MSGNO_S *, int, CmdWhere, int *);
67 char *pretty_command(UCS);
68 void bogus_command(UCS, char *);
69 void bogus_utf8_command(char *, char *);
70 int save_prompt(struct pine *, CONTEXT_S **, char *, size_t,
71 char *, ENVELOPE *, long, char *, SaveDel *,
72 SavePreserveOrder *);
73 int create_for_save_prompt(CONTEXT_S *, char *, int);
74 int expunge_prompt(MAILSTREAM *, char *, long);
75 int save_size_changed_prompt(long, int);
76 void expunge_and_close_begins(int, char *);
77 int simple_export(struct pine *, void *, SourceType, char *, char *);
78 int get_export_filename(struct pine *, char *, char *, char *, size_t, char *,
79 char *, ESCKEY_S *, int *, int, int, HISTORY_S **);
80 char *build_updown_cmd(char *, size_t, char *, char *, char*);
81 int bezerk_delimiter(ENVELOPE *, MESSAGECACHE *, gf_io_t, int);
82 long jump_to(MSGNO_S *, int, UCS, SCROLL_S *, CmdWhere);
83 char *broach_folder(int, int, int *, CONTEXT_S **);
84 int ask_mailbox_reopen(struct pine *, int *);
85 void visit_folder(struct pine *, char *, CONTEXT_S *, MAILSTREAM *, unsigned long);
86 int select_by_current(struct pine *, MSGNO_S *, CmdWhere);
87 int apply_command(struct pine *, MAILSTREAM *, MSGNO_S *, UCS, int, int);
88 char **choose_list_of_keywords(void);
89 char *choose_a_charset(int);
90 char **choose_list_of_charsets(void);
91 char *choose_item_from_list(char **, char **, char *, char *, HelpType, char *, char *);
92 int display_folder_list(CONTEXT_S **, char *, int,
93 int (*)(struct pine *, CONTEXT_S **, char *, int));
94 int file_lister(char *, char *, size_t, char *, size_t, int, int);
95 int read_msg_prompt(long, char *);
96 void advance_cur_after_delete(struct pine *, MAILSTREAM *, MSGNO_S *, CmdWhere);
97 void free_list_sel(LIST_SEL_S **);
98 #ifdef _WINDOWS
99 int header_mode_callback(int, long);
100 int zoom_mode_callback(int, long);
101 int any_selected_callback(int, long);
102 int flag_callback(int, long);
103 MPopup *flag_submenu(MESSAGECACHE *);
104 #endif
107 #endif /* PINE_MAILCMD_INCLUDED */