예제 #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
파일: notmuch.go 프로젝트: notmuch/notmuch
/**
 * 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
}