import type { Option, Result } from "@cprussin/option-result"; import type { SharedWatch } from "@domicile-desktop/react/shared-watch"; import type { Domicile } from "@domicile-desktop/sdk/desktop/desktop"; import type { SystemError } from "@domicile-desktop/sdk/system"; import type { Addressing, NetworkInterface } from "./interfaces"; import type { Network } from "./network-state"; import type { Wifi } from "./wifi-state"; export type DeskNetwork = { network: SharedWatch>; /** The network hardware. */ interfaces: SharedWatch>; /** Each interface's addresses, by name. */ addresses: SharedWatch, SystemError>>; /** The Wi-Fi device; `None` without one. */ wifi: SharedWatch, SystemError>>; }; /** * The network service and hardware, watched once per desktop. The calls that * reach past `/sys` are refused while the desktop is locked, so those watches * start again on unlock. */ export declare const deskNetwork: (domicile: Domicile) => DeskNetwork; /** NetworkManager's state, or `undefined` before it says. */ export declare const useNetwork: () => Result | undefined; /** The network hardware, or `undefined` before it was read. */ export declare const useNetworkInterfaces: () => Result | undefined; /** Each interface's addresses by name, or `undefined` before they were read. */ export declare const useAddresses: () => Result, SystemError> | undefined; /** The Wi-Fi device (`None` without one), or `undefined` before it was read. */ export declare const useWifi: () => Result, SystemError> | undefined;