Annotation of libwww/Library/src/HTDialog.html, revision 2.1
2.1 ! frystyk 1: <HTML>
! 2: <HEAD>
! 3: <TITLE>MESSAGES AND DIALOGS</TITLE>
! 4: <!-- Changed by: Henrik Frystyk Nielsen, 17-Nov-1995 -->
! 5: <NEXTID N="z11">
! 6: </HEAD>
! 7: <BODY>
! 8:
! 9: <H1>Application side Error Messages And the like</H1>
! 10:
! 11: <PRE>
! 12: /*
! 13: ** (c) COPYRIGHT MIT 1995.
! 14: ** Please first read the full copyright statement in the file COPYRIGH.
! 15: */
! 16: </PRE>
! 17:
! 18: This module provides some "make life easier" functions in order to get
! 19: the application going. The functionality of this module was originally
! 20: in <A HREF="HTAccess.html">HTAccess</A>, but now It is part of the <A
! 21: HREF="WWWApp.html">application interface</A> which the application
! 22: <EM>may</EM> use it if desired.<P>
! 23:
! 24: This module is implemented by <A HREF="HTHome.c">HTHome.c</A>, and it
! 25: is a part of the <A HREF="http://www.w3.org/pub/WWW/Library/"> W3C
! 26: Reference Library</A>. <P>
! 27:
! 28: <PRE>
! 29: #ifndef HTMSG_H
! 30: #define HTMSG_H
! 31: #include "WWWLib.h"
! 32: </PRE>
! 33:
! 34: You can register a set of callback functions to handle user prompting,
! 35: error messages, confimations etc. Here we give a set of functions that
! 36: can be used on almost anu thinkable platform. If you want to provide
! 37: your own platform dependent inoplementation then fine :-)
! 38:
! 39: <H3>Display a message, then wait for 'YES' or 'NO'</H3>
! 40:
! 41: This function prompts the user for a confirmation on the message
! 42: passed as a parameter. If the user reacts in the affirmative, returns
! 43: <EM>TRUE</EM>, returns <EM>FALSE</EM> otherwise.
! 44:
! 45: <PRE>
! 46: extern HTAlertCallback HTConfirm;
! 47: </PRE>
! 48:
! 49: <H3>Prompt the User a Question</H3>
! 50:
! 51: Prompt for answer and get text back. Reply text is either NULL on
! 52: error or a dynamic string which the caller must free.
! 53:
! 54: <PRE>
! 55: extern HTAlertCallback HTPrompt;
! 56: </PRE>
! 57:
! 58: <H3>Prompt for a Password</H3>
! 59:
! 60: Prompt for password without echoing the reply. Reply text is weither
! 61: NULL on error or a dynamic string which the caller must free. <P>
! 62:
! 63: <B>NOTE:</B> The current version uses <EM>getpass</EM> which on many
! 64: systems returns a string of 8 or 16 bytes.
! 65:
! 66: <PRE>
! 67: extern HTAlertCallback HTPromptPassword;
! 68: </PRE>
! 69:
! 70: <H3>Prompt for a UserID and a Password</H3>
! 71:
! 72: This is just a composite function using <EM>HTPrompt</EM> and
! 73: <EM>HTPromptPassword</EM>. The strings returned must be freed by
! 74: caller.
! 75:
! 76: <PRE>
! 77: extern HTAlertCallback HTPromptUsernameAndPassword;
! 78: </PRE>
! 79:
! 80: <H3>Display a Message</H3>
! 81:
! 82: This function simply puts out the message passed.
! 83:
! 84: <PRE>
! 85: extern HTAlertCallback HTAlert;
! 86: </PRE>
! 87:
! 88: <H3>Progress Notification</H3>
! 89:
! 90: This function can be used to indicate the current status of a certain
! 91: action. In order to avoid having strings directly in the core parts of
! 92: the Library, this function is passed a "state" argument from which the
! 93: message can be generated in this module. The "param" argument is for
! 94: additional information to be passed.
! 95:
! 96: <PRE>
! 97: extern HTAlertCallback HTProgress;
! 98: </PRE>
! 99:
! 100: <H3>Generating an Error Message of a request</H3>
! 101:
! 102: This function outputs the content of the error list to standard output
! 103: (used in Line Mode Browser), but smart clients and servers might
! 104: overwrite this function so that the error messages can be handled to
! 105: the user in a nice(r) way. That is the reason for putting the actual
! 106: implementation in <A HREF="HTAlert.c">HTAlert.c</A>.<P>
! 107:
! 108: <PRE>
! 109: extern HTAlertCallback HTError_print;
! 110: </PRE>
! 111:
! 112: <PRE>
! 113: #endif /* HTHOME_H */
! 114: </PRE>
! 115:
! 116: End of Declaration
! 117: </BODY>
! 118: </HTML>
Webmaster