home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / Programming / Source / WAIS / ir / ui.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-02  |  2.1 KB  |  98 lines

  1. /* WIDE AREA INFORMATION SERVER SOFTWARE:
  2.    No guarantees or restrictions.  See the readme file for the full standard
  3.    disclaimer.
  4.  
  5.    Brewster@think.com
  6. */
  7.  
  8. /* this is a simple ui for building other ui's on top.
  9.  * -brewster
  10.  */
  11.  
  12. /* to do:
  13.  *   generate multiple queries for long documents.
  14.  *     this will crash if the file being retrieved is larger than 100k.
  15.  *   
  16.  */
  17.  
  18. #ifndef UI_H
  19. #define UI_H
  20.  
  21. #include "cdialect.h"
  22. #include "zprot.h"
  23. #include "zutil.h"
  24. #include "wprot.h"
  25. #include "transprt.h"
  26. #include "wmessage.h"
  27. #include "panic.h"
  28. #include "version.h"
  29.  
  30. #define SERVICE_NAME "z39_50"
  31.  
  32. #ifdef __cplusplus
  33. /* declare these as C style functions */
  34. extern "C"
  35.     {
  36. #endif /* def __cplusplus */
  37.  
  38.  
  39. char *
  40. generate_search_apdu _AP((char* buff,  /* buffer to hold the apdu */
  41.               long *buff_len, /* number of bytes written to the buffer */
  42.               char *seed_words, /* string of the seed words */
  43.               char *database_name,
  44.               DocObj** docobjs,
  45.               long maxDocsRetrieved
  46.               ));
  47.  
  48. char *
  49. generate_retrieval_apdu _AP((char *buff, 
  50.                  long *buff_len, 
  51.                  any *docID,
  52.                  long chunk_type,
  53.                  long start_line, long end_line,
  54.                  char *type,
  55.                  char *database_name));
  56.  
  57.  
  58. /* moved into individual ui codes -brewster and bonnie
  59. void
  60. dsply_text_record_completely _AP((WAISDocumentText *record));
  61.  
  62. void
  63. display_search_response _AP((SearchResponseAPDU *response));
  64. */
  65.  
  66. /* to initialize a conection.  Returns max buffer size. */
  67.  
  68. long
  69. init_connection _AP((char* inBuffer,
  70.              char* outBuffer,
  71.              long bufferSize,
  72.              FILE *conection, 
  73.              char *userInfo));
  74.  
  75. long
  76. interpret_message _AP((char *request_message,
  77.                long request_length,
  78.                char *response_message,
  79.                long response_buffer_length, /* length of the buffer (modified)*/
  80.                FILE *connection,
  81.                boolean verbose));
  82.  
  83. long close_connection _AP((FILE *connection));
  84.  
  85. void
  86. display_text_record_completely _AP((WAISDocumentText *record, 
  87.                    boolean quote_string_quotes));
  88.  
  89. char *trim_junk _AP((char *headline));
  90.  
  91. #ifdef __cplusplus
  92.     }
  93. #endif /* def __cplusplus */
  94.  
  95.  
  96.  
  97. #endif /* ndef UI_H */
  98.