NeoMutt  2022-04-29-215-gc12b98
Teaching an old dog new tricks
DOXYGEN
lib.h
Go to the documentation of this file.
1
35#ifndef MUTT_MBOX_LIB_H
36#define MUTT_MBOX_LIB_H
37
38#include <stdbool.h>
39#include <stdio.h>
40#include <time.h>
41#include "core/lib.h"
42
43struct stat;
44
49{
50 FILE *fp;
51 struct timespec atime;
53
54 bool locked : 1;
55 bool append : 1;
56};
57
58extern struct MxOps MxMboxOps;
59extern struct MxOps MxMmdfOps;
60
61#define MMDF_SEP "\001\001\001\001\n"
62
63enum MxStatus mbox_check(struct Mailbox *m, struct stat *st, bool check_stats);
64enum MailboxType mbox_path_probe(const char *path, const struct stat *st);
65void mbox_reset_atime(struct Mailbox *m, struct stat *st);
66bool mbox_test_new_folder(const char *path);
67
68#endif /* MUTT_MBOX_LIB_H */
Convenience wrapper for the core headers.
struct MxOps MxMmdfOps
MMDF Mailbox - Implements MxOps -.
Definition: mbox.c:1874
struct MxOps MxMboxOps
Mbox Mailbox - Implements MxOps -.
Definition: mbox.c:1842
enum MailboxType mbox_path_probe(const char *path, const struct stat *st)
Is this an mbox Mailbox? - Implements MxOps::path_probe() -.
Definition: mbox.c:1643
MailboxType
Supported mailbox formats.
Definition: mailbox.h:41
enum MxStatus mbox_check(struct Mailbox *m, struct stat *st, bool check_stats)
bool mbox_test_new_folder(const char *path)
Test if an mbox or mmdf mailbox has new mail.
Definition: mbox.c:816
void mbox_reset_atime(struct Mailbox *m, struct stat *st)
Reset the access time on the mailbox file.
Definition: mbox.c:843
MxStatus
Return values from mbox_check(), mbox_check_stats(), mbox_snc(), and mbox_close()
Definition: mxapi.h:84
A mailbox.
Definition: mailbox.h:79
Mbox-specific Account data -.
Definition: lib.h:49
FILE * fp
Mailbox file.
Definition: lib.h:50
bool append
mailbox is opened in append mode
Definition: lib.h:55
bool locked
is the mailbox locked?
Definition: lib.h:54
struct timespec atime
File's last-access time.
Definition: lib.h:51
struct timespec stats_last_checked
Mtime of mailbox the last time stats where checked.
Definition: lib.h:52
Definition: mxapi.h:112
Time value with nanosecond precision.
Definition: file.h:49