* NTLM authentication support with the ntlm library, in Unix systems.
[alpine.git] / pith / options.h
blob9d92ba71a9f7a7c4f590715034d578ec306afc16
1 /*
2 * $Id: options.h 101 2006-08-10 22:53:04Z mikes@u.washington.edu $
4 * ========================================================================
5 * Copyright 2013-2017 Eduardo Chappa
6 * Copyright 2006-2008 University of Washington
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 PITH_OPTIONS_INCLUDED
18 #define PITH_OPTIONS_INCLUDED
21 * function hooks to fill in optional/user-selectable behaviors in pith functions
23 * You'll find a very brief explanation of what they do here, but you'll need to
24 * look at the places they're called to fully understand how they're intended to
25 * be called and what they're intended to provide.
29 #include "indxtype.h" /* for ICE_S */
30 #include "thread.h" /* for PINETHRD_S */
31 #include "handle.h" /* for HANDLE_S */
32 #include "filttype.h" /* for gf_io_t */
33 #include "state.h" /* for struct pine */
34 #include "adrbklib.h" /* for SAVE_STATE_S */
35 #ifdef ENABLE_LDAP
36 #include "ldap.h"
37 #endif
41 * optional call in mailindx.c:{from,subject}_str to shrink thread
42 * relationship cue if desired
44 extern int (*pith_opt_condense_thread_cue)(PINETHRD_S *, ICE_S *, char **, size_t *, int, int);
48 * optional call in mailindx.c:setup_header_widths to save various bits
49 * of format state
51 extern void (*pith_opt_save_index_state)(int);
55 * optional call in mailindx.c:load_overview to paint the gathered overview data
56 * on the display
58 extern void (*pith_opt_paint_index_hline)(MAILSTREAM *, long, ICE_S *);
61 * optional hook in mailview.c:format_message to allow for inserting an
62 * [editorial commment] in message text to indicate the message contains
63 * list-management pointers
65 extern int (*pith_opt_rfc2369_editorial)(long, HANDLE_S **, int, int, gf_io_t);
67 #ifdef ENABLE_LDAP
69 * optional hook in ldap.c:wp_lookups to ask user where to save chosen LDAP result
71 extern void (*pith_opt_save_ldap_entry)(struct pine *, LDAP_CHOOSE_S *, int);
72 #endif
75 * optional hook in addrbook.c:bunch-of-funcs to allow saving/restoring
76 * state (screen state and such) before and after calls that might be
77 * reentered
79 extern void (*pith_opt_save_and_restore)(int, SAVE_STATE_S *);
82 * optional hooks in newmail.c:new_mail to allow for various indicators
83 * during the new mail check/arrival and checkpoint process
85 extern void (*pith_opt_newmail_announce)(MAILSTREAM *, long, long);
86 extern void (*pith_opt_newmail_check_cue)(int);
87 extern void (*pith_opt_checkpoint_cue)(int);
88 extern void (*pith_opt_icon_text)(char *, int);
91 * optional hook in remote.c to provide name for storing address book
92 * metadata
94 extern char *(*pith_opt_rd_metadata_name)(void);
97 * optional hook in conf.c:read_pinerc to let caller deal with hard
98 * unreadable remote config file error
99 * Return TRUE to continue, FALSE otherwise
101 extern int (*pith_opt_remote_pinerc_failure)(void);
104 * optional hook in mailcmd.c:do_broach_folder allowing for user prompt
105 * of closed folder open.
106 * Return -1 on cancel, zero otherwise. Set second arg by reference
107 * to TRUE for reopen.
109 extern int (*pith_opt_reopen_folder)(struct pine *, int *);
112 * optional call in mailcmd.c:expunge_and_close to prompt for read message removal
114 extern int (*pith_opt_read_msg_prompt)(long, char *);
117 * optional hook in mailcmd.c:expunge_and_close to prompt for expunge
118 * confirmation. Return 'y' to expunge/delete. Do not allow cancel.
120 extern int (*pith_opt_expunge_prompt)(MAILSTREAM *, char *, long);
123 * optional hook in mailcmd.c:expunge_and_close called when a folder is
124 * about to be closed and expunged. Flags passed to expunge_and_close are
125 * in turn passed in this call.
127 extern void (*pith_opt_begin_closing)(int, char *);
130 * optional hook in reply.c:reply_harvet to allow for user selection
131 * of reply-to vs. from address
132 * Return 'y' to use "reply-to" field.
134 extern int (*pith_opt_replyto_prompt)(void);
138 * optional hook in reply.c:reply_harvet to allow for user choice
139 * of reply to all vs just sender
140 * Return -1 to cancel reply altogether, set reply flag by reference
142 extern int (*pith_opt_reply_to_all_prompt)(int *);
146 * optional hook in save.c:create_for_save to allow for user confirmation
147 * of folder being created.
148 * Return: 1 for proceed, -1 for decline, 0 for error
150 extern int (*pith_opt_save_create_prompt)(CONTEXT_S *, char *, int);
154 * optional hook in send.c:check_addresses to allow for user confirmation
155 * of sending to MAILER-DAEMON
157 extern int (*pith_opt_daemon_confirm)(void);
161 * optional hook in save.c to prompt for permission to continue save
162 * in spite of size error. Return 'y' to continue or 'a' to answer
163 * yes to all until next reinitialization of the function.
165 extern int (*pith_opt_save_size_changed_prompt)(long, int);
169 * optional hook to process filter patterns using external command
170 * on message contents
172 extern void (*pith_opt_filter_pattern_cmd)(char **, SEARCHSET *, MAILSTREAM *, long, INTVL_S *);
176 * Hook to read signature from local file
178 extern char *(*pith_opt_get_signature_file)(char *, int, int, int);
182 * Hook to make variable names pretty in help text
184 extern char *(*pith_opt_pretty_var_name)(char *);
188 * Hook to make feature names pretty in help text
190 extern char *(*pith_opt_pretty_feature_name)(char *, int);
194 * optional hook in mailindx.c:{from,subject}_str to cause the returned
195 * string to be truncated at the formatted width. 1 truncates.
196 * This is useful because the truncated string ends slightly
197 * differently than it would if it weren't truncated, for
198 * example it might end ... or something like that.
200 extern int (*pith_opt_truncate_sfstr)(void);
204 * A stream is being closed. If there is something in the
205 * application that needs to react to that handle it here.
207 extern void (*pith_opt_closing_stream)(MAILSTREAM *);
211 * Callback from mm_expunged to let us know the "current"
212 * message was expunged
214 extern void (*pith_opt_current_expunged)(long unsigned int);
217 * Option User-Agent Header Prefix
219 extern char *(*pith_opt_user_agent_prefix)(void);
223 * optional call to prompt for S/MIME passphase
225 extern int (*pith_opt_smime_get_passphrase)(void);
228 * Required call to interface for input of file to import.
230 extern int (*pith_smime_import_certificate)(char *, char *, char *, size_t);
233 * Required call to ask user to enter a password, with a given char * prompt
235 extern int (*pith_smime_enter_password)(char *, char *, size_t);
238 * required call to ask the user to confirm to save a certificate in the
239 * store
241 extern int (*pith_smime_confirm_save)(char *);
243 #endif /* PITH_OPTIONS_INCLUDED */