1 Return-Path: <amdragon@mit.edu>
\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 D2574431FAF
\r
6 for <notmuch@notmuchmail.org>; Sat, 24 Nov 2012 20:57:20 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id 17v9DrMx3V9J for <notmuch@notmuchmail.org>;
\r
16 Sat, 24 Nov 2012 20:57:20 -0800 (PST)
\r
17 Received: from dmz-mailsec-scanner-8.mit.edu (DMZ-MAILSEC-SCANNER-8.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id 6ED8C431FB6
\r
20 for <notmuch@notmuchmail.org>; Sat, 24 Nov 2012 20:57:19 -0800 (PST)
\r
21 X-AuditID: 12074425-b7fcc6d00000091f-4b-50b1a52d3832
\r
22 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])
\r
23 by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id 68.2A.02335.D25A1B05; Sat, 24 Nov 2012 23:57:17 -0500 (EST)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id qAP4vHVF018858;
\r
27 Sat, 24 Nov 2012 23:57:17 -0500
\r
28 Received: from drake.dyndns.org
\r
29 (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com
\r
30 [209.6.116.242]) (authenticated bits=0)
\r
31 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
32 by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id qAP4vECf000087
\r
33 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
34 Sat, 24 Nov 2012 23:57:16 -0500 (EST)
\r
35 Received: from amthrax by drake.dyndns.org with local (Exim 4.77)
\r
36 (envelope-from <amdragon@mit.edu>)
\r
37 id 1TcUHK-0003Zy-1g; Sat, 24 Nov 2012 23:57:14 -0500
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: notmuch@notmuchmail.org
\r
40 Subject: [PATCH 6/6] ruby: Add bindings for notmuch_thread_get_messages
\r
41 Date: Sat, 24 Nov 2012 23:57:07 -0500
\r
42 Message-Id: <1353819427-13182-7-git-send-email-amdragon@mit.edu>
\r
43 X-Mailer: git-send-email 1.7.10.4
\r
44 In-Reply-To: <1353819427-13182-1-git-send-email-amdragon@mit.edu>
\r
45 References: <1353819427-13182-1-git-send-email-amdragon@mit.edu>
\r
46 X-Brightmail-Tracker:
\r
47 H4sIAAAAAAAAA+NgFtrDIsWRmVeSWpSXmKPExsUixCmqrau7dGOAwcrvOhar5/JYXL85k9mB
\r
48 yWPnrLvsHs9W3WIOYIrisklJzcksSy3St0vgyji/+zt7wV+hio61B9kaGH/zdzFyckgImEg0
\r
49 fJzABmGLSVy4tx7I5uIQEtjHKPH++nZmCGcDo8TSh7NZIJxHTBLPPj+EKpvLKPFi+gIWkH42
\r
50 AQ2JbfuXM4LYIgLSEjvvzmYFsZkFHCU+718EtkNYwF3i+rsNYPUsAqoSS/uPgcV5BRwklvx+
\r
51 yw5xh6JE9zOQmzg4OIF6G/fKgYSFgEpu/ZvEPIGRfwEjwypG2ZTcKt3cxMyc4tRk3eLkxLy8
\r
52 1CJdC73czBK91JTSTYygQGJ3Ud3BOOGQ0iFGAQ5GJR7eG4kbA4RYE8uKK3MPMUpyMCmJ8mYu
\r
53 AgrxJeWnVGYkFmfEF5XmpBYfYpTgYFYS4bVWBcrxpiRWVqUW5cOkpDlYlMR5b6Tc9BcSSE8s
\r
54 Sc1OTS1ILYLJynBwKEnw3loM1ChYlJqeWpGWmVOCkGbi4AQZzgM0XHQJyPDigsTc4sx0iPwp
\r
55 RkUpcd7PIM0CIImM0jy4Xlikv2IUB3pFmJcJpJ0HmCTgul8BDWYCGvx09jqQwSWJCCmpBsZs
\r
56 kT0imarVb6WEJeX2dhkvDeCe8CqsabXIJdHVfI6aGT8SLfe9dq1mava/kCGp5V+fUxbz06rp
\r
57 /fONt2Uf3V/6uuqpg9WMivXP7J7zzmOz2zJ325XT+yPvM32Zfokjflf2pSh/iS63fZw9hSck
\r
58 TQ5unnWt5tqJTkvvw6uFXCTXh8jE9LEsnqHEUpyRaKjFXFScCABA5MqNzwIAAA==
\r
59 X-BeenThere: notmuch@notmuchmail.org
\r
60 X-Mailman-Version: 2.1.13
\r
62 List-Id: "Use and development of the notmuch mail system."
\r
63 <notmuch.notmuchmail.org>
\r
64 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
65 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
66 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
67 List-Post: <mailto:notmuch@notmuchmail.org>
\r
68 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
69 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
70 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
71 X-List-Received-Date: Sun, 25 Nov 2012 04:57:21 -0000
\r
74 bindings/ruby/defs.h | 3 +++
\r
75 bindings/ruby/init.c | 1 +
\r
76 bindings/ruby/thread.c | 20 ++++++++++++++++++++
\r
77 3 files changed, 24 insertions(+)
\r
79 diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h
\r
80 index fe81b3f..5b44585 100644
\r
81 --- a/bindings/ruby/defs.h
\r
82 +++ b/bindings/ruby/defs.h
\r
83 @@ -262,6 +262,9 @@ VALUE
\r
84 notmuch_rb_thread_get_toplevel_messages (VALUE self);
\r
87 +notmuch_rb_thread_get_messages (VALUE self);
\r
90 notmuch_rb_thread_get_matched_messages (VALUE self);
\r
93 diff --git a/bindings/ruby/init.c b/bindings/ruby/init.c
\r
94 index f4931d3..663271d 100644
\r
95 --- a/bindings/ruby/init.c
\r
96 +++ b/bindings/ruby/init.c
\r
97 @@ -306,6 +306,7 @@ Init_notmuch (void)
\r
98 rb_define_method (notmuch_rb_cThread, "thread_id", notmuch_rb_thread_get_thread_id, 0); /* in thread.c */
\r
99 rb_define_method (notmuch_rb_cThread, "total_messages", notmuch_rb_thread_get_total_messages, 0); /* in thread.c */
\r
100 rb_define_method (notmuch_rb_cThread, "toplevel_messages", notmuch_rb_thread_get_toplevel_messages, 0); /* in thread.c */
\r
101 + rb_define_method (notmuch_rb_cThread, "messages", notmuch_rb_thread_get_messages, 0); /* in thread.c */
\r
102 rb_define_method (notmuch_rb_cThread, "matched_messages", notmuch_rb_thread_get_matched_messages, 0); /* in thread.c */
\r
103 rb_define_method (notmuch_rb_cThread, "authors", notmuch_rb_thread_get_authors, 0); /* in thread.c */
\r
104 rb_define_method (notmuch_rb_cThread, "subject", notmuch_rb_thread_get_subject, 0); /* in thread.c */
\r
105 diff --git a/bindings/ruby/thread.c b/bindings/ruby/thread.c
\r
106 index efe5aaf..56616d9 100644
\r
107 --- a/bindings/ruby/thread.c
\r
108 +++ b/bindings/ruby/thread.c
\r
109 @@ -92,6 +92,26 @@ notmuch_rb_thread_get_toplevel_messages (VALUE self)
\r
113 + * call-seq: THREAD.messages => MESSAGES
\r
115 + * Get a Notmuch::Messages iterator for the all messages in thread.
\r
118 +notmuch_rb_thread_get_messages (VALUE self)
\r
120 + notmuch_messages_t *messages;
\r
121 + notmuch_thread_t *thread;
\r
123 + Data_Get_Notmuch_Thread (self, thread);
\r
125 + messages = notmuch_thread_get_messages (thread);
\r
127 + rb_raise (notmuch_rb_eMemoryError, "Out of memory");
\r
129 + return Data_Wrap_Struct (notmuch_rb_cMessages, NULL, NULL, messages);
\r
133 * call-seq: THREAD.matched_messages => fixnum
\r
135 * Get the number of messages in thread that matched the search
\r