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 / mtx.h < prev    next >
C/C++ Source or Header  |  1998-09-16  |  4KB  |  93 lines

  1. /*
  2.  * Program:    Mtx 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. /* MTX I/O stream local data */
  40.     
  41. typedef struct mtx_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;        /* last snarf time */
  49.   char *buf;            /* temporary buffer */
  50.   unsigned long buflen;        /* current size of temporary buffer */
  51. } MTXLOCAL;
  52.  
  53.  
  54. /* Convenient access to local data */
  55.  
  56. #define LOCAL ((MTXLOCAL *) stream->local)
  57.  
  58. /* Function prototypes */
  59.  
  60. DRIVER *mtx_valid (char *name);
  61. int mtx_isvalid (char *name,char *tmp);
  62. void *mtx_parameters (long function,void *value);
  63. void mtx_scan (MAILSTREAM *stream,char *ref,char *pat,char *contents);
  64. void mtx_list (MAILSTREAM *stream,char *ref,char *pat);
  65. void mtx_lsub (MAILSTREAM *stream,char *ref,char *pat);
  66. long mtx_create (MAILSTREAM *stream,char *mailbox);
  67. long mtx_delete (MAILSTREAM *stream,char *mailbox);
  68. long mtx_rename (MAILSTREAM *stream,char *old,char *newname);
  69. long mtx_status (MAILSTREAM *stream,char *mbx,long flags);
  70. MAILSTREAM *mtx_open (MAILSTREAM *stream);
  71. void mtx_close (MAILSTREAM *stream,long options);
  72. void mtx_flags (MAILSTREAM *stream,char *sequence,long flags);
  73. char *mtx_header (MAILSTREAM *stream,unsigned long msgno,
  74.           unsigned long *length,long flags);
  75. long mtx_text (MAILSTREAM *stream,unsigned long msgno,STRING *bs,long flags);
  76. void mtx_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags);
  77. void mtx_flagmsg (MAILSTREAM *stream,MESSAGECACHE *elt);
  78. long mtx_ping (MAILSTREAM *stream);
  79. void mtx_check (MAILSTREAM *stream);
  80. void mtx_snarf (MAILSTREAM *stream);
  81. void mtx_expunge (MAILSTREAM *stream);
  82. long mtx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options);
  83. long mtx_append (MAILSTREAM *stream,char *mailbox,char *flags,char *date,
  84.          STRING *message);
  85.  
  86. char *mtx_file (char *dst,char *name);
  87. long mtx_parse (MAILSTREAM *stream);
  88. MESSAGECACHE *mtx_elt (MAILSTREAM *stream,unsigned long msgno);
  89. void mtx_read_flags (MAILSTREAM *stream,MESSAGECACHE *elt);
  90. void mtx_update_status (MAILSTREAM *stream,unsigned long msgno,long syncflag);
  91. unsigned long mtx_hdrpos (MAILSTREAM *stream,unsigned long msgno,
  92.               unsigned long *size);
  93.