all Dbus methods covered.

Now to add some niceties and add tests.
This commit is contained in:
2021-12-22 03:20:08 -05:00
parent 8ab14af06c
commit 25f9c3c1c9
14 changed files with 376 additions and 28 deletions

View File

@@ -1,5 +1,9 @@
package gokwallet
import (
"github.com/godbus/dbus/v5"
)
/*
NewBlob returns a Blob. It requires a RecurseOpts
(you can use DefaultRecurseOpts, call NewRecurseOpts, or provide your own RecurseOpts struct).
@@ -37,7 +41,15 @@ func NewBlob(f *Folder, keyName string, recursion *RecurseOpts) (blob *Blob, err
// Update fetches a Blob's Blob.Value.
func (b *Blob) Update() (err error) {
// TODO.
var v dbus.Variant
if err = b.Dbus.Call(
DbusWMReadEntry, 0, b.folder.wallet.handle, b.folder.Name, b.Name, b.folder.wallet.wm.AppID,
).Store(&v); err != nil {
return
}
b.Value = v.Value().([]byte)
return
}