Maildir shared functions. More...
#include <stdbool.h>#include <stdio.h>#include <sys/types.h>
Include dependency graph for shared.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Functions | |
| void | maildir_canon_filename (struct Buffer *dest, const char *src) |
| Generate the canonical filename for a Maildir folder. | |
| mode_t | maildir_umask (struct Mailbox *m) |
| Create a umask from the mailbox directory. | |
| bool | maildir_update_flags (struct Mailbox *m, struct Email *e_old, struct Email *e_new) |
| Update the mailbox flags. | |
| struct Email * | maildir_email_new (void) |
| Create a Maildir Email. | |
| void | maildir_gen_flags (char *dest, size_t destlen, struct Email *e) |
| Generate the Maildir flags for an email. | |
| 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() -. | |
| FILE * | maildir_open_find_message (const char *folder, const char *msg, char **newname) |
| Find a message by name. | |
| void | maildir_parse_flags (struct Email *e, const char *path) |
| Parse Maildir file flags. | |
| bool | maildir_parse_message (const char *fname, bool is_old, struct Email *e) |
| Actually parse a maildir message. | |
| bool | maildir_parse_stream (FILE *fp, const char *fname, bool is_old, struct Email *e) |
| Parse a Maildir message. | |
| int | maildir_path_is_empty (struct Buffer *path) |
| Is the mailbox empty. | |
| int | maildir_rewrite_message (struct Mailbox *m, struct Email *e) |
| Sync a message in an Maildir folder. | |
| bool | maildir_sync_mailbox_message (struct Mailbox *m, struct Email *e, struct HeaderCache *hc) |
| Save changes to the mailbox. | |
| void | maildir_update_mtime (struct Mailbox *m) |
| Update our record of the Maildir modification time. | |
Maildir shared functions.
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 shared.h.
| void maildir_canon_filename | ( | struct Buffer * | dest, |
| const char * | src ) |
Generate the canonical filename for a Maildir folder.
: may be replaced as the field delimiter by a user defined alternative. Definition at line 73 of file shared.c.
Here is the call graph for this function:
Here is the caller graph for this function:| mode_t maildir_umask | ( | struct Mailbox * | m | ) |
Create a umask from the mailbox directory.
| m | Mailbox |
| num | Umask |
Definition at line 47 of file shared.c.
Here is the call graph for this function:
Here is the caller graph for this function:Update the mailbox flags.
| true | The flags changed |
| false | Otherwise |
Definition at line 105 of file shared.c.
Here is the call graph for this function:
Here is the caller graph for this function:| struct Email * maildir_email_new | ( | void | ) |
Create a Maildir Email.
| ptr | Newly created Email |
Create a new Email and attach MaildirEmailData.
Definition at line 67 of file mailbox.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void maildir_gen_flags | ( | char * | dest, |
| size_t | destlen, | ||
| struct Email * | e ) |
Generate the Maildir flags for an email.
Definition at line 72 of file message.c.
Here is the call graph for this function:
Here is the caller graph for this function:| FILE * maildir_open_find_message | ( | const char * | folder, |
| const char * | msg, | ||
| char ** | newname ) |
Find a message by name.
| [in] | folder | Maildir path |
| [in] | msg | Email path |
| [out] | newname | New name, if it has moved |
| ptr | File handle |
Definition at line 169 of file message.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void maildir_parse_flags | ( | struct Email * | e, |
| const char * | path ) |
Parse Maildir file flags.
| e | |
| path | Path to email file |
Definition at line 81 of file mailbox.c.
Here is the call graph for this function:
Here is the caller graph for this function:| bool maildir_parse_message | ( | const char * | fname, |
| bool | is_old, | ||
| struct Email * | e ) |
Actually parse a maildir message.
| true | Success |
This may also be used to fill out a fake header structure generated by lazy maildir parsing.
Definition at line 194 of file mailbox.c.
Here is the call graph for this function:
Here is the caller graph for this function:| bool maildir_parse_stream | ( | FILE * | fp, |
| const char * | fname, | ||
| bool | is_old, | ||
| struct Email * | e ) |
Parse a Maildir message.
| fp | Message file handle |
| fname | Message filename |
| is_old | true, if the email is old (read) |
| e |
| true | Success |
Actually parse a maildir message. This may also be used to fill out a fake header structure generated by lazy maildir parsing.
Definition at line 157 of file mailbox.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int maildir_path_is_empty | ( | struct Buffer * | path | ) |
Is the mailbox empty.
| path | Mailbox to check |
Definition at line 56 of file path.c.
Here is the call graph for this function:Sync a message in an Maildir folder.
| 0 | Success |
| -1 | Error |
Definition at line 453 of file message.c.
Here is the call graph for this function:
Here is the caller graph for this function:| bool maildir_sync_mailbox_message | ( | struct Mailbox * | m, |
| struct Email * | e, | ||
| struct HeaderCache * | hc ) |
Save changes to the mailbox.
| true | Success |
| false | Error |
Definition at line 311 of file message.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void maildir_update_mtime | ( | struct Mailbox * | m | ) |
Update our record of the Maildir modification time.
| m | Mailbox |
Definition at line 720 of file mailbox.c.
Here is the call graph for this function:
Here is the caller graph for this function: