1e1c55f62b158e60c4120473f598e7ab4d0a5771
[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   short new;                    /* mailbox has new mail */
21   short has_new;                /* set it new if new and not read */
22   int msgcount;                 /* total number of messages */
23   int msg_unread;               /* number of unread messages */
24   int msg_flagged;              /* number of flagged messages */
25   short notified;               /* user has been notified */
26   short magic;                  /* mailbox type */
27   short newly_created;          /* mbox or mmdf just popped into existence */
28 } BUFFY;
29
30 /* folders with incomming mail (via mailboxes command) */
31 WHERE list2_t* Incoming;
32 WHERE short BuffyTimeout INITVAL (3);
33 extern time_t BuffyDoneTime;    /* last time we knew for sure how much mail there was */
34
35 /* looks up a path in Incoming list (returns index) */
36 int buffy_lookup (const char*);
37 /* handles mailboxes commands */
38 int buffy_parse_mailboxes (BUFFER*, BUFFER*, unsigned long, BUFFER*);
39 /* from given path, gets next mailbox in Incoming with new mail */
40 void buffy_next (char*, size_t);
41 /* checks mailboxes for new mail (returns number) */
42 int buffy_check (int);
43 /* lists mailboxes with new mail */
44 int buffy_list (void);
45 /* wrapper around buffy_list() */
46 int buffy_notify (void);
47
48 #endif /* !_BUFFY_H */