home *** CD-ROM | disk | FTP | other *** search
/ vsiftp.vmssoftware.com / VSIPUBLIC@vsiftp.vmssoftware.com.tar / FREEWARE / FREEWARE40.ZIP / pine / c-client / phile.h < prev    next >
C/C++ Source or Header  |  1994-01-09  |  4KB  |  138 lines

  1. /*
  2.  * Program:    File routines
  3.  *
  4.  * Author:    Mark Crispin
  5.  *        Networks and Distributed Computing
  6.  *        Computing & Communications
  7.  *        University of Washington
  8.  *        Administration Building, AG-44
  9.  *        Seattle, WA  98195
  10.  *        Internet: MRC@CAC.Washington.EDU
  11.  *
  12.  * Date:    25 August 1993
  13.  * Last Edited:    2 September 1993
  14.  *
  15.  * Copyright 1993 by the University of Washington
  16.  *
  17.  *  Permission to use, copy, modify, and distribute this software and its
  18.  * documentation for any purpose and without fee is hereby granted, provided
  19.  * that the above copyright notice appears in all copies and that both the
  20.  * above copyright notice and this permission notice appear in supporting
  21.  * documentation, and that the name of the University of Washington not be
  22.  * used in advertising or publicity pertaining to distribution of the software
  23.  * without specific, written prior permission.  This software is made
  24.  * available "as is", and
  25.  * THE UNIVERSITY OF WASHINGTON DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
  26.  * WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED
  27.  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND IN
  28.  * NO EVENT SHALL THE UNIVERSITY OF WASHINGTON BE LIABLE FOR ANY SPECIAL,
  29.  * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  30.  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, TORT
  31.  * (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF OR IN CONNECTION
  32.  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  33.  *
  34.  */
  35.  
  36. /* Build parameters */
  37.  
  38.  
  39. /* Command bits from phile_getflags() */
  40.  
  41. #define fSEEN 1
  42. #define fDELETED 2
  43. #define fFLAGGED 4
  44. #define fANSWERED 8
  45.  
  46.  
  47. /* Types returned from phile_type() */
  48.  
  49. #define PTYPEBINARY 0        /* binary data */
  50. #define PTYPETEXT 1        /* textual data */
  51. #define PTYPECRTEXT 2        /* textual data with CR */
  52. #define PTYPE8 4        /* textual 8bit data */
  53. #define PTYPEISO2022JP 8    /* textual Japanese */
  54. #define PTYPEISO2022KR 16    /* textual Korean */
  55.  
  56.  
  57. /* PHILE I/O stream local data */
  58.  
  59. typedef struct phile_local {
  60.   ENVELOPE *env;        /* file envelope */
  61.   BODY *body;            /* file body */
  62.   char *buf;            /* buffer for message text */
  63.   char tmp[MAILTMPLEN];        /* temporary buffer */
  64. } PHILELOCAL;
  65.  
  66.  
  67. /* Convenient access to local data */
  68.  
  69. #define LOCAL ((PHILELOCAL *) stream->local)
  70.  
  71. /* Function prototypes */
  72.  
  73. DRIVER *phile_valid  ();
  74. int phile_isvalid  ();
  75. void *phile_parameters  ();
  76. void phile_find  ();
  77. void phile_find_bboards  ();
  78. void phile_find_all  ();
  79. void phile_find_all_bboards  ();
  80. long phile_subscribe  ();
  81. long phile_unsubscribe  ();
  82. long phile_subscribe_bboard  ();
  83. long phile_unsubscribe_bboard  ();
  84. long phile_create  ();
  85. long phile_delete  ();
  86. long phile_rename  ();
  87. MAILSTREAM *phile_open  ();
  88. int phile_type  ();
  89. void phile_close  ();
  90. void phile_fetchfast  ();
  91. void phile_fetchflags  ();
  92. ENVELOPE *phile_fetchstructure  ();
  93. char *phile_fetchheader  ();
  94. char *phile_fetchtext  ();
  95. char *phile_fetchbody ();
  96. void phile_setflag  ();
  97. void phile_clearflag  ();
  98. void phile_search  ();
  99. long phile_ping  ();
  100. void phile_check  ();
  101. void phile_expunge  ();
  102. long phile_copy  ();
  103. long phile_move  ();
  104. long phile_append  ();
  105. void phile_gc  ();
  106.  
  107. char *phile_file  ();
  108. short phile_getflags  ();
  109. char phile_search_all  ();
  110. char phile_search_answered  ();
  111. char phile_search_deleted  ();
  112. char phile_search_flagged  ();
  113. char phile_search_keyword  ();
  114. char phile_search_new  ();
  115. char phile_search_old  ();
  116. char phile_search_recent  ();
  117. char phile_search_seen  ();
  118. char phile_search_unanswered  ();
  119. char phile_search_undeleted  ();
  120. char phile_search_unflagged  ();
  121. char phile_search_unkeyword  ();
  122. char phile_search_unseen  ();
  123. char phile_search_before  ();
  124. char phile_search_on  ();
  125. char phile_search_since  ();
  126. char phile_search_body  ();
  127. char phile_search_subject  ();
  128. char phile_search_text  ();
  129. char phile_search_bcc  ();
  130. char phile_search_cc  ();
  131. char phile_search_from  ();
  132. char phile_search_to  ();
  133.  
  134. typedef char (*search_t)  ();
  135. search_t phile_search_date  ();
  136. search_t phile_search_flag  ();
  137. search_t phile_search_string  ();
  138.