@iotize/device-com-wifi.cordova
Version:
IoTize Cordova plugin for Wifi devices
25 lines (24 loc) • 876 B
TypeScript
export interface ServiceType {
domain: string;
type: string;
name: string | null;
port: number;
hostname: string;
ipv4Addresses: string[];
ipv6Addresses?: string[];
txtRecord?: Record<string, any>;
[key: string]: any;
}
declare type ErrorCallback = (err: Error) => void;
export interface ZeroConf {
reInit(success?: () => void, error?: ErrorCallback): void;
unwatch(type: string, domain: string, success?: () => void, error?: ErrorCallback): void;
watch(type: string, domain: string, callack: (result: WatchResultType) => void): void;
close(success?: () => void, failure?: ErrorCallback): void;
getHostname(callback: (callback: string) => void, failure?: ErrorCallback): void;
}
export interface WatchResultType {
action: 'added' | 'resolved' | string;
service: ServiceType;
}
export {};