From 41c7ad2c91e56bfc0b2fefa0be303605d34f4042 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 29 Oct 2009 16:06:27 -0700 Subject: notmuch show: Add a one-line summary of the message before the header. The idea here is that a client could usefully display just this one line while optionally hiding the other header fields. --- message.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'message.cc') diff --git a/message.cc b/message.cc index e2f1cd3..2a90014 100644 --- a/message.cc +++ b/message.cc @@ -370,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) { -- cgit v1.2.3