X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=message.cc;h=2a9001493721dc5493d643659c36afde4f74028b;hp=dfd55d596e21af0cac4d79416f9029644a5f4d75;hb=c33eed84f2c1a23d7f3835f7f7d480fde179ff4d;hpb=bf78a89196b251c2465f6cefa8198f22c87ff23d diff --git a/message.cc b/message.cc index dfd55d59..2a900149 100644 --- a/message.cc +++ b/message.cc @@ -267,6 +267,17 @@ notmuch_message_get_all_headers (notmuch_message_t *message) return notmuch_message_file_get_all_headers (message->message_file); } +size_t +notmuch_message_get_header_size (notmuch_message_t *message) +{ + _notmuch_message_ensure_message_file (message); + if (message->message_file == NULL) + return 0; + + return notmuch_message_file_get_header_size (message->message_file); + +} + const char * notmuch_message_get_thread_id (notmuch_message_t *message) { @@ -359,6 +370,21 @@ notmuch_message_get_filename (notmuch_message_t *message) return message->filename; } +time_t +notmuch_message_get_date (notmuch_message_t *message) +{ + std::string value; + + try { + value = message->doc.get_value (NOTMUCH_VALUE_TIMESTAMP); + } catch (Xapian::Error &error) { + INTERNAL_ERROR ("Failed to read timestamp value from document."); + return 0; + } + + return Xapian::sortable_unserialise (value); +} + notmuch_tags_t * notmuch_message_get_tags (notmuch_message_t *message) {