NeoMutt  2021-02-05-666-ge300cd
Teaching an old dog new tricks
DOXYGEN
sequence.h
Go to the documentation of this file.
1 
23 #ifndef MUTT_MAILDIR_SEQUENCE_H
24 #define MUTT_MAILDIR_SEQUENCE_H
25 
26 #include <stdbool.h>
27 #include <stdint.h>
28 
29 struct Mailbox;
30 
31 typedef uint8_t MhSeqFlags;
32 #define MH_SEQ_NO_FLAGS 0
33 #define MH_SEQ_UNSEEN (1 << 0)
34 #define MH_SEQ_REPLIED (1 << 1)
35 #define MH_SEQ_FLAGGED (1 << 2)
36 
37 
41 {
42  int max;
44 };
45 
46 int mh_seq_read (struct MhSequences *mhs, const char *path);
47 void mh_seq_add_one(struct Mailbox *m, int n, bool unseen, bool flagged, bool replied);
48 int mh_seq_changed(struct Mailbox *m);
49 void mh_seq_update (struct Mailbox *m);
50 MhSeqFlags mh_seq_check (struct MhSequences *mhs, int i);
51 void mh_seq_free (struct MhSequences *mhs);
52 
53 #endif /* MUTT_MAILDIR_SEQUENCE_H */
void mh_seq_add_one(struct Mailbox *m, int n, bool unseen, bool flagged, bool replied)
Update the flags for one sequence.
Definition: sequence.c:107
int mh_seq_read(struct MhSequences *mhs, const char *path)
Read a set of MH sequences.
Definition: sequence.c:381
MhSeqFlags mh_seq_check(struct MhSequences *mhs, int i)
Get the flags for a given sequence.
Definition: sequence.c:78
int max
Number of flags stored.
Definition: sequence.h:42
uint8_t MhSeqFlags
Flags, e.g. MH_SEQ_UNSEEN.
Definition: sequence.h:29
Set of MH sequence numbers.
Definition: sequence.h:40
int mh_seq_changed(struct Mailbox *m)
Has the mailbox changed.
Definition: sequence.c:445
A mailbox.
Definition: mailbox.h:81
void mh_seq_update(struct Mailbox *m)
Update sequence numbers.
Definition: sequence.c:234
MhSeqFlags * flags
Flags for each email.
Definition: sequence.h:43
void mh_seq_free(struct MhSequences *mhs)
Free some sequences.
Definition: sequence.c:67