1
|
1 /*
|
|
2 * Please read maildir.c for license and information
|
|
3 *
|
|
4 */
|
|
5
|
|
6 #define MAILDIRPATH "Maildir"
|
|
7
|
|
8 typedef struct maildir_local {
|
|
9 unsigned int inbox : 1; /* if it is an INBOX or not */
|
|
10 unsigned int dirty : 1; /* diskcopy needs updating */
|
|
11 char *dir; /* mail directory name */
|
|
12 char *buf; /* temporary buffer */
|
|
13 char *hdr; /* current header */
|
|
14 unsigned long buflen; /* current size of temporary buffer */
|
|
15 time_t scantime; /* last time directory scanned */
|
|
16 } MAILDIRLOCAL;
|
|
17
|
|
18 /* Convenient access to local data */
|
|
19
|
|
20 #define LOCAL ((MAILDIRLOCAL *) stream->local)
|
|
21
|
|
22 /* Function prototypes */
|
|
23
|
|
24 DRIVER *maildir_valid (char *name);
|
|
25 int maildir_isvalid (char *name,long justname);
|
|
26 MAILSTREAM *maildir_open (MAILSTREAM *stream);
|
|
27 void maildir_gc (MAILSTREAM *stream,long gcflags);
|
|
28 void maildir_close (MAILSTREAM *stream, long options);
|
|
29 long maildir_ping (MAILSTREAM *stream);
|
|
30 long maildir_ping_core (MAILSTREAM *stream);
|
|
31 void maildir_check (MAILSTREAM *stream);
|
|
32 long maildir_fetchtext (MAILSTREAM *stream,unsigned long msgno,STRING *bs,long flags);
|
|
33 char *maildir_fetchheader (MAILSTREAM *stream,unsigned long msgno,
|
|
34 unsigned long *length, long flags);
|
|
35 void maildir_fast (MAILSTREAM *stream,char *sequence,long flags);
|
|
36 void maildir_list (MAILSTREAM *stream,char *ref,char *pat);
|
|
37 void *maildir_parameters (long function,void *value);
|
|
38 long maildir_create (MAILSTREAM *stream,char *mailbox);
|
|
39 void maildir_flagmsg (MAILSTREAM *stream,MESSAGECACHE *elt);
|
|
40 void maildir_expunge (MAILSTREAM *stream);
|
|
41 long maildir_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long options);
|
|
42 long maildir_append (MAILSTREAM *stream, char *mailbox, append_t af, void *data);
|
|
43 /* long maildir_append (MAILSTREAM *stream,char *mailbox,char *flags,char *date,
|
|
44 STRING *message); */
|
|
45 short maildir_getflags (MAILSTREAM *stream,char *flag);
|
|
46 long maildir_delete (MAILSTREAM *stream,char *mailbox);
|
|
47 long maildir_rename (MAILSTREAM *stream,char *old,char *new);
|
|
48 long maildir_sub (MAILSTREAM *stream,char *mailbox);
|
|
49 long maildir_unsub (MAILSTREAM *stream,char *mailbox);
|
|
50 void maildir_lsub (MAILSTREAM *stream,char *ref,char *pat);
|
|
51
|
|
52 /* utility functions */
|
|
53 char *maildir_file (char *dst,char *name);
|
|
54 void maildir_copynew (const char *mailbox);
|
|
55 int maildir_select (struct direct *name);
|
|
56 /* int maildir_namesort (struct direct **d1,struct direct **d2); */
|
|
57 int maildir_namesort (const void *, const void *);
|
|
58 void maildir_listwork(char *name, MAILSTREAM *stream, char *s2, char *subdir, int flag);
|