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

  1. /*
  2.  * Program:    MX mail routines
  3.  *
  4.  * Author(s):    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:    3 May 1996
  13.  * Last Edited:    4 December 1996
  14.  *
  15.  * Copyright 1996 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. #define MXINDEXNAME "/.mxindex"
  39. #define MXINDEX(d,s) strcat (mx_file (d,s),MXINDEXNAME)
  40.  
  41.  
  42. /* MX I/O stream local data */
  43.     
  44. typedef struct mx_local {
  45.   unsigned int inbox : 1;    /* if it's an INBOX or not */
  46.   int fd;            /* file descriptor of open index */
  47.   char *dir;            /* spool directory name */
  48.   char *buf;            /* temporary buffer */
  49.   unsigned long buflen;        /* current size of temporary buffer */
  50.   time_t scantime;        /* last time directory scanned */
  51. } MXLOCAL;
  52.  
  53.  
  54. /* Convenient access to local data */
  55.  
  56. #define LOCAL ((MXLOCAL *) stream->local)
  57.  
  58. /* Function prototypes */
  59.  
  60. DRIVER *mx_valid (char *name);
  61. int mx_isvalid (char *name,char *tmp);
  62. void *mx_parameters (long function,void *value);
  63. void mx_scan (MAILSTREAM *stream,char *ref,char *pat,char *contents);
  64. void mx_list (MAILSTREAM *stream,char *ref,char *pat);
  65. void mx_lsub (MAILSTREAM *stream,char *ref,char *pat);
  66. void mx_list_work (MAILSTREAM *stream,char *dir,char *pat,long level);
  67. long mx_subscribe (MAILSTREAM *stream,char *mailbox);
  68. long mx_unsubscribe (MAILSTREAM *stream,char *mailbox);
  69. long mx_create (MAILSTREAM *stream,char *mailbox);
  70. long mx_delete (MAILSTREAM *stream,char *mailbox);
  71. long mx_rename (MAILSTREAM *stream,char *old,char *newname);
  72. MAILSTREAM *mx_open (MAILSTREAM *stream);
  73. void mx_close (MAILSTREAM *stream,long options);
  74. void mx_fast (MAILSTREAM *stream,char *sequence,long flags);
  75. char *mx_fast_work (MAILSTREAM *stream,MESSAGECACHE *elt);
  76. char *mx_header (MAILSTREAM *stream,unsigned long msgno,unsigned long *length,
  77.          long flags);
  78. long mx_text (MAILSTREAM *stream,unsigned long msgno,STRING *bs,long flags);
  79. void mx_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags);
  80. void mx_flagmsg (MAILSTREAM *stream,MESSAGECACHE *elt);
  81. long mx_ping (MAILSTREAM *stream);
  82. void mx_check (MAILSTREAM *stream);
  83. void mx_expunge (MAILSTREAM *stream);
  84. long mx_copy (MAILSTREAM *stream,char *sequence,char *mailbox,
  85.           long options);
  86. long mx_append (MAILSTREAM *stream,char *mailbox,char *flags,char *date,
  87.         STRING *message);
  88.  
  89. int mx_select (struct direct *name);
  90. int mx_numsort (const void *d1,const void *d2);
  91. char *mx_file (char *dst,char *name);
  92. long mx_lockindex (MAILSTREAM *stream);
  93. void mx_unlockindex (MAILSTREAM *stream);
  94. void mx_setdate (char *file,MESSAGECACHE *elt);
  95.