improvements, start integration tests
improved various funcs, removed extraneous things (e.g. Item.Attrs). first integration test. more will come.
This commit is contained in:
@@ -7,8 +7,6 @@ import (
|
||||
`github.com/godbus/dbus/v5`
|
||||
)
|
||||
|
||||
// TODO: add method Relabel
|
||||
|
||||
/*
|
||||
NewCollection returns a pointer to a Collection based on a Service and a Dbus path.
|
||||
You will almost always want to use Service.GetCollection instead.
|
||||
@@ -188,6 +186,18 @@ func (c *Collection) Label() (label string, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
// Relabel modifies the Collection's label in Dbus.
|
||||
func (c *Collection) Relabel(newLabel string) (err error) {
|
||||
|
||||
var variant dbus.Variant = dbus.MakeVariant(newLabel)
|
||||
|
||||
if err = c.Dbus.SetProperty(DbusItemLabel, variant); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// Created returns the time.Time of when a Collection was created.
|
||||
func (c *Collection) Created() (created time.Time, err error) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user