home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Linux / Divers / lynx2.8.1dev.10.tar.gz / lynx2.8.1dev.10.tar / lynx2-8 / src / HTAlert.h < prev    next >
C/C++ Source or Header  |  1998-03-25  |  4KB  |  134 lines

  1. /*  */
  2.  
  3. /*      Displaying messages and getting input for WWW Library
  4. **      =====================================================
  5. **
  6. **         May 92 Created By C.T. Barker
  7. **         Feb 93 Portablized etc TBL
  8. */
  9.  
  10. #ifndef HTUTILS_H
  11. #include <HTUtils.h>
  12. #endif /* HTUTILS_H */
  13. #include <tcp.h>
  14.  
  15. /*      Display a message and get the input
  16. **
  17. **      On entry,
  18. **              Msg is the message.
  19. **
  20. **      On exit,
  21. **              Return value is malloc'd string which must be freed.
  22. */
  23. extern char * HTPrompt PARAMS((CONST char * Msg, CONST char * deflt));
  24.  
  25.  
  26. /*      Display a message, don't wait for input
  27. **
  28. **      On entry,
  29. **              The input is a list of parameters for printf.
  30. */
  31. extern void HTAlert PARAMS((CONST char * Msg));
  32.  
  33.  
  34. /*      Display a progress message for information (and diagnostics) only
  35. **
  36. **      On entry,
  37. **              The input is a list of parameters for printf.
  38. */
  39. extern void HTProgress PARAMS((CONST char * Msg));
  40. extern BOOLEAN mustshow;
  41. #define _HTProgress(msg)    mustshow = TRUE, HTProgress(msg)
  42.  
  43. /*
  44.  *  Indicates whether last HTConfirm was cancelled (^G or ^C) and
  45.  *  resets flag. (so only call once!) - kw
  46.  */
  47. extern BOOL HTLastConfirmCancelled NOPARAMS;
  48.  
  49. /*      Display a message, then wait for 'yes' or 'no'.
  50. **
  51. **      On entry,
  52. **              Takes a list of parameters for printf.
  53. **
  54. **      On exit,
  55. **              If the user enters 'YES', returns TRUE, returns FALSE
  56. **              otherwise.
  57. */
  58. extern BOOL HTConfirm PARAMS ((CONST char * Msg));
  59.  
  60.  
  61. /*      Prompt for password without echoing the reply
  62. */
  63. extern char * HTPromptPassword PARAMS((CONST char * Msg));
  64.  
  65. /*      Prompt both username and password       HTPromptUsernameAndPassword()
  66. **      ---------------------------------
  67. ** On entry,
  68. **      Msg             is the prompting message.
  69. **      *username and
  70. **      *password       are char pointers; they are changed
  71. **                      to point to result strings.
  72. **    IsProxy        should be TRUE if this is for
  73. **            proxy authentication.
  74. **
  75. **                      If *username is not NULL, it is taken
  76. **                      to point to  a default value.
  77. **                      Initial value of *password is
  78. **                      completely discarded.
  79. **
  80. ** On exit,
  81. **      *username and *password point to newly allocated
  82. **      strings -- original strings pointed to by them
  83. **      are NOT freed.
  84. **
  85. */
  86. extern void HTPromptUsernameAndPassword PARAMS((
  87.     CONST char *    Msg,
  88.     char **        username,
  89.     char **        password,
  90.     BOOL        IsProxy));
  91.  
  92.  
  93. /*    Confirm a cookie operation.            HTConfirmCookie()
  94. **    ---------------------------
  95. **
  96. **  On entry,
  97. **    server            is the server sending the Set-Cookie.
  98. **    domain            is the domain of the cookie.
  99. **    path            is the path of the cookie.
  100. **    name            is the name of the cookie.
  101. **    value            is the value of the cookie.
  102. **
  103. **  On exit,
  104. **    Returns FALSE on cancel,
  105. **        TRUE if the cookie should be set.
  106. */
  107. extern BOOL HTConfirmCookie PARAMS((
  108.     void *        dp,
  109.     CONST char *    server,
  110.     CONST char *    domain,
  111.     CONST char *    path,
  112.     CONST char *    name,
  113.     CONST char *    value));
  114.  
  115.  
  116. /*      Confirm redirection of POST.        HTConfirmPostRedirect()
  117. **    ----------------------------
  118. **  On entry,
  119. **      Redirecting_url             is the Location.
  120. **    server_status            is the server status code.
  121. **
  122. **  On exit,
  123. **      Returns 0 on cancel,
  124. **      1 for redirect of POST with content,
  125. **    303 for redirect as GET without content
  126. */
  127. extern int HTConfirmPostRedirect PARAMS((
  128.     CONST char *    Redirecting_url,
  129.     int        server_status));
  130.  
  131. /*
  132.  
  133.     */
  134.