UNPKG

@nodert-win10/windows.networking.proximity

Version:

Use the Windows.Networking.Proximity UWP API directly from Node.js

315 lines (251 loc) 9.23 kB
_TriggeredConnectState = function () { this.peerFound = 0; this.listening = 1; this.connecting = 2; this.completed = 3; this.canceled = 4; this.failed = 5; } exports.TriggeredConnectState = new _TriggeredConnectState(); _PeerWatcherStatus = function () { this.created = 0; this.started = 1; this.enumerationCompleted = 2; this.stopping = 3; this.stopped = 4; this.aborted = 5; } exports.PeerWatcherStatus = new _PeerWatcherStatus(); _PeerDiscoveryTypes = function () { this.none = 0; this.browse = 1; this.triggered = 2; } exports.PeerDiscoveryTypes = new _PeerDiscoveryTypes(); _PeerRole = function () { this.peer = 0; this.host = 1; this.client = 2; } exports.PeerRole = new _PeerRole(); ProximityMessage = (function () { var cls = function ProximityMessage() { this.data = new Object(); this.dataAsString = new String(); this.messageType = new String(); this.subscriptionId = new Number(); }; return cls; }) (); exports.ProximityMessage = ProximityMessage; ProximityDevice = (function () { var cls = function ProximityDevice() { this.bitsPerSecond = new Number(); this.deviceId = new String(); this.maxMessageBytes = new Number(); }; cls.prototype.subscribeForMessage = function subscribeForMessage(messageType, messageReceivedHandler) { /// <signature> /// <summary>Function summary.</summary> /// <param name="messageType" type="String">A param.</param> /// <param name="messageReceivedHandler" type="Object">A param.</param> /// <returns type="Number" /> /// </signature> return new Number(); } cls.prototype.publishMessage = function publishMessage(messageType, message) { /// <signature> /// <summary>Function summary.</summary> /// <param name="messageType" type="String">A param.</param> /// <param name="message" type="String">A param.</param> /// <returns type="Number" /> /// </signature> return new Number(); } cls.prototype.publishMessage = function publishMessage(messageType, message, messageTransmittedHandler) { /// <signature> /// <summary>Function summary.</summary> /// <param name="messageType" type="String">A param.</param> /// <param name="message" type="String">A param.</param> /// <param name="messageTransmittedHandler" type="Object">A param.</param> /// <returns type="Number" /> /// </signature> return new Number(); } cls.prototype.publishBinaryMessage = function publishBinaryMessage(messageType, message) { /// <signature> /// <summary>Function summary.</summary> /// <param name="messageType" type="String">A param.</param> /// <param name="message" type="Object">A param.</param> /// <returns type="Number" /> /// </signature> return new Number(); } cls.prototype.publishBinaryMessage = function publishBinaryMessage(messageType, message, messageTransmittedHandler) { /// <signature> /// <summary>Function summary.</summary> /// <param name="messageType" type="String">A param.</param> /// <param name="message" type="Object">A param.</param> /// <param name="messageTransmittedHandler" type="Object">A param.</param> /// <returns type="Number" /> /// </signature> return new Number(); } cls.prototype.publishUriMessage = function publishUriMessage(message) { /// <signature> /// <summary>Function summary.</summary> /// <param name="message" type="Object">A param.</param> /// <returns type="Number" /> /// </signature> return new Number(); } cls.prototype.publishUriMessage = function publishUriMessage(message, messageTransmittedHandler) { /// <signature> /// <summary>Function summary.</summary> /// <param name="message" type="Object">A param.</param> /// <param name="messageTransmittedHandler" type="Object">A param.</param> /// <returns type="Number" /> /// </signature> return new Number(); } cls.prototype.stopSubscribingForMessage = function stopSubscribingForMessage(subscriptionId) { /// <signature> /// <summary>Function summary.</summary> /// <param name="subscriptionId" type="Number">A param.</param> /// </signature> } cls.prototype.stopPublishingMessage = function stopPublishingMessage(messageId) { /// <signature> /// <summary>Function summary.</summary> /// <param name="messageId" type="Number">A param.</param> /// </signature> } cls.getDeviceSelector = function getDeviceSelector() { /// <signature> /// <summary>Function summary.</summary> /// <returns type="String" /> /// </signature> return new String(); } cls.getDefault = function getDefault() { /// <signature> /// <summary>Function summary.</summary> /// <returns type="ProximityDevice" /> /// </signature> return new ProximityDevice(); } cls.fromId = function fromId(deviceId) { /// <signature> /// <summary>Function summary.</summary> /// <param name="deviceId" type="String">A param.</param> /// <returns type="ProximityDevice" /> /// </signature> return new ProximityDevice(); } cls.prototype.addListener = function addListener(eventName, callback){} cls.prototype.removeListener = function removeListener(eventName, callback){} cls.prototype.on = function on(eventName, callback){} cls.prototype.off = function off(eventName, callback){} return cls; }) (); exports.ProximityDevice = ProximityDevice; TriggeredConnectionStateChangedEventArgs = (function () { var cls = function TriggeredConnectionStateChangedEventArgs() { this.id = new Number(); this.socket = new Object(); this.state = new TriggeredConnectState(); }; return cls; }) (); exports.TriggeredConnectionStateChangedEventArgs = TriggeredConnectionStateChangedEventArgs; PeerInformation = (function () { var cls = function PeerInformation() { this.displayName = new String(); this.discoveryData = new Object(); this.id = new String(); this.hostName = new Object(); this.serviceName = new String(); }; return cls; }) (); exports.PeerInformation = PeerInformation; ConnectionRequestedEventArgs = (function () { var cls = function ConnectionRequestedEventArgs() { this.peerInformation = new PeerInformation(); }; return cls; }) (); exports.ConnectionRequestedEventArgs = ConnectionRequestedEventArgs; PeerWatcher = (function () { var cls = function PeerWatcher() { this.status = new PeerWatcherStatus(); }; cls.prototype.start = function start() { /// <signature> /// <summary>Function summary.</summary> /// </signature> } cls.prototype.stop = function stop() { /// <signature> /// <summary>Function summary.</summary> /// </signature> } cls.prototype.addListener = function addListener(eventName, callback){} cls.prototype.removeListener = function removeListener(eventName, callback){} cls.prototype.on = function on(eventName, callback){} cls.prototype.off = function off(eventName, callback){} return cls; }) (); exports.PeerWatcher = PeerWatcher; PeerFinder = (function () { var cls = function PeerFinder() { }; cls.findAllPeersAsync = function findAllPeersAsync(callback) { /// <signature> /// <summary>Function summary.</summary> /// </signature> } cls.connectAsync = function connectAsync(peerInformation, callback) { /// <signature> /// <summary>Function summary.</summary> /// <param name="peerInformation" type="PeerInformation">A param.</param> /// </signature> } cls.createWatcher = function createWatcher() { /// <signature> /// <summary>Function summary.</summary> /// <returns type="PeerWatcher" /> /// </signature> return new PeerWatcher(); } cls.start = function start() { /// <signature> /// <summary>Function summary.</summary> /// </signature> } cls.start = function start(peerMessage) { /// <signature> /// <summary>Function summary.</summary> /// <param name="peerMessage" type="String">A param.</param> /// </signature> } cls.stop = function stop() { /// <signature> /// <summary>Function summary.</summary> /// </signature> } cls.displayName = new String(); cls.allowWiFiDirect = new Boolean(); cls.allowInfrastructure = new Boolean(); cls.allowBluetooth = new Boolean(); cls.alternateIdentities = new Object(); cls.supportedDiscoveryTypes = new PeerDiscoveryTypes(); cls.role = new PeerRole(); cls.discoveryData = new Object(); cls.prototype.addListener = function addListener(eventName, callback){} cls.prototype.removeListener = function removeListener(eventName, callback){} cls.prototype.on = function on(eventName, callback){} cls.prototype.off = function off(eventName, callback){} return cls; }) (); exports.PeerFinder = PeerFinder;