@nodert-win10/windows.devices.geolocation.geofencing
Version:
Use the Windows.Devices.Geolocation.Geofencing UWP API directly from Node.js
128 lines (108 loc) • 3.79 kB
JavaScript
_MonitoredGeofenceStates = function () {
this.none = 0;
this.entered = 1;
this.exited = 2;
this.removed = 3;
}
exports.MonitoredGeofenceStates = new _MonitoredGeofenceStates();
_GeofenceState = function () {
this.none = 0;
this.entered = 1;
this.exited = 2;
this.removed = 3;
}
exports.GeofenceState = new _GeofenceState();
_GeofenceMonitorStatus = function () {
this.ready = 0;
this.initializing = 1;
this.noData = 2;
this.disabled = 3;
this.notInitialized = 4;
this.notAvailable = 5;
}
exports.GeofenceMonitorStatus = new _GeofenceMonitorStatus();
_GeofenceRemovalReason = function () {
this.used = 0;
this.expired = 1;
}
exports.GeofenceRemovalReason = new _GeofenceRemovalReason();
Geofence = (function () {
var cls = function Geofence() {
this.duration = new Number();
this.dwellTime = new Number();
this.geoshape = new Object();
this.id = new String();
this.monitoredStates = new MonitoredGeofenceStates();
this.singleUse = new Boolean();
this.startTime = new Date();
};
var cls = function Geofence(id, geoshape) {
this.duration = new Number();
this.dwellTime = new Number();
this.geoshape = new Object();
this.id = new String();
this.monitoredStates = new MonitoredGeofenceStates();
this.singleUse = new Boolean();
this.startTime = new Date();
};
var cls = function Geofence(id, geoshape, monitoredStates, singleUse) {
this.duration = new Number();
this.dwellTime = new Number();
this.geoshape = new Object();
this.id = new String();
this.monitoredStates = new MonitoredGeofenceStates();
this.singleUse = new Boolean();
this.startTime = new Date();
};
var cls = function Geofence(id, geoshape, monitoredStates, singleUse, dwellTime) {
this.duration = new Number();
this.dwellTime = new Number();
this.geoshape = new Object();
this.id = new String();
this.monitoredStates = new MonitoredGeofenceStates();
this.singleUse = new Boolean();
this.startTime = new Date();
};
var cls = function Geofence(id, geoshape, monitoredStates, singleUse, dwellTime, startTime, duration) {
this.duration = new Number();
this.dwellTime = new Number();
this.geoshape = new Object();
this.id = new String();
this.monitoredStates = new MonitoredGeofenceStates();
this.singleUse = new Boolean();
this.startTime = new Date();
};
return cls;
}) ();
exports.Geofence = Geofence;
GeofenceMonitor = (function () {
var cls = function GeofenceMonitor() {
this.geofences = new Object();
this.lastKnownGeoposition = new Object();
this.status = new GeofenceMonitorStatus();
};
cls.prototype.readReports = function readReports() {
/// <signature>
/// <summary>Function summary.</summary>
/// <returns type="Object" />
/// </signature>
return new Object();
}
cls.current = new GeofenceMonitor();
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.GeofenceMonitor = GeofenceMonitor;
GeofenceStateChangeReport = (function () {
var cls = function GeofenceStateChangeReport() {
this.geofence = new Geofence();
this.geoposition = new Object();
this.newState = new GeofenceState();
this.removalReason = new GeofenceRemovalReason();
};
return cls;
}) ();
exports.GeofenceStateChangeReport = GeofenceStateChangeReport;