Documentation ¶
Overview ¶
Package networkmanager wraps a couple of NetworkManager's DBus API points: the org.freedesktop.NetworkManager.state call, and listening for the StateChange signal, similarly for the primary connection and wireless enabled state.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BusAddress bus.Address = bus.Address{
Interface: "org.freedesktop.NetworkManager",
Path: "/org/freedesktop/NetworkManager",
Name: "org.freedesktop.NetworkManager",
}
NetworkManager lives on a well-knwon bus.Address
Functions ¶
This section is empty.
Types ¶
type NetworkManager ¶
type NetworkManager interface { // GetState fetches and returns NetworkManager's current state GetState() State // WatchState listens for changes to NetworkManager's state, and sends // them out over the channel returned. WatchState() (<-chan State, bus.Cancellable, error) // GetPrimaryConnection fetches and returns NetworkManager's current // primary connection. GetPrimaryConnection() string // WatchPrimaryConnection listens for changes of NetworkManager's // Primary Connection, and sends them out over the channel returned. WatchPrimaryConnection() (<-chan string, bus.Cancellable, error) // GetWirelessEnabled fetches and returns NetworkManager's // wireless state. GetWirelessEnabled() bool // WatchWirelessEnabled listens for changes of NetworkManager's // wireless state, and sends them out over the channel returned. WatchWirelessEnabled() (<-chan bool, bus.Cancellable, error) }
Click to show internal directories.
Click to hide internal directories.