1 Return-Path: <alip@exherbo.org>
\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 B529B431FB5
\r
6 for <notmuch@notmuchmail.org>; Mon, 10 Jan 2011 06:39:29 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"
\r
12 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\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 2pW3-wjwqypr for <notmuch@notmuchmail.org>;
\r
17 Mon, 10 Jan 2011 06:39:29 -0800 (PST)
\r
18 Received: from bach.exherbo.org (bach.exherbo.org [78.47.197.147])
\r
19 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 57A6742D283
\r
22 for <notmuch@notmuchmail.org>; Mon, 10 Jan 2011 06:39:27 -0800 (PST)
\r
23 Received: from localhost ([127.0.0.1] helo=karatren.karatren.ev ident=alip)
\r
24 by bach.exherbo.org with esmtpa (Exim 4.71)
\r
25 (envelope-from <alip@exherbo.org>)
\r
26 id 1PcIu0-0006iw-Pl; Mon, 10 Jan 2011 14:39:21 +0000
\r
27 Received: by karatren.karatren.ev (Postfix, from userid 1000)
\r
28 id 69EB71BAA38; Mon, 10 Jan 2011 16:39:28 +0200 (EET)
\r
29 From: Ali Polatel <alip@exherbo.org>
\r
30 To: notmuch@notmuchmail.org
\r
31 Subject: [PATCH 3/4] ruby: Add wrapper for message_get_filenames
\r
32 Date: Mon, 10 Jan 2011 16:39:27 +0200
\r
34 <44ae5735aa93b3285405ed95e33b33ef640b01ef.1294669955.git.alip@exherbo.org>
\r
35 X-Mailer: git-send-email 1.7.3.5
\r
36 In-Reply-To: <cover.1294669955.git.alip@exherbo.org>
\r
37 References: <cover.1294669955.git.alip@exherbo.org>
\r
38 In-Reply-To: <cover.1294669955.git.alip@exherbo.org>
\r
39 References: <cover.1294669955.git.alip@exherbo.org>
\r
40 Organization: Pink Floyd
\r
41 X-BeenThere: notmuch@notmuchmail.org
\r
42 X-Mailman-Version: 2.1.13
\r
44 List-Id: "Use and development of the notmuch mail system."
\r
45 <notmuch.notmuchmail.org>
\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
47 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
49 List-Post: <mailto:notmuch@notmuchmail.org>
\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
52 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
53 X-List-Received-Date: Mon, 10 Jan 2011 14:39:30 -0000
\r
56 bindings/ruby/defs.h | 3 +++
\r
57 bindings/ruby/init.c | 1 +
\r
58 bindings/ruby/message.c | 18 ++++++++++++++++++
\r
59 3 files changed, 22 insertions(+), 0 deletions(-)
\r
61 diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h
\r
62 index 1f52988..f00afef 100644
\r
63 --- a/bindings/ruby/defs.h
\r
64 +++ b/bindings/ruby/defs.h
\r
65 @@ -269,6 +269,9 @@ VALUE
\r
66 notmuch_rb_message_get_filename(VALUE self);
\r
69 +notmuch_rb_message_get_filenames(VALUE self);
\r
72 notmuch_rb_message_get_flag(VALUE self, VALUE flagv);
\r
75 diff --git a/bindings/ruby/init.c b/bindings/ruby/init.c
\r
76 index 4a63ba0..aa09c8d 100644
\r
77 --- a/bindings/ruby/init.c
\r
78 +++ b/bindings/ruby/init.c
\r
79 @@ -263,6 +263,7 @@ Init_notmuch(void)
\r
80 rb_define_method(notmuch_rb_cMessage, "thread_id", notmuch_rb_message_get_thread_id, 0);
\r
81 rb_define_method(notmuch_rb_cMessage, "replies", notmuch_rb_message_get_replies, 0);
\r
82 rb_define_method(notmuch_rb_cMessage, "filename", notmuch_rb_message_get_filename, 0);
\r
83 + rb_define_method(notmuch_rb_cMessage, "filenames", notmuch_rb_message_get_filenames, 0);
\r
84 rb_define_method(notmuch_rb_cMessage, "get_flag", notmuch_rb_message_get_flag, 1);
\r
85 rb_define_method(notmuch_rb_cMessage, "set_flag", notmuch_rb_message_set_flag, 2);
\r
86 rb_define_method(notmuch_rb_cMessage, "date", notmuch_rb_message_get_date, 0);
\r
87 diff --git a/bindings/ruby/message.c b/bindings/ruby/message.c
\r
88 index 1b2c01e..49dbace 100644
\r
89 --- a/bindings/ruby/message.c
\r
90 +++ b/bindings/ruby/message.c
\r
91 @@ -111,6 +111,24 @@ notmuch_rb_message_get_filename(VALUE self)
\r
95 + * call-seq: MESSAGE.filanames => FILENAMES
\r
97 + * Get all filenames for the email corresponding to MESSAGE.
\r
100 +notmuch_rb_message_get_filenames(VALUE self)
\r
102 + notmuch_filenames_t *fnames;
\r
103 + notmuch_message_t *message;
\r
105 + Data_Get_Notmuch_Message(self, message);
\r
107 + fnames = notmuch_message_get_filenames(message);
\r
109 + return Data_Wrap_Struct(notmuch_rb_cFileNames, NULL, NULL, fnames);
\r
113 * call-seq: MESSAGE.get_flag(flag) => true or false
\r
115 * Get a value of a flag for the email corresponding to 'message'
\r