#include <stdbool.h>
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | MhSequences |
Set of MH sequence numbers. More... | |
Macros | |
#define | MH_SEQ_NO_FLAGS 0 |
No flags are set. | |
#define | MH_SEQ_UNSEEN (1 << 0) |
Email hasn't been read. | |
#define | MH_SEQ_REPLIED (1 << 1) |
Email has been replied to. | |
#define | MH_SEQ_FLAGGED (1 << 2) |
Email is flagged. | |
Typedefs | |
typedef uint8_t | MhSeqFlags |
Flags, e.g. MH_SEQ_UNSEEN. | |
Functions | |
void | mh_seq_add_one (struct Mailbox *m, int n, bool unseen, bool flagged, bool replied) |
Update the flags for one sequence. | |
int | mh_seq_changed (struct Mailbox *m) |
Has the mailbox changed. | |
MhSeqFlags | mh_seq_check (struct MhSequences *mhs, int i) |
Get the flags for a given sequence. | |
void | mh_seq_free (struct MhSequences *mhs) |
Free some sequences. | |
int | mh_seq_read (struct MhSequences *mhs, const char *path) |
Read a set of MH sequences. | |
void | mh_seq_update (struct Mailbox *m) |
Update sequence numbers. | |
MH Mailbox Sequences.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file sequence.h.
#define MH_SEQ_NO_FLAGS 0 |
No flags are set.
Definition at line 32 of file sequence.h.
#define MH_SEQ_UNSEEN (1 << 0) |
Email hasn't been read.
Definition at line 33 of file sequence.h.
#define MH_SEQ_REPLIED (1 << 1) |
Email has been replied to.
Definition at line 34 of file sequence.h.
#define MH_SEQ_FLAGGED (1 << 2) |
Email is flagged.
Definition at line 35 of file sequence.h.
typedef uint8_t MhSeqFlags |
Flags, e.g. MH_SEQ_UNSEEN.
Definition at line 31 of file sequence.h.
void mh_seq_add_one | ( | struct Mailbox * | m, |
int | n, | ||
bool | unseen, | ||
bool | flagged, | ||
bool | replied | ||
) |
Update the flags for one sequence.
m | Mailbox |
n | Sequence number to update |
unseen | Update the unseen sequence |
flagged | Update the flagged sequence |
replied | Update the replied sequence |
Definition at line 108 of file sequence.c.
int mh_seq_changed | ( | struct Mailbox * | m | ) |
Has the mailbox changed.
m | Mailbox |
1 | mh_sequences last modification time is more recent than the last visit to this mailbox |
0 | modification time is older |
-1 | Error |
Definition at line 439 of file sequence.c.
MhSeqFlags mh_seq_check | ( | struct MhSequences * | mhs, |
int | i | ||
) |
Get the flags for a given sequence.
mhs | Sequences |
i | Index number required |
num | Flags, see MhSeqFlags |
Definition at line 79 of file sequence.c.
void mh_seq_free | ( | struct MhSequences * | mhs | ) |
Free some sequences.
mhs | Sequences to free |
Definition at line 68 of file sequence.c.
int mh_seq_read | ( | struct MhSequences * | mhs, |
const char * | path | ||
) |
Read a set of MH sequences.
mhs | Existing sequences |
path | File to read from |
0 | Success |
-1 | Error |
Definition at line 378 of file sequence.c.
void mh_seq_update | ( | struct Mailbox * | m | ) |
Update sequence numbers.
m | Mailbox |
XXX we don't currently remove deleted messages from sequences we don't know. Should we?
Definition at line 234 of file sequence.c.