Annotation of libwww/Library/src/HTAlert.html, revision 2.13
2.6 timbl 1: <HTML>
2: <HEAD>
2.12 frystyk 3: <TITLE>Handling user messages in libwww</TITLE>
2.6 timbl 4: <NEXTID N="z3">
5: </HEAD>
6: <BODY>
2.12 frystyk 7:
2.10 frystyk 8: <H1>Displaying Messages and Getting Input</H1>
9:
2.12 frystyk 10: <PRE>
11: /*
12: ** (c) COPYRIGHT CERN 1994.
13: ** Please first read the full copyright statement in the file COPYRIGH.
14: */
15: </PRE>
16:
17: This modue may be overridden for GUI clients. It allows progress
18: indications and warning messages to be communicated to the user in a
19: portable way.
2.10 frystyk 20:
2.6 timbl 21: <UL>
22: <LI>May 92 Created By C.T. Barker
23: <LI>Feb 93 Portablized etc TBL
24: </UL>
2.12 frystyk 25:
26: This module is implemented by <A HREF="HTAlert.c">HTAlert.c</A>, and
27: it is a part of the <A
28: HREF="http://info.cern.ch/hypertext/WWW/Library/User/Guide/Guide.html">
29: Library of Common Code</A>.
30:
2.11 frystyk 31: <PRE>
2.12 frystyk 32: #ifndef HTALERT_H
33: #define HTALERT_H
2.13 ! roeber 34:
! 35: #include "sysdep.h"
2.11 frystyk 36: #include <A NAME="z1" HREF="HTUtils.html">"HTUtils.h"</A>
2.6 timbl 37:
2.8 luotonen 38: #ifdef SHORT_NAMES
39: #define HTPrPass HTPromptPassword
40: #define HTPUnAPw HTPromptUsernameAndPassword
41: #endif /*SHORT_NAMES*/
2.11 frystyk 42: </PRE>
43:
44: <H2>Flags for This Module</H2>
2.8 luotonen 45:
2.11 frystyk 46: <PRE>
47: extern BOOL HTInteractive; /* Any prompts from the Library? */
2.6 timbl 48: </PRE>
2.11 frystyk 49:
50: <H2>HTPrompt and HTPromptPassword: Display a message and get the
51: input</H2>
52:
53: HTPromptPassword() doesn't echo reply on the screen.
54:
2.6 timbl 55: <H3>On entry,</H3>
56: <DL>
57: <DT>Msg
58: <DD> String to be displayed.
2.7 luotonen 59: <DT>deflt
2.9 timbl 60: <DD> If NULL the default value (only
61: for HTPrompt())
2.6 timbl 62: </DL>
63:
64: <H3>On exit,</H3>
65: <DL>
66: <DT>Return value
67: <DD> is malloc'd string which
68: must be freed.
69: </DL>
70:
71: <PRE>
1.1 timbl 72: extern char * HTPrompt PARAMS((CONST char * Msg, CONST char * deflt));
2.7 luotonen 73: extern char * HTPromptPassword PARAMS((CONST char * Msg));
1.1 timbl 74:
2.8 luotonen 75: </PRE>
76: <H2>HTPromptUsernameAndPassword: Get both username and password</H2>
77: <H3>On entry,</H3>
78: <DL>
79: <DT>Msg<DD>String to be displayed.
80: <DT>username<DD> Pointer to char pointer, i.e. <CODE>*username</CODE>
81: points to a string. If non-NULL it is taken to be a default value.
82: <DT>password<DD> Pointer to char pointer, i.e. <CODE>*password</CODE>
83: points to a string. Initial value discarded.
84: </DL>
85: <H3>On exit,</H3>
86: <DL>
87: <DT>*username<DD> and
88: <DT>*password<DD> point to newly allocated strings representing
89: the typed-in username and password. Initial strings pointed to
90: by them are NOT freed!
91: </DL>
92: <PRE>
93: extern void HTPromptUsernameAndPassword PARAMS((CONST char * Msg,
94: char ** username,
95: char ** password));
1.1 timbl 96:
2.6 timbl 97: </PRE>
98: <H2>Display a message, don't wait for
99: input</H2>
100: <H3>On entry,</H3>
101: <DL>
102: <DT>Msg
103: <DD> String to be displayed.
104: </DL>
105:
106: <PRE>
1.1 timbl 107: extern void HTAlert PARAMS((CONST char * Msg));
108:
109:
2.6 timbl 110: </PRE>
111: <H2>Display a progress message for information
112: (and diagnostics) only</H2>
113: <H3>On entry,</H3>The input is a list of parameters
114: for printf.
115: <PRE>extern void HTProgress PARAMS((CONST char * Msg));
116:
117:
118: </PRE>
119: <H2>Display a message, then wait for
120: 'yes' or 'no'.</H2>
121: <H3>On entry,</H3>
122: <DL>
123: <DT>Msg
124: <DD> String to be displayed
125: </DL>
126:
127: <H3>On exit,</H3>
128: <DL>
129: <DT>Returns
130: <DD> If the user reacts in the
131: affirmative, returns TRUE, returns
132: FALSE otherwise.
133: </DL>
134:
135: <PRE>
1.1 timbl 136: extern BOOL HTConfirm PARAMS ((CONST char * Msg));
2.6 timbl 137:
2.12 frystyk 138: #endif
139: </PRE>
2.6 timbl 140:
2.12 frystyk 141: </BODY>
2.6 timbl 142: </HTML>
Webmaster