mirror of
https://github.com/nkanaev/yarr.git
synced 2026-05-01 06:47:45 +00:00
switch to fyne.io/systray
This commit is contained in:
28
vendor/github.com/godbus/dbus/v5/introspect/call.go
generated
vendored
Normal file
28
vendor/github.com/godbus/dbus/v5/introspect/call.go
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
package introspect
|
||||
|
||||
import (
|
||||
"encoding/xml"
|
||||
"strings"
|
||||
|
||||
"github.com/godbus/dbus/v5"
|
||||
)
|
||||
|
||||
// Call calls org.freedesktop.Introspectable.Introspect on a remote object
|
||||
// and returns the introspection data.
|
||||
func Call(o dbus.BusObject) (*Node, error) {
|
||||
var xmldata string
|
||||
var node Node
|
||||
|
||||
err := o.Call("org.freedesktop.DBus.Introspectable.Introspect", 0).Store(&xmldata)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = xml.NewDecoder(strings.NewReader(xmldata)).Decode(&node)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if node.Name == "" {
|
||||
node.Name = string(o.Path())
|
||||
}
|
||||
return &node, nil
|
||||
}
|
||||
Reference in New Issue
Block a user