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

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.11      frystyk    34: #include <A NAME="z1" HREF="HTUtils.html">"HTUtils.h"</A>
2.6       timbl      35: 
2.8       luotonen   36: #ifdef SHORT_NAMES
                     37: #define HTPrPass       HTPromptPassword
                     38: #define HTPUnAPw       HTPromptUsernameAndPassword
                     39: #endif /*SHORT_NAMES*/
2.11      frystyk    40: </PRE>
                     41: 
                     42: <H2>Flags for This Module</H2>
2.8       luotonen   43: 
2.11      frystyk    44: <PRE>
                     45: extern BOOL HTInteractive;                 /* Any prompts from the Library? */
2.6       timbl      46: </PRE>
2.11      frystyk    47: 
                     48: <H2>HTPrompt and HTPromptPassword: Display a message and get the
                     49: input</H2>
                     50: 
                     51: HTPromptPassword() doesn't echo reply on the screen.
                     52: 
2.6       timbl      53: <H3>On entry,</H3>
                     54: <DL>
                     55: <DT>Msg
                     56: <DD> String to be displayed.
2.7       luotonen   57: <DT>deflt
2.9       timbl      58: <DD> If NULL the default value (only
                     59: for HTPrompt())
2.6       timbl      60: </DL>
                     61: 
                     62: <H3>On exit,</H3>
                     63: <DL>
                     64: <DT>Return value
                     65: <DD> is malloc'd string which
                     66: must be freed.
                     67: </DL>
                     68: 
                     69: <PRE>          
1.1       timbl      70: extern char * HTPrompt PARAMS((CONST char * Msg, CONST char * deflt));
2.7       luotonen   71: extern char * HTPromptPassword PARAMS((CONST char * Msg));
1.1       timbl      72: 
2.8       luotonen   73: </PRE>
                     74: <H2>HTPromptUsernameAndPassword: Get both username and password</H2>
                     75: <H3>On entry,</H3>
                     76: <DL>
                     77: <DT>Msg<DD>String to be displayed.
                     78: <DT>username<DD> Pointer to char pointer, i.e. <CODE>*username</CODE>
                     79: points to a string.  If non-NULL it is taken to be a default value.
                     80: <DT>password<DD> Pointer to char pointer, i.e. <CODE>*password</CODE>
                     81: points to a string.  Initial value discarded.
                     82: </DL>
                     83: <H3>On exit,</H3>
                     84: <DL>
                     85: <DT>*username<DD> and
                     86: <DT>*password<DD> point to newly allocated strings representing
                     87: the typed-in username and password.  Initial strings pointed to
                     88: by them are NOT freed!
                     89: </DL>
                     90: <PRE>
                     91: extern void HTPromptUsernameAndPassword PARAMS((CONST char *   Msg,
                     92:                                                char **         username,
                     93:                                                char **         password));
1.1       timbl      94: 
2.6       timbl      95: </PRE>
                     96: <H2>Display a message, don't wait for
                     97: input</H2>
                     98: <H3>On entry,</H3>
                     99: <DL>
                    100: <DT>Msg
                    101: <DD> String to be displayed.
                    102: </DL>
                    103: 
                    104: <PRE>
1.1       timbl     105: extern void HTAlert PARAMS((CONST char * Msg));
                    106: 
                    107: 
2.6       timbl     108: </PRE>
                    109: <H2>Display a progress message for information
                    110: (and diagnostics) only</H2>
                    111: <H3>On entry,</H3>The input is a list of parameters
                    112: for printf.
                    113: <PRE>extern void HTProgress PARAMS((CONST char * Msg));
                    114: 
                    115: 
                    116: </PRE>
                    117: <H2>Display a message, then wait for
                    118: 'yes' or 'no'.</H2>
                    119: <H3>On entry,</H3>
                    120: <DL>
                    121: <DT>Msg
                    122: <DD> String to be displayed
                    123: </DL>
                    124: 
                    125: <H3>On exit,</H3>
                    126: <DL>
                    127: <DT>Returns
                    128: <DD> If the user reacts in the
                    129: affirmative, returns TRUE, returns
                    130: FALSE otherwise.
                    131: </DL>
                    132: 
                    133: <PRE>
1.1       timbl     134: extern BOOL HTConfirm PARAMS ((CONST char * Msg));
2.6       timbl     135: 
2.12    ! frystyk   136: #endif
        !           137: </PRE>
2.6       timbl     138: 
2.12    ! frystyk   139: </BODY>
2.6       timbl     140: </HTML>

Webmaster