Beispiel #1
0
// Next retrieves the next message from the result set. Next returns true if a message
// was successfully retrieved.
func (ms *Messages) Next(m *Message) bool {
	if !ms.valid() {
		return false
	}
	*m = *ms.get()
	C.notmuch_messages_move_to_next(ms.toC())
	return true
}
Beispiel #2
0
/* Move the 'messages' iterator to the next message.
 *
 * If 'messages' is already pointing at the last message then the
 * iterator will be moved to a point just beyond that last message,
 * (where notmuch_messages_valid will return FALSE and
 * notmuch_messages_get will return NULL).
 *
 * See the documentation of notmuch_query_search_messages for example
 * code showing how to iterate over a notmuch_messages_t object.
 */
func (self *Messages) MoveToNext() {
	if self.messages == nil {
		return
	}
	C.notmuch_messages_move_to_next(self.messages)
}