awesome-cordova-plugins/dist/plugins/ble.js

71 lines
2.9 KiB
JavaScript
Raw Normal View History

2015-12-01 10:17:55 +08:00
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2015-12-02 03:33:08 +08:00
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);
case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);
}
2015-11-30 09:54:45 +08:00
};
var plugin_1 = require('./plugin');
var BLE = (function () {
function BLE() {
}
BLE.scan = function (services, seconds) { };
2015-12-01 01:09:50 +08:00
BLE.startScan = function (services) { };
;
BLE.stopScan = function () { };
;
BLE.connect = function (deviceId) { };
;
BLE.disconnect = function (deviceId) { };
;
BLE.read = function (deviceId, serviceUUID, characteristicUUID) { };
;
BLE.write = function (deviceId, serviceUUID, characteristicUUID, value) { };
;
BLE.writeWithoutResponse = function (deviceId, serviceUUID, characteristicUUID, value) { };
;
2015-12-02 03:33:08 +08:00
Object.defineProperty(BLE, "scan",
__decorate([
plugin_1.Cordova()
], BLE, "scan", Object.getOwnPropertyDescriptor(BLE, "scan")));
Object.defineProperty(BLE, "startScan",
__decorate([
plugin_1.Cordova()
], BLE, "startScan", Object.getOwnPropertyDescriptor(BLE, "startScan")));
Object.defineProperty(BLE, "stopScan",
__decorate([
plugin_1.Cordova()
], BLE, "stopScan", Object.getOwnPropertyDescriptor(BLE, "stopScan")));
Object.defineProperty(BLE, "connect",
__decorate([
plugin_1.Cordova()
], BLE, "connect", Object.getOwnPropertyDescriptor(BLE, "connect")));
Object.defineProperty(BLE, "disconnect",
__decorate([
plugin_1.Cordova()
], BLE, "disconnect", Object.getOwnPropertyDescriptor(BLE, "disconnect")));
Object.defineProperty(BLE, "read",
__decorate([
plugin_1.Cordova()
], BLE, "read", Object.getOwnPropertyDescriptor(BLE, "read")));
Object.defineProperty(BLE, "write",
__decorate([
plugin_1.Cordova()
], BLE, "write", Object.getOwnPropertyDescriptor(BLE, "write")));
Object.defineProperty(BLE, "writeWithoutResponse",
__decorate([
plugin_1.Cordova()
], BLE, "writeWithoutResponse", Object.getOwnPropertyDescriptor(BLE, "writeWithoutResponse")));
2015-11-30 09:54:45 +08:00
BLE = __decorate([
plugin_1.Plugin({
name: 'BluetoothLowEnergy',
plugin: 'cordova-plugin-ble-central',
pluginRef: 'ble',
pluginRepo: 'https://github.com/don/cordova-plugin-ble-central'
})
], BLE);
return BLE;
})();
exports.BLE = BLE;
2015-12-01 02:34:54 +08:00
//# sourceMappingURL=ble.js.map