import type { Option, Result } from "@cprussin/option-result"; import type { SystemError } from "@domicile-desktop/sdk/system"; import type { NetworkDesktop } from "./network-state"; import type { Wifi, WifiDesktop, WifiDevice, WifiNetwork } from "./wifi-state"; /** * Calls `onWifi` with the first station 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 iwd not running. The watch keeps * listening after one, so a later change reads again. */ export declare const watchIwdWifi: (domicile: NetworkDesktop, onWifi: (wifi: Result, SystemError>) => void) => (() => void); /** Turn the device on or off. */ export declare const setIwdWifiEnabled: (domicile: NetworkDesktop, wifi: WifiDevice, enabled: boolean) => Promise>; /** Ask for a scan. Networks it finds arrive as changes. */ export declare const scanIwdWifi: (domicile: NetworkDesktop, wifi: WifiDevice) => Promise>; /** * Join `network`. A known or open network joins over D-Bus. A new secured one * joins through `iwctl`, which answers iwd's request for the passphrase: iwd * asks an agent for it, and a page cannot serve one. */ export declare const connectIwdWifi: (domicile: WifiDesktop, wifi: WifiDevice, network: WifiNetwork, passphrase: string | undefined) => Promise>; /** Leave the current network, until asked to join one. */ export declare const disconnectIwdWifi: (domicile: NetworkDesktop, wifi: WifiDevice) => Promise>;