diff options
author | Carl Worth <cworth@cworth.org> | 2009-10-29 08:51:12 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2009-10-29 08:51:12 -0700 |
commit | bf78a89196b251c2465f6cefa8198f22c87ff23d (patch) | |
tree | 3728d25ec1ec9317cb4aca314ab7f8fa932f15d4 /notmuch.h | |
parent | b39ebca8c97fb19c52e46a2b9565c2d9fa0707d0 (diff) |
notmuch show: Initial implementation (headers only)
We're using a delimiter syntax that Keith is optimistic about
being able to easily parse in emacs. Note: We're not escaping
any occurrence of the delimiters in the message yet, so we'll
need to fix that.
Diffstat (limited to 'notmuch.h')
-rw-r--r-- | notmuch.h | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -617,6 +617,35 @@ notmuch_message_get_thread_id (notmuch_message_t *message); const char * notmuch_message_get_filename (notmuch_message_t *message); +/* Get the value of the specified header from 'message'. + * + * The value will be read from the actual message file, not from the + * notmuch database. The header name is case insensitive. + * + * The returned string belongs to the message so should not be + * modified or freed by the caller (nor should it be referenced after + * the message is destroyed). + * + * Returns NULL if the message does not contain a header line matching + * 'header' of if any error occurs. + */ +const char * +notmuch_message_get_header (notmuch_message_t *message, const char *header); + +/* Get the entire set of headers from an email message as a string. + * + * The value will be read from the actual message file, not from the + * notmuch database. + * + * The returned value is owned by the notmuch message and is valid + * only until the message is closed. The caller should copy it if + * needing to modify the value or to hold onto it for longer. + * + * Returns NULL in the case of any error. + */ +const char * +notmuch_message_get_all_headers (notmuch_message_t *message); + /* Get the tags for 'message', returning a notmuch_tags_t object which * can be used to iterate over all tags. * |