File: HTAlert.h

package info (click to toggle)
cern-httpd 3.0A-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 5,392 kB
  • ctags: 6,554
  • sloc: ansic: 37,902; makefile: 1,746; perl: 535; csh: 167; sh: 143
file content (124 lines) | stat: -rw-r--r-- 3,143 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/*                                                  HTAlert: Handling user messages in libwww
                          DISPLAYING MESSAGES AND GETTING INPUT
                                             
   This module is a part of the CERN WWW Library. It may be overridden for GUI clients. It
   allows progress indications and warning messages to be communicated to the user in a
   portable way.
   
      May 92 Created By C.T. Barker
      
      Feb 93 Portablized etc TBL
      
 */

#include "HTUtils.h"

#ifdef SHORT_NAMES
#define HTPrPass        HTPromptPassword
#define HTPUnAPw        HTPromptUsernameAndPassword
#endif /*SHORT_NAMES*/
/*

Flags for This Module

 */

extern BOOL HTInteractive;                  /* Any prompts from the Library? */
/*

HTPrompt and HTPromptPassword: Display a message and get the input

   HTPromptPassword() doesn't echo reply on the screen.
   
  ON ENTRY,
  
  Msg                     String to be displayed.
                         
  deflt                   If NULL the default value (only for HTPrompt())
                         
  ON EXIT,
  
  Return value            is malloc'd string which must be freed.
                         
 */
                
extern char * HTPrompt PARAMS((CONST char * Msg, CONST char * deflt));
extern char * HTPromptPassword PARAMS((CONST char * Msg));

/*

HTPromptUsernameAndPassword: Get both username and password

  ON ENTRY,
  
  Msg                    String to be displayed.
                         
  username                Pointer to char pointer, i.e. *usernamepoints to a string.  If
                         non-NULL it is taken to be a default value.
                         
  password                Pointer to char pointer, i.e. *passwordpoints to a string.
                         Initial value discarded.
                         
  ON EXIT,
  
  *username               and
                         
  *password               point to newly allocated strings representing the typed-in
                         username and password.  Initial strings pointed to by them are
                         NOT freed!
                         
 */

extern void HTPromptUsernameAndPassword PARAMS((CONST char *    Msg,
                                                char **         username,
                                                char **         password));

/*

Display a message, don't wait for input

  ON ENTRY,
  
  Msg                     String to be displayed.
                         
 */

extern void HTAlert PARAMS((CONST char * Msg));


/*

Display a progress message for information (and diagnostics) only

  ON ENTRY,
  
   The input is a list of parameters for printf.
   
 */
extern void HTProgress PARAMS((CONST char * Msg));


/*

Display a message, then wait for 'yes' or 'no'.

  ON ENTRY,
  
  Msg                     String to be displayed
                         
  ON EXIT,
  
  Returns                 If the user reacts in the affirmative, returns TRUE, returns
                         FALSE otherwise.
                         
 */

extern BOOL HTConfirm PARAMS ((CONST char * Msg));





/*

    */