--- /dev/null
+Return-Path: <feh@noam.feh.name>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id CD636431FBF\r
+ for <notmuch@notmuchmail.org>; Sat, 2 Mar 2013 06:57:32 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id oLa2mW3eP5JU for <notmuch@notmuchmail.org>;\r
+ Sat, 2 Mar 2013 06:57:28 -0800 (PST)\r
+Received: from noam.feh.name (noam.feh.name [176.9.34.52])\r
+ by olra.theworths.org (Postfix) with ESMTP id EF19B431FBC\r
+ for <notmuch@notmuchmail.org>; Sat, 2 Mar 2013 06:57:27 -0800 (PST)\r
+Received: by noam.feh.name (Postfix, from userid 1000)\r
+ id 51F60157C12F; Sat, 2 Mar 2013 15:51:19 +0100 (CET)\r
+From: Julius Plenz <julius@plenz.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 3/3] Go bindings: Wrap (most) remaining notmuch thread\r
+ functions\r
+Date: Sat, 2 Mar 2013 15:50:56 +0100\r
+Message-Id: <1362235856-15358-3-git-send-email-julius@plenz.com>\r
+X-Mailer: git-send-email 1.7.2.5\r
+In-Reply-To: <1362235856-15358-1-git-send-email-julius@plenz.com>\r
+References: <1362235856-15358-1-git-send-email-julius@plenz.com>\r
+X-Mailman-Approved-At: Sat, 02 Mar 2013 09:47:30 -0800\r
+Cc: Julius Plenz <julius@plenz.com>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 02 Mar 2013 14:57:33 -0000\r
+\r
+---\r
+ bindings/go/src/notmuch/notmuch.go | 89 +++++++++++++++++++++++++++++++++++-\r
+ 1 file changed, 88 insertions(+), 1 deletion(-)\r
+\r
+diff --git a/bindings/go/src/notmuch/notmuch.go b/bindings/go/src/notmuch/notmuch.go\r
+index 306b104..8829f82 100644\r
+--- a/bindings/go/src/notmuch/notmuch.go\r
++++ b/bindings/go/src/notmuch/notmuch.go\r
+@@ -385,7 +385,94 @@ func (self *Query) CountMessages() uint {\r
+ return uint(C.notmuch_query_count_messages(self.query))\r
+ }\r
+ \r
+-// TODO: wrap threads and thread\r
++func (self *Thread) GetToplevelMessages() *Messages {\r
++ if self.thread == nil {\r
++ return nil\r
++ }\r
++ msgs := C.notmuch_thread_get_toplevel_messages(self.thread)\r
++ if msgs == nil {\r
++ return nil\r
++ }\r
++ return &Messages{messages: msgs}\r
++}\r
++\r
++func (self *Thread) GetThreadId() string {\r
++ if self.thread == nil {\r
++ return ""\r
++ }\r
++ id := C.notmuch_thread_get_thread_id(self.thread)\r
++ if id == nil {\r
++ return ""\r
++ }\r
++ return C.GoString(id)\r
++}\r
++\r
++func (self *Thread) GetTotalMessages() uint {\r
++ if self.thread == nil {\r
++ return 0\r
++ }\r
++ return uint(C.notmuch_thread_get_total_messages(self.thread))\r
++}\r
++\r
++func (self *Thread) GetMatchedMessages() uint {\r
++ if self.thread == nil {\r
++ return 0\r
++ }\r
++ return uint(C.notmuch_thread_get_matched_messages(self.thread))\r
++}\r
++\r
++func (self *Thread) GetAuthors() string {\r
++ if self.thread == nil {\r
++ return ""\r
++ }\r
++ authors := C.notmuch_thread_get_authors(self.thread)\r
++ if authors == nil {\r
++ return ""\r
++ }\r
++ return C.GoString(authors)\r
++}\r
++\r
++func (self *Thread) GetSubject() string {\r
++ if self.thread == nil {\r
++ return ""\r
++ }\r
++ subject := C.notmuch_thread_get_subject(self.thread)\r
++ if subject == nil {\r
++ return ""\r
++ }\r
++ return C.GoString(subject)\r
++}\r
++\r
++func (self *Threads) MoveToNext() {\r
++ if self.threads == nil {\r
++ return\r
++ }\r
++ C.notmuch_threads_move_to_next(self.threads)\r
++}\r
++\r
++func (self *Threads) Get() *Thread {\r
++ if self.threads == nil {\r
++ return nil\r
++ }\r
++ t := C.notmuch_threads_get(self.threads)\r
++ if t == nil {\r
++ return nil\r
++ }\r
++ return &Thread{thread: t}\r
++}\r
++\r
++// TODO: notmuch_thread_get_oldest_date and notmuch_thread_get_newest_date\r
++\r
++func (self *Thread) GetTags() *Tags {\r
++ if self.thread == nil {\r
++ return nil\r
++ }\r
++ tags := C.notmuch_thread_get_tags(self.thread)\r
++ if tags == nil {\r
++ return nil\r
++ }\r
++ return &Tags{tags: tags}\r
++}\r
+ \r
+ func (self *Threads) Valid() bool {\r
+ if self.threads == nil {\r
+-- \r
+1.7.10.4\r
+\r