import { n as ServiceHandle, t as ServiceClientOptions } from "../service-rpc-BugpSF7V.mjs"; import { t as SntpState } from "../sntp-types-DwMxSA35.mjs"; //#region src/sntp/sntp-client.d.ts /** Registered name (`helper::SNTP::get_name()`). */ declare const SNTP_SERVICE_NAME = "SNTP"; /** RPC function names (`helper::SNTP::FunctionId`). */ declare const SNTP_FUNCTIONS: { readonly SetServers: "SetServers"; readonly SetTimezone: "SetTimezone"; readonly Start: "Start"; readonly Stop: "Stop"; readonly GetServers: "GetServers"; readonly GetTimezone: "GetTimezone"; readonly GetState: "GetState"; readonly IsTimeSynced: "IsTimeSynced"; readonly LoadData: "LoadData"; readonly ResetData: "ResetData"; }; type SntpClientOptions = ServiceClientOptions; declare function isSntpAvailable(options?: SntpClientOptions): boolean; declare function openSntp(options?: SntpClientOptions): ServiceHandle; declare function closeSntp(handle: ServiceHandle, options?: SntpClientOptions): void; declare function setServers(handle: ServiceHandle, servers: string[], options?: SntpClientOptions): void; declare function setTimezone(handle: ServiceHandle, timezone: string, options?: SntpClientOptions): void; declare function startSntp(handle: ServiceHandle, options?: SntpClientOptions): void; declare function stopSntp(handle: ServiceHandle, options?: SntpClientOptions): void; declare function getServers(handle: ServiceHandle, options?: SntpClientOptions): string[]; declare function getTimezone(handle: ServiceHandle, options?: SntpClientOptions): string; declare function getSntpState(handle: ServiceHandle, options?: SntpClientOptions): SntpState; declare function isTimeSynced(handle: ServiceHandle, options?: SntpClientOptions): boolean; declare function loadSntpData(handle: ServiceHandle, options?: SntpClientOptions): void; declare function resetSntpData(handle: ServiceHandle, options?: SntpClientOptions): void; //#endregion //#region src/sntp/sntp.d.ts type SntpModuleOptions = SntpClientOptions; /** * Inject a mock RPC host and reset the cached service handle (vitest / Node only). * * @param options - Client options, typically `{ host }` from `@brookesia/service/hosts/sntp` */ declare function configure(options: SntpModuleOptions): void; declare const sntp: { /** @returns `true` when the SNTP service is registered */available(): boolean; /** Release the SNTP service binding. */ close(): void; /** * Set NTP server hostnames. * * @param servers - e.g. `['pool.ntp.org', 'cn.pool.ntp.org']` */ setServers(servers: string[]): void; /** * Set local timezone string. * * @param timezone - POSIX TZ string, e.g. `'CST-8'` */ setTimezone(timezone: string): void; /** Start NTP synchronization. */ start(): void; /** Stop NTP synchronization. */ stop(): void; /** @returns Configured NTP server list */ getServers(): string[]; /** @returns Configured timezone string */ getTimezone(): string; /** * @returns Sync state machine value * e.g. `'Stopped'`, `'Running'`, `'Syncing'`, `'Synced'` */ getState(): SntpState; /** @returns `true` when system time has been synchronized */ isTimeSynced(): boolean; /** Load persisted SNTP settings. */ loadData(): void; /** Reset SNTP settings to defaults. */ resetData(): void; }; //#endregion export { SNTP_FUNCTIONS, SNTP_SERVICE_NAME, type SntpClientOptions, type ServiceHandle as SntpHandle, type SntpModuleOptions, type SntpState, closeSntp, configure, sntp as default, getServers, getSntpState, getTimezone, isSntpAvailable, isTimeSynced, loadSntpData, openSntp, resetSntpData, setServers, setTimezone, startSntp, stopSntp }; //# sourceMappingURL=index.d.mts.map