UNPKG

@nodert-win11/windows.devices.power

Version:

Use the Windows.Devices.Power UWP API directly from Node.js

57 lines (43 loc) 1.56 kB
Battery = (function () { var cls = function Battery() { this.deviceId = new String(); }; cls.prototype.getReport = function getReport() { /// <signature> /// <summary>Function summary.</summary> /// <returns type="BatteryReport" /> /// </signature> return new BatteryReport(); } cls.fromIdAsync = function fromIdAsync(deviceId, callback) { /// <signature> /// <summary>Function summary.</summary> /// <param name="deviceId" type="String">A param.</param> /// </signature> } cls.getDeviceSelector = function getDeviceSelector() { /// <signature> /// <summary>Function summary.</summary> /// <returns type="String" /> /// </signature> return new String(); } cls.aggregateBattery = new Battery(); 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.Battery = Battery; BatteryReport = (function () { var cls = function BatteryReport() { this.chargeRateInMilliwatts = new Number(); this.designCapacityInMilliwattHours = new Number(); this.fullChargeCapacityInMilliwattHours = new Number(); this.remainingCapacityInMilliwattHours = new Number(); this.status = new Number(); }; return cls; }) (); exports.BatteryReport = BatteryReport;