diff options
author | Carl Worth <cworth@cworth.org> | 2009-10-22 15:31:56 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2009-10-22 15:31:56 -0700 |
commit | 6a4992bc611881b363583b4a20fc530c770aedd8 (patch) | |
tree | 7b5a8465e86e1cd3f732fc62115474eb7ae0aae1 /notmuch-private.h | |
parent | 5794496c6e8b49ab62478b21a2178e5e2e353399 (diff) |
Generate message ID (using SHA1) when a mail message contains none.
This is important as we're using the message ID as the unique key
in our database. So previously, all messages with no message ID
would be treated as the same message---not good at all.
Diffstat (limited to 'notmuch-private.h')
-rw-r--r-- | notmuch-private.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/notmuch-private.h b/notmuch-private.h index bb3f62c..2d64a45 100644 --- a/notmuch-private.h +++ b/notmuch-private.h @@ -192,6 +192,20 @@ notmuch_message_file_get_header (notmuch_message_file_t *message, time_t notmuch_parse_date (const char *str, int *tz_offset); +/* sha1.c */ + +/* Create a hexadecimal string version of the SHA-1 digest of the + * named file. + * + * This function returns a newly allocated string which the caller + * should free() when finished. + * + * If any error occurs while reading the file, (permission denied, + * file not found, etc.), this function returns NULL. + */ +char * +notmuch_sha1_of_file (const char *filename); + NOTMUCH_END_DECLS #endif |