home *** CD-ROM | disk | FTP | other *** search
/ ftp.uv.es / 2014.11.ftp.uv.es.tar / ftp.uv.es / pub / unix / pine4.10.tar.gz / pine4.10.tar / pine4.10 / imap / src / osdep / amiga / tenex.h < prev    next >
C/C++ Source or Header  |  1998-09-16  |  4KB  |  96 lines

  1. /*
  2.  * Program:    Tenex mail 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:    22 May 1990
  13.  * Last Edited:    4 January 1998
  14.  *
  15.  * Copyright 1998 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. /* TENEX I/O stream local data */
  40.     
  41. typedef struct tenex_local {
  42.   unsigned int inbox : 1;    /* if this is an INBOX or not */
  43.   unsigned int shouldcheck: 1;    /* if ping should do a check instead */
  44.   unsigned int mustcheck: 1;    /* if ping must do a check instead */
  45.   int fd;            /* file descriptor for I/O */
  46.   off_t filesize;        /* file size parsed */
  47.   time_t filetime;        /* last file time */
  48.   time_t lastsnarf;        /* local snarf time */
  49.   char *buf;            /* temporary buffer */
  50.   unsigned long buflen;        /* current size of temporary buffer */
  51. } TENEXLOCAL;
  52.  
  53.  
  54. /* Convenient access to local data */
  55.  
  56. #define LOCAL ((TENEXLOCAL *) stream->local)
  57.  
  58. /* Function prototypes */
  59.  
  60. DRIVER *tenex_valid (char *name);
  61. int tenex_isvalid (char *name,char *tmp);
  62. void *tenex_parameters (long function,void *value);
  63. void tenex_scan (MAILSTREAM *stream,char *ref,char *pat,char *contents);
  64. void tenex_list (MAILSTREAM *stream,char *ref,char *pat);
  65. void tenex_lsub (MAILSTREAM *stream,char *ref,char *pat);
  66. long tenex_create (MAILSTREAM *stream,char *mailbox);
  67. long tenex_delete (MAILSTREAM *stream,char *mailbox);
  68. long tenex_rename (MAILSTREAM *stream,char *old,char *newname);
  69. long tenex_status (MAILSTREAM *stream,char *mbx,long flags);
  70. MAILSTREAM *tenex_open (MAILSTREAM *stream);
  71. void tenex_close (MAILSTREAM *stream,long options);
  72. void tenex_fast (MAILSTREAM *stream,char *sequence,long flags);
  73. void tenex_flags (MAILSTREAM *stream,char *sequence,long flags);
  74. char *tenex_header (MAILSTREAM *stream,unsigned long msgno,
  75.             unsigned long *length,long flags);
  76. long tenex_text (MAILSTREAM *stream,unsigned long msgno,STRING *bs,long flags);
  77. void tenex_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags);
  78. void tenex_flagmsg (MAILSTREAM *stream,MESSAGECACHE *elt);
  79. long tenex_ping (MAILSTREAM *stream);
  80. void tenex_check (MAILSTREAM *stream);
  81. void tenex_snarf (MAILSTREAM *stream);
  82. void tenex_expunge (MAILSTREAM *stream);
  83. long tenex_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options);
  84. long tenex_append (MAILSTREAM *stream,char *mailbox,char *flags,char *date,
  85.            STRING *message);
  86.  
  87. unsigned long tenex_size (MAILSTREAM *stream,unsigned long m);
  88. char *tenex_file (char *dst,char *name);
  89. long tenex_parse (MAILSTREAM *stream);
  90. MESSAGECACHE *tenex_elt (MAILSTREAM *stream,unsigned long msgno);
  91. void tenex_read_flags (MAILSTREAM *stream,MESSAGECACHE *elt);
  92. void tenex_update_status (MAILSTREAM *stream,unsigned long msgno,
  93.               long syncflag);
  94. unsigned long tenex_hdrpos (MAILSTREAM *stream,unsigned long msgno,
  95.                 unsigned long *size);
  96.