import type { Option } from "@cprussin/option-result"; import { Result } from "@cprussin/option-result"; import type { SystemError } from "@domicile-desktop/sdk/system"; import type { NetworkDesktop } from "./network-state"; import type { Wifi, WifiDevice, WifiNetwork } from "./wifi-state"; /** A read's outcome: Wi-Fi, if there is a device, or the first failure. */ type Found = Result, SystemError>; /** * Calls `onWifi` with the first Wi-Fi device now and after each change, and * returns a function that stops watching. `None` is a machine without one. * * An `Err` is a D-Bus failure, such as NetworkManager not running. The watch * keeps listening after one, so a later change reads again. */ export declare const watchNetworkManagerWifi: (domicile: NetworkDesktop, onWifi: (wifi: Found) => void) => (() => void); /** Turn the Wi-Fi radio on or off. */ export declare const setNetworkManagerWifiEnabled: (domicile: NetworkDesktop, _wifi: WifiDevice, enabled: boolean) => Promise>; /** Ask for a scan. Networks it finds arrive as changes. */ export declare const scanNetworkManagerWifi: (domicile: NetworkDesktop, wifi: WifiDevice) => Promise>; /** * Join `network`: through its saved profile if it has one, or with a new * profile, which needs `passphrase` when the network is secured. */ export declare const connectNetworkManagerWifi: (domicile: NetworkDesktop, wifi: WifiDevice, network: WifiNetwork, passphrase: string | undefined) => Promise>; /** Leave the current network, until asked to join one. */ export declare const disconnectNetworkManagerWifi: (domicile: NetworkDesktop, wifi: WifiDevice) => Promise>; export {};