Add getBoolProperty
This commit is contained in:
parent
98bb278033
commit
d277069c44
1 changed files with 8 additions and 0 deletions
8
utils.go
8
utils.go
|
@ -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 {
|
||||
|
|
Reference in a new issue