Skip to content

Commit

Permalink
Add Peer interface to D-Bus introspection
Browse files Browse the repository at this point in the history
Signed-off-by: hwipl <33433250+hwipl@users.noreply.github.com>
  • Loading branch information
hwipl committed May 2, 2024
1 parent 423d0bb commit e965abf
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions internal/dbusapi/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,26 @@ func (s *Service) Start() error {
m.Args[5].Name = "resolve"

}
// set peer interface
peerData := introspect.Interface{
Name: "org.freedesktop.DBus.Peer",
Methods: []introspect.Method{
{
Name: "Ping",
},
{
Name: "GetMachineId",
Args: []introspect.Arg{
{Name: "machine_uuid", Type: "s", Direction: "out"},
},
},
},
}
n := &introspect.Node{
Name: Path,
Interfaces: []introspect.Interface{
introspect.IntrospectData,
peerData,
prop.IntrospectData,
{
Name: Interface,
Expand Down

0 comments on commit e965abf

Please sign in to comment.