Class ConnectionSettingsManager

Manages the saving and retrieving of connection profiles and the device's hostname When connecting to a network (wired or wireless), you must provide a connection profile by either creating one with addConnectionProfile() or using a saved connection profile.

Hierarchy

  • ConnectionSettingsManager

Methods

  • Initializes a new ConnectionSettingsManager given a DBus connection

    Parameters

    • bus: DBusConnection

      The system DBus instance to use for communicating with NetworkManager

    Returns Promise<ConnectionSettingsManager>

  • Returns void

  • Returns void

  • Requires root access, depending on user permissions and NetworkManager policy configuration.

    Convenience function to add new WPA wifi connection profiles

    Returns

    Promise of the new connection profile's path

    Parameters

    • ssid: string

      SSID of the network to connect to as a string

    • hidden: boolean

      Whether or not the network has a hidden SSID

    • Optional password: string

      The password of the network. Optional, if no password provided the network will treated as unencrypted.

    • Optional deviceiface: string

      The device interface name to attempt this connection on. Optional, if not provided "wlan0" will be attempted instead.

    Returns Promise<string>

  • Requires root access, depending on user permissions and NetworkManager policy configuration.

    Deactivates and deletes a connection profile This is used to implement "forget wifi network" functionality

    Parameters

    • profilePath: string

      The connection profile path to remove

    Returns Promise<void>

Properties

_bus: DBusConnection
_connectionProfiles: ConnectionProfile[]
_connectionProfilesSubject: BehaviorSubject<ConnectionProfile[]>
_connectionSettingsManagerInterface: DBusInterface<AnyInterfaceMethod>
_propertiesInterface: DBusInterface<AnyInterfaceMethod>
_propertiesSubject: BehaviorSubject<ConnectionSettingsManagerProperties>
connectionProfiles$: Observable<ConnectionProfile[]>

Continuously updated saved connection profiles

properties$: Observable<ConnectionSettingsManagerProperties>

Continuously updated properties of the ConnectionSettingsManager

Accessors

  • get connectionProfiles(): ConnectionProfile[]
  • Get a one-time value of the latest saved connection profiles

    Returns ConnectionProfile[]

Constructors

  • Parameters

    • bus: DBusConnection
    • connectionSettingsManagerInterface: DBusInterface<AnyInterfaceMethod>
    • propertiesInterface: DBusInterface<AnyInterfaceMethod>
    • initialProperties: any
    • initialConnectionProfiles: any

    Returns ConnectionSettingsManager

Generated using TypeDoc