NeoMutt  2025-12-11-435-g4ac674
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
lib.h
Go to the documentation of this file.
1
23
35
36#ifndef MUTT_MBOX_LIB_H
37#define MUTT_MBOX_LIB_H
38
39#include <stdbool.h>
40#include <stdio.h>
41#include <time.h>
42#include "core/lib.h"
43
44struct stat;
45
50{
51 FILE *fp;
52 struct timespec mtime;
53 struct timespec atime;
54 struct timespec stats_last_checked;
55
56 bool locked : 1;
57 bool append : 1;
58};
59
60extern const struct MxOps MxMboxOps;
61extern const struct MxOps MxMmdfOps;
62
63#define MMDF_SEP "\001\001\001\001\n"
64
65enum MxStatus mbox_check(struct Mailbox *m, struct stat *st, bool check_stats);
66enum MailboxType mbox_path_probe(const char *path, const struct stat *st);
67void mbox_reset_atime(struct Mailbox *m, struct stat *st);
68
69#endif /* MUTT_MBOX_LIB_H */
Convenience wrapper for the core headers.
MailboxType
Supported mailbox formats.
Definition mailbox.h:40
const struct MxOps MxMboxOps
Mbox Mailbox - Implements MxOps -.
Definition mbox.c:1707
const struct MxOps MxMmdfOps
MMDF Mailbox - Implements MxOps -.
Definition mbox.c:1737
enum MailboxType mbox_path_probe(const char *path, const struct stat *st)
Is this an mbox Mailbox?
Definition mbox.c:1537
enum MxStatus mbox_check(struct Mailbox *m, struct stat *st, bool check_stats)
void mbox_reset_atime(struct Mailbox *m, struct stat *st)
Reset the access time on the mailbox file.
Definition mbox.c:742
MxStatus
Return values from mbox_check(), mbox_check_stats(), mbox_sync(), and mbox_close()
Definition mxapi.h:59
A mailbox.
Definition mailbox.h:78
Mbox-specific Account data -.
Definition lib.h:50
FILE * fp
Mailbox file.
Definition lib.h:51
bool append
mailbox is opened in append mode
Definition lib.h:57
bool locked
is the mailbox locked?
Definition lib.h:56
struct timespec atime
File's last-access time.
Definition lib.h:53
struct timespec mtime
Time Mailbox was last changed.
Definition lib.h:52
struct timespec stats_last_checked
Mtime of mailbox the last time stats where checked.
Definition lib.h:54
Definition mxapi.h:87