1 Return-Path: <schnouki@schnouki.net>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 8A728429E38
\r
6 for <notmuch@notmuchmail.org>; Tue, 13 Dec 2011 09:12:12 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1]
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id oa9F7lZ19Dgn for <notmuch@notmuchmail.org>;
\r
17 Tue, 13 Dec 2011 09:12:11 -0800 (PST)
\r
18 Received: from ks3536.kimsufi.com (schnouki.net [87.98.217.222])
\r
19 by olra.theworths.org (Postfix) with ESMTP id C76B8429E30
\r
20 for <notmuch@notmuchmail.org>; Tue, 13 Dec 2011 09:12:09 -0800 (PST)
\r
21 Received: from thor.loria.fr (thor.loria.fr [152.81.12.250])
\r
22 by ks3536.kimsufi.com (Postfix) with ESMTPSA id 1D81B6A0026;
\r
23 Tue, 13 Dec 2011 18:12:09 +0100 (CET)
\r
24 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net;
\r
25 s=key-schnouki; t=1323796329;
\r
26 bh=ZCNb4W8qUOOTvM7dXv+9GHmskgUKIuqUjtxCtwcFigY=;
\r
27 h=From:To:Subject:Date:Message-Id:In-Reply-To:References;
\r
28 b=GbxkD1oHsqV8L0qnxkRNNSaQoWm2yESyTfCSJMaRlZqp5GTFRwOPMVQCZUF7pSxhc
\r
29 tEXhrADxyYfLEyp9D0jG44xRGC6YJbI1v4ksLefQ0ViTCS+SCwtLwSz8m5/VXU+9LZ
\r
30 e6x+wRg4H1UZqMfhILvijav5K2S2z08pIOPOFFU8=
\r
31 From: Thomas Jost <schnouki@schnouki.net>
\r
32 To: notmuch@notmuchmail.org
\r
33 Subject: [PATCH 5/5] python: add get_mtime() to the Message class
\r
34 Date: Tue, 13 Dec 2011 18:11:45 +0100
\r
35 Message-Id: <1323796305-28789-6-git-send-email-schnouki@schnouki.net>
\r
36 X-Mailer: git-send-email 1.7.8
\r
37 In-Reply-To: <1323796305-28789-1-git-send-email-schnouki@schnouki.net>
\r
38 References: <1323796305-28789-1-git-send-email-schnouki@schnouki.net>
\r
39 X-BeenThere: notmuch@notmuchmail.org
\r
40 X-Mailman-Version: 2.1.13
\r
42 List-Id: "Use and development of the notmuch mail system."
\r
43 <notmuch.notmuchmail.org>
\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
45 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
47 List-Post: <mailto:notmuch@notmuchmail.org>
\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
50 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
51 X-List-Received-Date: Tue, 13 Dec 2011 17:12:13 -0000
\r
54 bindings/python/notmuch/message.py | 20 ++++++++++++++++++++
\r
55 1 files changed, 20 insertions(+), 0 deletions(-)
\r
57 diff --git a/bindings/python/notmuch/message.py b/bindings/python/notmuch/message.py
\r
58 index ce8e718..56f56c2 100644
\r
59 --- a/bindings/python/notmuch/message.py
\r
60 +++ b/bindings/python/notmuch/message.py
\r
61 @@ -293,6 +293,10 @@ class Message(object):
\r
62 _get_date.argtypes = [NotmuchMessageP]
\r
63 _get_date.restype = c_long
\r
65 + _get_mtime = nmlib.notmuch_message_get_mtime
\r
66 + _get_mtime.argtypes = [NotmuchMessageP]
\r
67 + _get_mtime.restype = c_long
\r
69 _get_header = nmlib.notmuch_message_get_header
\r
70 _get_header.argtypes = [NotmuchMessageP, c_char_p]
\r
71 _get_header.restype = c_char_p
\r
72 @@ -401,6 +405,22 @@ class Message(object):
\r
73 raise NotmuchError(STATUS.NOT_INITIALIZED)
\r
74 return Message._get_date(self._msg)
\r
76 + def get_mtime(self):
\r
77 + """Returns time_t of the message mtime
\r
79 + The mtime is the timestamp of the last time the message was modified,
\r
80 + e.g. the time it was added to the database or the last time a tag was
\r
83 + :returns: A time_t timestamp.
\r
85 + :exception: :exc:`NotmuchError` STATUS.NOT_INITIALIZED if the message
\r
86 + is not initialized.
\r
88 + if self._msg is None:
\r
89 + raise NotmuchError(STATUS.NOT_INITIALIZED)
\r
90 + return Message._get_mtime(self._msg)
\r
92 def get_header(self, header):
\r
93 """Get the value of the specified header.
\r