annotate src/osdep/unix/maildir.h @ 1:28a55bc1110c imapext-2007-1

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

yatex.org