mutt stable branch with some hacks
at master 66 lines 2.4 kB view raw
1/* 2 * Copyright (C) 1996-2000,2010,2013 Michael R. Elkins <me@mutt.org> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 */ 18 19#ifndef _BUFFY_H 20#define _BUFFY_H 21 22/*parameter to mutt_parse_mailboxes*/ 23#define MUTT_MAILBOXES 1 24#define MUTT_UNMAILBOXES 2 25 26typedef struct buffy_t 27{ 28 char path[_POSIX_PATH_MAX]; 29 char realpath[_POSIX_PATH_MAX]; /* used for duplicate detection, context comparison, 30 and the sidebar */ 31 off_t size; 32 struct buffy_t *next; 33 short new; /* mailbox has new mail */ 34 35 /* These next three are only set when OPTMAILCHECKSTATS is set */ 36 int msg_count; /* total number of messages */ 37 int msg_unread; /* number of unread messages */ 38 int msg_flagged; /* number of flagged messages */ 39 40 short notified; /* user has been notified */ 41 short magic; /* mailbox type */ 42 short newly_created; /* mbox or mmdf just popped into existence */ 43 time_t last_visited; /* time of last exit from this mailbox */ 44 time_t stats_last_checked; /* mtime of mailbox the last time stats where checked. */ 45} 46BUFFY; 47 48WHERE BUFFY *Incoming INITVAL (0); 49WHERE short BuffyTimeout INITVAL (3); 50WHERE short BuffyCheckStatsInterval INITVAL (60); 51 52extern time_t BuffyDoneTime; /* last time we knew for sure how much mail there was */ 53 54BUFFY *mutt_find_mailbox (const char *path); 55void mutt_update_mailbox (BUFFY * b); 56 57/* fixes up atime + mtime after mbox/mmdf mailbox was modified 58 according to stat() info taken before a modification */ 59void mutt_buffy_cleanup (const char *buf, struct stat *st); 60 61/* mark mailbox just left as already notified */ 62void mutt_buffy_setnotified (const char *path); 63 64int mh_buffy (BUFFY *, int); 65 66#endif /* _BUFFY_H */