import Vnmf from '../../index' declare module '../../index' { namespace stopLocalServiceDiscovery { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (result: FailCallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface FailCallbackResult extends VnmfGeneral.CallbackResult { /** Cannot initialise Evolution's mail component. * * Optional value: * - 'task not found': Call without currently in search service stopLocalServiceDiscovery; */ errMsg: string } } namespace startLocalServiceDiscovery { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (result: FailCallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface FailCallbackResult extends VnmfGeneral.CallbackResult { /** Cannot initialise Evolution's mail component. * * Optional value: * - 'invalid param': serviceType Empty; * - 'scan task already exist': _Other Organiser startLocalServiceDiscovery _Other Organiser,Call again startLocalServiceDiscovery; */ errMsg: string } } namespace onLocalServiceResolveFail { /** mDNS Service recovery function for failed event resolution */ type Callback = (result: CallbackResult) => void interface CallbackResult { /** Name of service */ serviceName: string /** Type of service */ serviceType: string } } namespace onLocalServiceLost { /** mDNS The echo function for the event that service leaves */ type Callback = (result: CallbackResult) => void interface CallbackResult { /** Name of service */ serviceName: string /** Type of service */ serviceType: string } } namespace onLocalServiceFound { /** mDNS The callback function for events discovered by the service */ type Callback = (result: CallbackResult) => void interface CallbackResult { /** Services ip Address */ ip: string /** Service port */ port: number /** Name of service */ serviceName: string /** Type of service */ serviceType: string } } namespace onLocalServiceDiscoveryStop { /** mDNS The echo function for the event which service stopped searching */ type Callback = (res: VnmfGeneral.CallbackResult) => void } namespace offLocalServiceResolveFail { /** mDNS Service recovery function for failed event resolution */ type Callback = (res: VnmfGeneral.CallbackResult) => void } namespace offLocalServiceLost { /** mDNS The echo function for the event that service leaves */ type Callback = (res: VnmfGeneral.CallbackResult) => void } namespace offLocalServiceFound { /** mDNS The callback function for events discovered by the service */ type Callback = (res: VnmfGeneral.CallbackResult) => void } namespace offLocalServiceDiscoveryStop { /** mDNS The echo function for the event which service stopped searching */ type Callback = (res: VnmfGeneral.CallbackResult) => void } interface VnmfStatic { /** Stop Search mDNS Services * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/network/mdns/wx.stopLocalServiceDiscovery.html */ stopLocalServiceDiscovery(option?: stopLocalServiceDiscovery.Option): void /** Start searching under the local area network mDNS Services。The search results will pass. wx.onLocalService* Event Return。 * * **Attention.** * 1. wx.startLocalServiceDiscovery It's a consumable behavior.,Here we go. 30 It'll be automatic in a second. stop And do it. wx.onLocalServiceDiscoveryStop Registered echo function。 * 2. Calling wx.startLocalServiceDiscovery After,We can't launch the next search until has stopped. wx.startLocalServiceDiscovery。Stop this search action including calling wx.stopLocalServiceDiscovery and 30 System AutoSystem stop This search。 * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/network/mdns/wx.startLocalServiceDiscovery.html */ startLocalServiceDiscovery(option: startLocalServiceDiscovery.Option): void /** Listening. mDNS Service parsing failed events * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/network/mdns/wx.onLocalServiceResolveFail.html */ onLocalServiceResolveFail( /** mDNS Service recovery function for failed event resolution */ callback: onLocalServiceResolveFail.Callback ): void /** Listening. mDNS Incidents of service departure * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/network/mdns/wx.onLocalServiceLost.html */ onLocalServiceLost( /** mDNS The echo function for the event that service leaves */ callback: onLocalServiceLost.Callback ): void /** Listening. mDNS Events identified by the service * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/network/mdns/wx.onLocalServiceFound.html */ onLocalServiceFound( /** mDNS The callback function for events discovered by the service */ callback: onLocalServiceFound.Callback ): void /** Listening. mDNS Event for which the service stopped searching * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/network/mdns/wx.onLocalServiceDiscoveryStop.html */ onLocalServiceDiscoveryStop( /** mDNS The echo function for the event which service stopped searching */ callback: onLocalServiceDiscoveryStop.Callback ): void /** Disable listening. mDNS Service parsing failed events * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/network/mdns/wx.offLocalServiceResolveFail.html */ offLocalServiceResolveFail( /** mDNS Service recovery function for failed event resolution */ callback: offLocalServiceResolveFail.Callback ): void /** Disable listening. mDNS Incidents of service departure * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/network/mdns/wx.offLocalServiceLost.html */ offLocalServiceLost( /** mDNS The echo function for the event that service leaves */ callback: offLocalServiceLost.Callback ): void /** Disable listening. mDNS Events identified by the service * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/network/mdns/wx.offLocalServiceFound.html */ offLocalServiceFound( /** mDNS The callback function for events discovered by the service */ callback: offLocalServiceFound.Callback ): void /** Disable listening. mDNS Event for which the service stopped searching * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/network/mdns/wx.offLocalServiceDiscoveryStop.html */ offLocalServiceDiscoveryStop( /** mDNS The echo function for the event which service stopped searching */ callback: offLocalServiceDiscoveryStop.Callback ): void } }