Add ActiveConnection.GetPath
This commit is contained in:
parent
fee15bfbc3
commit
06880b4163
1 changed files with 7 additions and 1 deletions
|
@ -27,7 +27,9 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
type ActiveConnection interface {
|
type ActiveConnection interface {
|
||||||
// GetConnection gets connection object of the connection.
|
GetPath() dbus.ObjectPath
|
||||||
|
|
||||||
|
// GetConnectionSettings gets connection object of the connection.
|
||||||
GetConnection() Connection
|
GetConnection() Connection
|
||||||
|
|
||||||
// GetSpecificObject gets a specific object associated with the active connection.
|
// GetSpecificObject gets a specific object associated with the active connection.
|
||||||
|
@ -85,6 +87,10 @@ type activeConnection struct {
|
||||||
dbusBase
|
dbusBase
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (a *activeConnection) GetPath() dbus.ObjectPath {
|
||||||
|
return a.obj.Path()
|
||||||
|
}
|
||||||
|
|
||||||
func (a *activeConnection) GetConnection() Connection {
|
func (a *activeConnection) GetConnection() Connection {
|
||||||
path := a.getObjectProperty(ActiveConnectionPropertyConnection)
|
path := a.getObjectProperty(ActiveConnectionPropertyConnection)
|
||||||
con, err := NewConnection(path)
|
con, err := NewConnection(path)
|
||||||
|
|
Reference in a new issue