Annotation of libwww/Library/src/HTAlert.html, revision 2.9

2.6       timbl       1: <HTML>
                      2: <HEAD>
2.9     ! timbl       3: <TITLE>HTAlert: Handling user messages in libwww</TITLE>
2.6       timbl       4: <NEXTID N="z3">
                      5: </HEAD>
                      6: <BODY>
                      7: <H1>Displaying messages and getting input
                      8: for <A
                      9: NAME="z0" HREF="Overview.html">WWW Library</A></H1>This module may be overridden for
                     10: GUI clients.    It allows progress
                     11: indications and warning messages
                     12: to be communicated to the user in
                     13: a portable way.  It should be used
                     14: for this purpose throughout the library
                     15: but isn't yet (July 93)
                     16: <UL>
                     17: <LI>May 92 Created By C.T. Barker
                     18: <LI>Feb 93 Portablized etc TBL
                     19: </UL>
                     20: <PRE>#include <A
                     21: NAME="z1" HREF="HTUtils.html">"HTUtils.h"</A>
                     22: #include <A
                     23: NAME="z2" HREF="tcp.html">"tcp.h"</A>
                     24: 
2.8       luotonen   25: #ifdef SHORT_NAMES
                     26: #define HTPrPass       HTPromptPassword
                     27: #define HTPUnAPw       HTPromptUsernameAndPassword
                     28: #endif /*SHORT_NAMES*/
                     29: 
2.6       timbl      30: </PRE>
2.9     ! timbl      31: <H2>HTPrompt and HTPromptPassword: Display
        !            32: a message and get the input</H2>HTPromptPassword() doesn't echo reply
        !            33: on the screen.
2.6       timbl      34: <H3>On entry,</H3>
                     35: <DL>
                     36: <DT>Msg
                     37: <DD> String to be displayed.
2.7       luotonen   38: <DT>deflt
2.9     ! timbl      39: <DD> If NULL the default value (only
        !            40: for HTPrompt())
2.6       timbl      41: </DL>
                     42: 
                     43: <H3>On exit,</H3>
                     44: <DL>
                     45: <DT>Return value
                     46: <DD> is malloc'd string which
                     47: must be freed.
                     48: </DL>
                     49: 
                     50: <PRE>          
1.1       timbl      51: extern char * HTPrompt PARAMS((CONST char * Msg, CONST char * deflt));
2.7       luotonen   52: extern char * HTPromptPassword PARAMS((CONST char * Msg));
1.1       timbl      53: 
2.8       luotonen   54: </PRE>
                     55: <H2>HTPromptUsernameAndPassword: Get both username and password</H2>
                     56: <H3>On entry,</H3>
                     57: <DL>
                     58: <DT>Msg<DD>String to be displayed.
                     59: <DT>username<DD> Pointer to char pointer, i.e. <CODE>*username</CODE>
                     60: points to a string.  If non-NULL it is taken to be a default value.
                     61: <DT>password<DD> Pointer to char pointer, i.e. <CODE>*password</CODE>
                     62: points to a string.  Initial value discarded.
                     63: </DL>
                     64: <H3>On exit,</H3>
                     65: <DL>
                     66: <DT>*username<DD> and
                     67: <DT>*password<DD> point to newly allocated strings representing
                     68: the typed-in username and password.  Initial strings pointed to
                     69: by them are NOT freed!
                     70: </DL>
                     71: <PRE>
                     72: extern void HTPromptUsernameAndPassword PARAMS((CONST char *   Msg,
                     73:                                                char **         username,
                     74:                                                char **         password));
1.1       timbl      75: 
2.6       timbl      76: </PRE>
                     77: <H2>Display a message, don't wait for
                     78: input</H2>
                     79: <H3>On entry,</H3>
                     80: <DL>
                     81: <DT>Msg
                     82: <DD> String to be displayed.
                     83: </DL>
                     84: 
                     85: <PRE>
1.1       timbl      86: extern void HTAlert PARAMS((CONST char * Msg));
                     87: 
                     88: 
2.6       timbl      89: </PRE>
                     90: <H2>Display a progress message for information
                     91: (and diagnostics) only</H2>
                     92: <H3>On entry,</H3>The input is a list of parameters
                     93: for printf.
                     94: <PRE>extern void HTProgress PARAMS((CONST char * Msg));
                     95: 
                     96: 
                     97: </PRE>
                     98: <H2>Display a message, then wait for
                     99: 'yes' or 'no'.</H2>
                    100: <H3>On entry,</H3>
                    101: <DL>
                    102: <DT>Msg
                    103: <DD> String to be displayed
                    104: </DL>
                    105: 
                    106: <H3>On exit,</H3>
                    107: <DL>
                    108: <DT>Returns
                    109: <DD> If the user reacts in the
                    110: affirmative, returns TRUE, returns
                    111: FALSE otherwise.
                    112: </DL>
                    113: 
                    114: <PRE>
1.1       timbl     115: extern BOOL HTConfirm PARAMS ((CONST char * Msg));
2.6       timbl     116: 
                    117: 
                    118: 
                    119: 
2.9     ! timbl     120: 
        !           121: </A></PRE></BODY>
2.6       timbl     122: </HTML>

Webmaster