// Code generated by "dbusutil-gen -type InputDevices inputdevices.go"; DO NOT EDIT.

package inputdevices

import (
	"github.com/godbus/dbus"
)

func (v *InputDevices) setPropTouchscreens(value []dbus.ObjectPath) (changed bool) {
	if !touchscreenSliceEqual(v.Touchscreens, value) {
		v.Touchscreens = value
		v.emitPropChangedTouchscreens(value)
		return true
	}
	return false
}

func (v *InputDevices) emitPropChangedTouchscreens(value []dbus.ObjectPath) error {
	return v.service.EmitPropertyChanged(v, "Touchscreens", value)
}

func (v *InputDevices) setPropSupportWakeupDevices(path string, value string) (changed bool) {
	if v.SupportWakeupDevices[path] != value {
		err := v.saveDeviceFile(path, value, false)
		if err != nil {
			logger.Debug("[setPropSupportWakeupDevices] saveDeviceFile : ", err)
			return false
		}
		v.SupportWakeupDevices[path] = value
		logger.Debug("[setPropSupportWakeupDevices] Add devices SupportWakeupDevices : ", v.SupportWakeupDevices)
		v.emitPropChangedSupportWakeupDevices(v.SupportWakeupDevices)
		return true
	}
	return false
}

func (v *InputDevices) emitPropChangedSupportWakeupDevices(value map[string]string) error {
	return v.service.EmitPropertyChanged(v, "SupportWakeupDevices", v.SupportWakeupDevices)
}

func (v *Touchpad) setPropEnable(value bool) (changed bool) {
	if v.Enable != value {
		v.Enable = value
		v.emitPropChangedEnable(value)
		return true
	}
	return false
}

func (v *Touchpad) emitPropChangedEnable(value bool) error {
	return v.service.EmitPropertyChanged(v, "Enable", value)
}

func (v *Touchpad) setPropIsExist(value bool) (changed bool) {
	if v.IsExist != value {
		v.IsExist = value
		v.emitPropChangedIsExist(value)
		return true
	}
	return false
}

func (v *Touchpad) emitPropChangedIsExist(value bool) error {
	return v.service.EmitPropertyChanged(v, "IsExist", value)
}

func (v *Touchpad) setPropExpandEnable(value bool) (changed bool) {
	if v.ExpandEnable != value {
		v.ExpandEnable = value
		v.emitPropChangedExpandEnable(value)
		return true
	}
	return false
}

func (v *Touchpad) emitPropChangedExpandEnable(value bool) error {
	return v.service.EmitPropertyChanged(v, "ExpandEnable", value)
}

func (v *Touchpad) setPropExpandIsExist(value bool) (changed bool) {
	if v.ExpandIsExist != value {
		v.ExpandIsExist = value
		v.emitPropChangedExpandIsExist(value)
		return true
	}
	return false
}

func (v *Touchpad) emitPropChangedExpandIsExist(value bool) error {
	return v.service.EmitPropertyChanged(v, "ExpandIsExist", value)
}