1
/* Displaying messages and getting input for WWW Library
2
** =====================================================
4
** May 92 Created By C.T. Barker
5
** Feb 93 Portablized etc TBL
13
#define ALERT_PREFIX_LEN 5
15
/* Display a message and get the input
18
** Msg is the message.
21
** Return value is malloc'd string which must be freed.
23
extern char * HTPrompt PARAMS((CONST char * Msg, CONST char * deflt));
26
/* Display a message, don't wait for input
29
** The input is a list of parameters for printf.
31
extern void HTAlert PARAMS((CONST char * Msg));
32
extern void HTAlwaysAlert PARAMS((CONST char * extra_prefix, CONST char * Msg));
33
extern void HTInfoMsg PARAMS((CONST char * Msg));
34
extern void HTUserMsg PARAMS((CONST char * Msg));
35
extern void HTUserMsg2 PARAMS((CONST char * Msg, CONST char * Arg));
38
/* Display a progress message for information (and diagnostics) only
41
** The input is a list of parameters for printf.
43
extern CONST char *HTProgressUnits PARAMS((int kilobytes));
44
extern void HTProgress PARAMS((CONST char * Msg));
45
extern void HTReadProgress PARAMS((long bytes, long total));
46
#define _HTProgress(msg) mustshow = TRUE, HTProgress(msg)
49
* Indicates whether last HTConfirm was cancelled (^G or ^C) and
50
* resets flag. (so only call once!) - kw
52
extern BOOL HTLastConfirmCancelled NOPARAMS;
55
** Supports logic for forced yes/no prompt results.
57
extern int HTForcedPrompt PARAMS((int Opt, CONST char * Msg, int Dft));
59
/* Display a message, then wait for 'yes' or 'no', allowing default
60
** response if a return or left-arrow is used.
63
** Takes a list of parameters for printf.
66
** If the user enters 'YES', returns TRUE, returns FALSE
69
extern int HTConfirmDefault PARAMS ((CONST char * Msg, int Dft));
72
/* Display a message, then wait for 'yes' or 'no'.
75
** Takes a list of parameters for printf.
78
** If the user enters 'YES', returns TRUE, returns FALSE
81
extern BOOL HTConfirm PARAMS ((CONST char * Msg));
83
extern BOOL confirm_post_resub PARAMS((
89
/* Prompt for password without echoing the reply
91
extern char * HTPromptPassword PARAMS((CONST char * Msg));
93
/* Prompt both username and password HTPromptUsernameAndPassword()
94
** ---------------------------------
96
** Msg is the prompting message.
98
** *password are char pointers; they are changed
99
** to point to result strings.
100
** IsProxy should be TRUE if this is for
101
** proxy authentication.
103
** If *username is not NULL, it is taken
104
** to point to a default value.
105
** Initial value of *password is
106
** completely discarded.
109
** *username and *password point to newly allocated
110
** strings -- original strings pointed to by them
114
extern void HTPromptUsernameAndPassword PARAMS((
121
/* Confirm a cookie operation. HTConfirmCookie()
122
** ---------------------------
125
** server is the server sending the Set-Cookie.
126
** domain is the domain of the cookie.
127
** path is the path of the cookie.
128
** name is the name of the cookie.
129
** value is the value of the cookie.
132
** Returns FALSE on cancel,
133
** TRUE if the cookie should be set.
135
extern BOOL HTConfirmCookie PARAMS((
139
CONST char * value));
142
/* Confirm redirection of POST. HTConfirmPostRedirect()
143
** ----------------------------
145
** Redirecting_url is the Location.
146
** server_status is the server status code.
149
** Returns 0 on cancel,
150
** 1 for redirect of POST with content,
151
** 303 for redirect as GET without content
153
extern int HTConfirmPostRedirect PARAMS((
154
CONST char * Redirecting_url,
158
extern void LYSleepAlert NOPARAMS;
159
extern void LYSleepDebug NOPARAMS;
160
extern void LYSleepInfo NOPARAMS;
161
extern void LYSleepMsg NOPARAMS;
162
extern void LYSleepReplay NOPARAMS;
165
#define LYStrerror strerror
167
extern char *LYStrerror PARAMS((
169
#endif /* HAVE_STRERROR */
171
#endif /* HTALERT_H */