NeoMutt  2024-11-14-34-g5aaf0d
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
shared.h
Go to the documentation of this file.
1
23#ifndef MUTT_MAILDIR_SHARED_H
24#define MUTT_MAILDIR_SHARED_H
25
26#include <stdbool.h>
27#include <stdio.h>
28#include <sys/types.h>
29
30struct Buffer;
31struct Email;
32struct HeaderCache;
33struct Mailbox;
34struct Message;
35
36// These are needed by Maildir
37void maildir_canon_filename (struct Buffer *dest, const char *src);
38mode_t maildir_umask (struct Mailbox *m);
39bool maildir_update_flags (struct Mailbox *m, struct Email *e_old, struct Email *e_new);
40
41// These are needed by Notmuch
42struct Email *maildir_email_new (void);
43void maildir_gen_flags (char *dest, size_t destlen, struct Email *e);
44bool maildir_msg_open_new (struct Mailbox *m, struct Message *msg, const struct Email *e);
45FILE * maildir_open_find_message (const char *folder, const char *msg, char **newname);
46void maildir_parse_flags (struct Email *e, const char *path);
47bool maildir_parse_message (const char *fname, bool is_old, struct Email *e);
48bool maildir_parse_stream (FILE *fp, const char *fname, bool is_old, struct Email *e);
50int maildir_rewrite_message (struct Mailbox *m, struct Email *e);
51bool maildir_sync_mailbox_message(struct Mailbox *m, struct Email *e, struct HeaderCache *hc);
52void maildir_update_mtime (struct Mailbox *m);
53
54#endif /* MUTT_MAILDIR_SHARED_H */
bool maildir_msg_open_new(struct Mailbox *m, struct Message *msg, const struct Email *e)
Open a new message in a Mailbox - Implements MxOps::msg_open_new() -.
Definition: message.c:532
int maildir_rewrite_message(struct Mailbox *m, struct Email *e)
Sync a message in an Maildir folder.
Definition: message.c:454
bool maildir_parse_message(const char *fname, bool is_old, struct Email *e)
Actually parse a maildir message.
Definition: mailbox.c:190
void maildir_update_mtime(struct Mailbox *m)
Update our record of the Maildir modification time.
Definition: mailbox.c:716
FILE * maildir_open_find_message(const char *folder, const char *msg, char **newname)
Find a message by name.
Definition: message.c:170
bool maildir_update_flags(struct Mailbox *m, struct Email *e_old, struct Email *e_new)
Update the mailbox flags.
Definition: shared.c:105
struct Email * maildir_email_new(void)
Create a Maildir Email.
Definition: mailbox.c:68
mode_t maildir_umask(struct Mailbox *m)
Create a umask from the mailbox directory.
Definition: shared.c:47
bool maildir_sync_mailbox_message(struct Mailbox *m, struct Email *e, struct HeaderCache *hc)
Save changes to the mailbox.
Definition: message.c:312
bool maildir_parse_stream(FILE *fp, const char *fname, bool is_old, struct Email *e)
Parse a Maildir message.
Definition: mailbox.c:153
void maildir_gen_flags(char *dest, size_t destlen, struct Email *e)
Generate the Maildir flags for an email.
Definition: message.c:73
int maildir_path_is_empty(struct Buffer *path)
Is the mailbox empty.
Definition: path.c:57
void maildir_canon_filename(struct Buffer *dest, const char *src)
Generate the canonical filename for a Maildir folder.
Definition: shared.c:73
void maildir_parse_flags(struct Email *e, const char *path)
Parse Maildir file flags.
Definition: mailbox.c:82
String manipulation buffer.
Definition: buffer.h:36
The envelope/body of an email.
Definition: email.h:39
char * path
Path of Email (for local Mailboxes)
Definition: email.h:70
Header Cache.
Definition: lib.h:86
A mailbox.
Definition: mailbox.h:79
A local copy of an email.
Definition: message.h:34