StoreProperty calls org.freedesktop.DBus.Properties.Get on the given object. The property name must be given in interface.member notation. It stores the returned property into the provided value.
(p string, value any)
| 137 | // object. The property name must be given in interface.member notation. |
| 138 | // It stores the returned property into the provided value. |
| 139 | func (o *Object) StoreProperty(p string, value any) error { |
| 140 | idx := strings.LastIndex(p, ".") |
| 141 | if idx == -1 || idx+1 == len(p) { |
| 142 | return errors.New("dbus: invalid property " + p) |
| 143 | } |
| 144 | |
| 145 | iface := p[:idx] |
| 146 | prop := p[idx+1:] |
| 147 | |
| 148 | return o.Call("org.freedesktop.DBus.Properties.Get", 0, iface, prop). |
| 149 | Store(value) |
| 150 | } |
| 151 | |
| 152 | // SetProperty calls org.freedesktop.DBus.Properties.Set on the given |
| 153 | // object. The property name must be given in interface.member notation. |
no test coverage detected