mutt stable branch with some hacks
at jcs 77 lines 2.7 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 BUFFER *pathbuf; 29 const char *realpath; /* 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 struct timespec last_visited; /* time of last exit from this mailbox */ 44 struct timespec stats_last_checked; /* mtime of mailbox the last time stats where checked. */ 45} 46BUFFY; 47 48WHERE BUFFY *Incoming; 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 54void mutt_buffer_buffy (BUFFER *); 55void mutt_buffy (char *, size_t); 56 57int mutt_buffy_list (void); 58int mutt_buffy_check (int); 59int mutt_buffy_notify (void); 60 61BUFFY *mutt_find_mailbox (const char *path); 62void mutt_update_mailbox (BUFFY * b); 63 64/* fixes up atime + mtime after mbox/mmdf mailbox was modified 65 according to stat() info taken before a modification */ 66void mutt_buffy_cleanup (const char *buf, struct stat *st); 67 68/* mark mailbox just left as already notified */ 69void mutt_buffy_setnotified (const char *path); 70 71int mh_buffy (BUFFY *, int); 72 73/* force flags passed to mutt_buffy_check() */ 74#define MUTT_BUFFY_CHECK_FORCE 1 75#define MUTT_BUFFY_CHECK_FORCE_STATS (1<<1) 76 77#endif /* _BUFFY_H */