Exemplo n.º 1
0
/* Set a value of a flag for the email corresponding to 'message'. */
func (self *Message) SetFlag(flag Flag, value bool) {
	if self.message == nil {
		return
	}
	var v C.notmuch_bool_t = 0
	if value {
		v = 1
	}
	C.notmuch_message_set_flag(self.message, C.notmuch_message_flag_t(flag), v)
}
Exemplo n.º 2
0
/* Get a value of a flag for the email corresponding to 'message'. */
func (self *Message) GetFlag(flag Flag) bool {
	if self.message == nil {
		return false
	}
	v := C.notmuch_message_get_flag(self.message, C.notmuch_message_flag_t(flag))
	if v == 0 {
		return false
	}
	return true
}