NeoMutt  2024-11-14-138-ge5ca67
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
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 mtime;
52 struct timespec atime;
53 struct timespec stats_last_checked;
54
55 bool locked : 1;
56 bool append : 1;
57};
58
59extern const struct MxOps MxMboxOps;
60extern const struct MxOps MxMmdfOps;
61
62#define MMDF_SEP "\001\001\001\001\n"
63
64enum MxStatus mbox_check(struct Mailbox *m, struct stat *st, bool check_stats);
65enum MailboxType mbox_path_probe(const char *path, const struct stat *st);
66void mbox_reset_atime(struct Mailbox *m, struct stat *st);
67
68#endif /* MUTT_MBOX_LIB_H */
Convenience wrapper for the core headers.
MailboxType
Supported mailbox formats.
Definition: mailbox.h:41
const struct MxOps MxMboxOps
Mbox Mailbox - Implements MxOps -.
Definition: mbox.c:1712
const struct MxOps MxMmdfOps
MMDF Mailbox - Implements MxOps -.
Definition: mbox.c:1742
enum MailboxType mbox_path_probe(const char *path, const struct stat *st)
Is this an mbox Mailbox? - Implements MxOps::path_probe() -.
Definition: mbox.c:1542
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:747
MxStatus
Return values from mbox_check(), mbox_check_stats(), mbox_sync(), and mbox_close()
Definition: mxapi.h:63
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:56
bool locked
is the mailbox locked?
Definition: lib.h:55
struct timespec atime
File's last-access time.
Definition: lib.h:52
struct timespec mtime
Time Mailbox was last changed.
Definition: lib.h:51
struct timespec stats_last_checked
Mtime of mailbox the last time stats where checked.
Definition: lib.h:53
Definition: mxapi.h:91