summaryrefslogtreecommitdiff
path: root/vendor/github.com/godbus/dbus/object.go
diff options
context:
space:
mode:
authorTomSweeneyRedHat <tsweeney@redhat.com>2019-11-13 10:30:08 -0500
committerTomSweeneyRedHat <tsweeney@redhat.com>2019-11-13 10:57:19 -0500
commit6003033adae775f1d725b05231a246a4462ae669 (patch)
treec570c523df92c3c0fb4b704c5c45b0de6603b7d6 /vendor/github.com/godbus/dbus/object.go
parentde32b89eff0928abdef9d85a420b65d8865e737e (diff)
downloadpodman-6003033adae775f1d725b05231a246a4462ae669.tar.gz
podman-6003033adae775f1d725b05231a246a4462ae669.tar.bz2
podman-6003033adae775f1d725b05231a246a4462ae669.zip
Bump to Buildah v1.11.5
Bump to Buildah v1.11.5. Most notably changes to the podman build `--pull` functionality. `--pull=true` and `--pull=false` now work as Docker does, `--pull-never` added to supply the functionality of the old `--pull=false`. Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
Diffstat (limited to 'vendor/github.com/godbus/dbus/object.go')
-rw-r--r--vendor/github.com/godbus/dbus/object.go19
1 files changed, 17 insertions, 2 deletions
diff --git a/vendor/github.com/godbus/dbus/object.go b/vendor/github.com/godbus/dbus/object.go
index f27ffe144..9309b9b40 100644
--- a/vendor/github.com/godbus/dbus/object.go
+++ b/vendor/github.com/godbus/dbus/object.go
@@ -16,6 +16,7 @@ type BusObject interface {
AddMatchSignal(iface, member string, options ...MatchOption) *Call
RemoveMatchSignal(iface, member string, options ...MatchOption) *Call
GetProperty(p string) (Variant, error)
+ SetProperty(p string, v interface{}) error
Destination() string
Path() ObjectPath
}
@@ -146,7 +147,7 @@ func (o *Object) createCall(ctx context.Context, method string, flags Flags, ch
}
if msg.Flags&FlagNoReplyExpected == 0 {
if ch == nil {
- ch = make(chan *Call, 10)
+ ch = make(chan *Call, 1)
} else if cap(ch) == 0 {
panic("dbus: unbuffered channel passed to (*Object).Go")
}
@@ -187,7 +188,7 @@ func (o *Object) createCall(ctx context.Context, method string, flags Flags, ch
return call
}
-// GetProperty calls org.freedesktop.DBus.Properties.GetProperty on the given
+// GetProperty calls org.freedesktop.DBus.Properties.Get on the given
// object. The property name must be given in interface.member notation.
func (o *Object) GetProperty(p string) (Variant, error) {
idx := strings.LastIndex(p, ".")
@@ -208,6 +209,20 @@ func (o *Object) GetProperty(p string) (Variant, error) {
return result, nil
}
+// SetProperty calls org.freedesktop.DBus.Properties.Set on the given
+// object. The property name must be given in interface.member notation.
+func (o *Object) SetProperty(p string, v interface{}) error {
+ idx := strings.LastIndex(p, ".")
+ if idx == -1 || idx+1 == len(p) {
+ return errors.New("dbus: invalid property " + p)
+ }
+
+ iface := p[:idx]
+ prop := p[idx+1:]
+
+ return o.Call("org.freedesktop.DBus.Properties.Set", 0, iface, prop, v).Err
+}
+
// Destination returns the destination that calls on (o *Object) are sent to.
func (o *Object) Destination() string {
return o.dest