// Messages returns an iterator for all messages in the current thread in // oldest-first order. func (t *Thread) Messages() *Messages { msgs := &Messages{ cptr: unsafe.Pointer(C.notmuch_thread_get_messages(t.toC())), parent: (*cStruct)(t), } setGcClose(msgs) return msgs }
/** * Get a notmuch_thread_t iterator for all messages in 'thread' in * oldest-first order. * * The returned list will be destroyed when the thread is destroyed. */ func (self *Thread) GetMessages() (*Messages, Status) { if self.thread == nil { return nil, STATUS_NULL_POINTER } msgs := C.notmuch_thread_get_messages(self.thread) if msgs == nil { return nil, STATUS_NULL_POINTER } return &Messages{msgs}, STATUS_SUCCESS }