import type { Option, Result } from "@cprussin/option-result"; import type { SystemError } from "@domicile-desktop/sdk/system"; import type { Wifi, WifiDesktop, WifiDevice, WifiNetwork } from "./wifi-state"; export type { Ip, Wifi, WifiConnection, WifiDesktop, WifiDevice, WifiNetwork, } from "./wifi-state"; export { WifiBackend } from "./wifi-state"; /** * Calls `onWifi` with the Wi-Fi device now and after each change, and returns * a function that stops watching. * * Watches the first of NetworkManager and iwd on the system bus when called. * `None` is no Wi-Fi device, or neither service: wpa_supplicant alone is not * controlled. An `Err` is a D-Bus failure. */ export declare const watchWifi: (domicile: WifiDesktop, onWifi: (wifi: Result, SystemError>) => void) => (() => void); /** Turn the radio on or off. */ export declare const setWifiEnabled: (domicile: WifiDesktop, wifi: WifiDevice, enabled: boolean) => Promise>; /** Ask for a scan. Networks it finds arrive through the watch. */ export declare const scanWifi: (domicile: WifiDesktop, wifi: WifiDevice) => Promise>; /** * Join `network`. A secured network with no saved profile needs `passphrase`; * the call throws without one. */ export declare const connectWifi: (domicile: WifiDesktop, wifi: WifiDevice, network: WifiNetwork, passphrase: string | undefined) => Promise>; /** Leave the current network. */ export declare const disconnectWifi: (domicile: WifiDesktop, wifi: WifiDevice) => Promise>;