Annotation of libwww/Library/src/HTAlert.html, revision 2.15
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:
2.15 ! frystyk 17: This module may be overridden for GUI clients. It allows progress
2.12 frystyk 18: indications and warning messages to be communicated to the user in a
2.15 ! frystyk 19: portable way using stdio. Yes, I know that not all platforms have
! 20: stdio :-(. It contain two parts:
! 21:
! 22: <UL>
! 23: <LI><A HREF="#Interactive">A User Interactive part</A>
! 24: <LI><A HREF="#NonInteractive">A part for sending messages to the user</A>
! 25: </UL>
2.10 frystyk 26:
2.6 timbl 27: <UL>
28: <LI>May 92 Created By C.T. Barker
29: <LI>Feb 93 Portablized etc TBL
2.15 ! frystyk 30: <LI>Mar 95 Updated by Henrik
2.6 timbl 31: </UL>
2.12 frystyk 32:
33: This module is implemented by <A HREF="HTAlert.c">HTAlert.c</A>, and
34: it is a part of the <A
2.15 ! frystyk 35: HREF="http://www.w3.org/hypertext/WWW/Library/User/Guide/Guide.html">
2.12 frystyk 36: Library of Common Code</A>.
37:
2.11 frystyk 38: <PRE>
2.12 frystyk 39: #ifndef HTALERT_H
40: #define HTALERT_H
2.11 frystyk 41: </PRE>
42:
2.15 ! frystyk 43:
! 44: <A NAME="Interactive"><H2>User Interactive Functions</H2></A>
! 45:
! 46: These functions require the user to interact in some way
! 47:
! 48: <H3>Flags for This Module</H3>
! 49:
! 50: If you really don't want the library to prompt for anything at all
! 51: then enable this constant. The default value is <EM>OFF</EM>. All
! 52: functions returning a <EM>string</EM> return a dynamic string which
! 53: must be freed by the caller.
2.8 luotonen 54:
2.11 frystyk 55: <PRE>
56: extern BOOL HTInteractive; /* Any prompts from the Library? */
2.6 timbl 57: </PRE>
2.11 frystyk 58:
2.15 ! frystyk 59: <H3>Display a message, then wait for 'YES' or 'NO'</H3>
2.11 frystyk 60:
2.15 ! frystyk 61: This function prompts the user for a confirmation on the message
! 62: passed as a parameter. If the user reacts in the affirmative, returns
! 63: <EM>TRUE</EM>, returns <EM>FALSE</EM> otherwise.
2.11 frystyk 64:
2.15 ! frystyk 65: <PRE>
! 66: extern BOOL HTConfirm PARAMS((CONST char * Msg));
! 67: </PRE>
! 68:
! 69: <H3>Prompt the User a Question</H3>
! 70:
! 71: Prompt for answer and get text back. Reply text is either NULL on
! 72: error or a dynamic string which the caller must free.
2.6 timbl 73:
74: <PRE>
1.1 timbl 75: extern char * HTPrompt PARAMS((CONST char * Msg, CONST char * deflt));
2.15 ! frystyk 76: </PRE>
! 77:
! 78: <H3>Prompt for a Password</H3>
! 79:
! 80: Prompt for password without echoing the reply. Reply text is weither
! 81: NULL on error or a dynamic string which the caller must free. <P>
! 82:
! 83: <B>NOTE:</B> The current version uses <EM>getpass</EM> which on many
! 84: systems returns a string of 8 or 16 bytes.
! 85:
! 86: <PRE>
2.7 luotonen 87: extern char * HTPromptPassword PARAMS((CONST char * Msg));
2.15 ! frystyk 88: </PRE>
! 89:
! 90: <H2>Prompt for a UserID and a Password</H2>
! 91:
! 92: This is just a composite function using <EM>HTPrompt</EM> and
! 93: <EM>HTPromptPassword</EM>. The strings returned must be freed by
! 94: caller.
1.1 timbl 95:
2.8 luotonen 96: <PRE>
97: extern void HTPromptUsernameAndPassword PARAMS((CONST char * Msg,
98: char ** username,
99: char ** password));
2.15 ! frystyk 100: </PRE>
1.1 timbl 101:
2.15 ! frystyk 102: <A NAME="NonInteractive"><H2>Messages and Warnings</H2></A>
! 103:
! 104: These functions are used to inform the user of an event which requires
! 105: no response form the user.
! 106:
! 107: <H3>Display a Message</H3>
! 108:
! 109: This function simply puts out the message passed.
2.6 timbl 110:
111: <PRE>
1.1 timbl 112: extern void HTAlert PARAMS((CONST char * Msg));
2.6 timbl 113: </PRE>
114:
2.15 ! frystyk 115: <H3>Display a Status Message on what's going on</H3>
2.6 timbl 116:
2.15 ! frystyk 117: This function can be used to indicate the current status of a certain
! 118: action.
2.6 timbl 119:
120: <PRE>
2.15 ! frystyk 121: extern void HTProgress PARAMS((CONST char * Msg));
2.6 timbl 122:
2.12 frystyk 123: #endif
124: </PRE>
2.6 timbl 125:
2.12 frystyk 126: </BODY>
2.6 timbl 127: </HTML>
Webmaster