NeoMutt  2021-02-05-89-gabe350
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 #include "mx.h"
43 
44 struct ConfigSet;
45 struct stat;
46 
51 {
52  FILE *fp;
53  struct timespec atime;
54 
55  bool locked : 1;
56  bool append : 1;
57 };
58 
59 extern bool C_CheckMboxSize;
60 
61 extern struct MxOps MxMboxOps;
62 extern struct MxOps MxMmdfOps;
63 
64 #define MMDF_SEP "\001\001\001\001\n"
65 
66 enum MxStatus mbox_check(struct Mailbox *m, struct stat *sb, bool check_stats);
67 enum MailboxType mbox_path_probe(const char *path, const struct stat *st);
68 void mbox_reset_atime(struct Mailbox *m, struct stat *st);
69 bool mbox_test_new_folder(const char *path);
70 
71 #endif /* MUTT_MBOX_LIB_H */
mbox_test_new_folder
bool mbox_test_new_folder(const char *path)
Test if an mbox or mmdf mailbox has new mail.
Definition: mbox.c:806
MxStatus
MxStatus
Return values from mx_mbox_check(), mx_mbox_sync(), and mx_mbox_close()
Definition: mx.h:71
Mailbox
A mailbox.
Definition: mailbox.h:81
mbox_check
enum MxStatus mbox_check(struct Mailbox *m, struct stat *sb, bool check_stats)
mbox_reset_atime
void mbox_reset_atime(struct Mailbox *m, struct stat *st)
Reset the access time on the mailbox file.
Definition: mbox.c:833
MxOps
The Mailbox API.
Definition: mx.h:116
MboxAccountData::fp
FILE * fp
Mailbox file.
Definition: lib.h:52
lib.h
MxMmdfOps
struct MxOps MxMmdfOps
MMDF Mailbox - Implements MxOps.
Definition: mbox.c:1837
MboxAccountData
Mbox-specific Account data -.
Definition: lib.h:50
MboxAccountData::locked
bool locked
is the mailbox locked?
Definition: lib.h:55
MxMboxOps
struct MxOps MxMboxOps
Mbox Mailbox - Implements MxOps.
Definition: mbox.c:1807
MboxAccountData::append
bool append
mailbox is opened in append mode
Definition: lib.h:56
C_CheckMboxSize
bool C_CheckMboxSize
Config: (mbox,mmdf) Use mailbox size as an indicator of new mail.
Definition: config.c:36
ConfigSet
Container for lots of config items.
Definition: set.h:228
MailboxType
MailboxType
Supported mailbox formats.
Definition: mailbox.h:43
mbox_path_probe
enum MailboxType mbox_path_probe(const char *path, const struct stat *st)
Is this an mbox Mailbox? - Implements MxOps::path_probe()
Definition: mbox.c:1615
MboxAccountData::atime
struct timespec atime
File's last-access time.
Definition: lib.h:53
mx.h
timespec
Time value with nanosecond precision.
Definition: file.h:49