Add ActiveConnection.GetPath

This commit is contained in:
Christian Müller 2019-06-12 11:10:06 +02:00
parent fee15bfbc3
commit 06880b4163

View file

@ -27,7 +27,9 @@ const (
)
type ActiveConnection interface {
// GetConnection gets connection object of the connection.
GetPath() dbus.ObjectPath
// GetConnectionSettings gets connection object of the connection.
GetConnection() Connection
// GetSpecificObject gets a specific object associated with the active connection.
@ -85,6 +87,10 @@ type activeConnection struct {
dbusBase
}
func (a *activeConnection) GetPath() dbus.ObjectPath {
return a.obj.Path()
}
func (a *activeConnection) GetConnection() Connection {
path := a.getObjectProperty(ActiveConnectionPropertyConnection)
con, err := NewConnection(path)