MCPcopy Create free account
hub / github.com/godbus/dbus / StoreProperty

Method StoreProperty

object.go:139–150  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

137// object. The property name must be given in interface.member notation.
138// It stores the returned property into the provided value.
139func (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.

Callers 1

GetPropertyMethod · 0.95

Calls 2

CallMethod · 0.95
StoreMethod · 0.45

Tested by

no test coverage detected