示例#1
0
文件: thread.go 项目: gmuch/gmuch
// 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
}
示例#2
0
/**
 * 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
}