Mailbox helper functions. More...
#include "config.h"
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <time.h>
#include <utime.h>
#include "mutt/lib.h"
#include "core/lib.h"
#include "gui/lib.h"
#include "mutt_mailbox.h"
#include "mbox/lib.h"
#include "mutt_globals.h"
#include "mutt_menu.h"
#include "muttlib.h"
#include "mx.h"
#include "protos.h"
Go to the source code of this file.
Functions | |
static void | mailbox_check (struct Mailbox *m_cur, struct Mailbox *m_check, struct stat *ctx_sb, bool check_stats) |
Check a mailbox for new mail. More... | |
int | mutt_mailbox_check (struct Mailbox *m_cur, int force) |
Check all all Mailboxes for new mail. More... | |
bool | mutt_mailbox_notify (struct Mailbox *m_cur) |
Notify the user if there's new mail. More... | |
bool | mutt_mailbox_list (void) |
List the mailboxes with new mail. More... | |
void | mutt_mailbox_set_notified (struct Mailbox *m) |
Note when the user was last notified of new mail. More... | |
struct Mailbox * | mutt_mailbox_next (struct Mailbox *m_cur, struct Buffer *s) |
incoming folders completion routine More... | |
void | mutt_mailbox_cleanup (const char *path, struct stat *st) |
Restore the timestamp of a mailbox. More... | |
Variables | |
static time_t | MailboxTime = 0 |
last time we started checking for mail More... | |
static time_t | MailboxStatsTime = 0 |
last time we check performed mail_check_stats More... | |
static short | MailboxCount = 0 |
how many boxes with new mail More... | |
static short | MailboxNotify = 0 |
of unnotified new boxesMore... | |
short | C_MailCheck |
Config: Number of seconds before NeoMutt checks for new mail. More... | |
bool | C_MailCheckStats |
Config: Periodically check for new mail. More... | |
short | C_MailCheckStatsInterval |
Config: How often to check for new mail. More... | |
Mailbox helper functions.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file mutt_mailbox.c.
|
static |
Check a mailbox for new mail.
m_cur | Current Mailbox |
m_check | Mailbox to check |
ctx_sb | stat() info for the current Mailbox |
check_stats | If true, also count the total, new and flagged messages |
Definition at line 62 of file mutt_mailbox.c.
int mutt_mailbox_check | ( | struct Mailbox * | m_cur, |
int | force | ||
) |
Check all all Mailboxes for new mail.
m_cur | Current Mailbox |
force | Force flags, see below |
num | Number of mailboxes with new mail |
The force argument may be any combination of the following values:
Check all all Mailboxes for new mail and total/new/flagged messages
Definition at line 138 of file mutt_mailbox.c.
bool mutt_mailbox_notify | ( | struct Mailbox * | m_cur | ) |
Notify the user if there's new mail.
m_cur | Current Mailbox |
true | If there is new mail |
Definition at line 204 of file mutt_mailbox.c.
bool mutt_mailbox_list | ( | void | ) |
List the mailboxes with new mail.
true | If there is new mail |
Definition at line 217 of file mutt_mailbox.c.
void mutt_mailbox_set_notified | ( | struct Mailbox * | m | ) |
Note when the user was last notified of new mail.
m | Mailbox |
Definition at line 285 of file mutt_mailbox.c.
incoming folders completion routine
ptr | Mailbox |
Given a folder name, find the next incoming folder with new mail. The Mailbox will be returned and a pretty version of the path put into s.
Definition at line 308 of file mutt_mailbox.c.
void mutt_mailbox_cleanup | ( | const char * | path, |
struct stat * | st | ||
) |
Restore the timestamp of a mailbox.
path | Path to the mailbox |
st | Timestamp info from stat() |
Fix up the atime and mtime after mbox/mmdf mailbox was modified according to stat() info taken before a modification.
Definition at line 354 of file mutt_mailbox.c.
|
static |
last time we started checking for mail
Definition at line 45 of file mutt_mailbox.c.
|
static |
last time we check performed mail_check_stats
Definition at line 46 of file mutt_mailbox.c.
|
static |
how many boxes with new mail
Definition at line 47 of file mutt_mailbox.c.
|
static |
Definition at line 48 of file mutt_mailbox.c.
short C_MailCheck |
Config: Number of seconds before NeoMutt checks for new mail.
Definition at line 51 of file mutt_mailbox.c.
bool C_MailCheckStats |
Config: Periodically check for new mail.
Definition at line 52 of file mutt_mailbox.c.
short C_MailCheckStatsInterval |
Config: How often to check for new mail.
Definition at line 53 of file mutt_mailbox.c.