Add getBoolProperty

This commit is contained in:
Christian Müller 2019-05-16 16:41:51 +02:00
parent 98bb278033
commit d277069c44

View file

@ -84,6 +84,14 @@ func (d *dbusBase) getSliceObjectProperty(iface string) []dbus.ObjectPath {
return value
}
func (d *dbusBase) getBoolProperty(iface string) bool {
value, ok := d.getProperty(iface).(bool)
if !ok {
panic(makeErrVariantType(iface))
}
return value
}
func (d *dbusBase) getStringProperty(iface string) string {
value, ok := d.getProperty(iface).(string)
if !ok {