Nico Golde:
[apps/madmutt.git] / buffy.h
1 /*
2  * Copyright notice from original mutt:
3  * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
4  *
5  * This file is part of mutt-ng, see http://www.muttng.org/.
6  * It's licensed under the GNU General Public License,
7  * please see the file GPL in the top level source directory.
8  */
9 #ifndef _BUFFY_H
10 #define _BUFFY_H
11
12 #include "lib/list.h"
13
14 /*parameter to mutt_parse_mailboxes*/
15 #define M_MAILBOXES   1
16 #define M_UNMAILBOXES 2
17
18 typedef struct buffy_t {
19   char *path;
20 #ifdef BUFFY_SIZE
21   long size;
22 #endif                          /* BUFFY_SIZE */
23   short new;                    /* mailbox has new mail */
24   short has_new;                /* set it new if new and not read */
25   int msgcount;                 /* total number of messages */
26   int msg_unread;               /* number of unread messages */
27   int msg_flagged;              /* number of flagged messages */
28   short notified;               /* user has been notified */
29   short magic;                  /* mailbox type */
30   short newly_created;          /* mbox or mmdf just popped into existence */
31 } BUFFY;
32
33 WHERE list2_t* Incoming;
34 WHERE short BuffyTimeout INITVAL (3);
35
36 /*
37  * looks up a path in Incoming list
38  * there needs to be an extra function since we have everything but
39  * object of type BUFFY when we want to a do a lookup ;-(
40  */
41 int buffy_lookup (const char*);
42
43 extern time_t BuffyDoneTime;    /* last time we knew for sure how much mail there was */
44
45 #ifdef BUFFY_SIZE
46 BUFFY *mutt_find_mailbox (const char *path);
47 void mutt_update_mailbox (BUFFY * b);
48 #endif
49
50 #endif /* !_BUFFY_H */