incyclist-devices 3.0.34 → 3.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/ble/base/adapter.js +2 -1
- package/lib/cjs/ble/base/interface.js +21 -4
- package/lib/cjs/ble/zwift/play/sensor.js +8 -2
- package/lib/cjs/direct-connect/base/interface.js +41 -8
- package/lib/cjs/direct-connect/base/peripheral.js +1 -0
- package/lib/cjs/proto/zwift_hub.js +3 -3
- package/lib/esm/ble/base/adapter.js +2 -1
- package/lib/esm/ble/base/interface.js +21 -4
- package/lib/esm/ble/zwift/play/sensor.js +8 -2
- package/lib/esm/direct-connect/base/interface.js +41 -8
- package/lib/esm/direct-connect/base/peripheral.js +1 -0
- package/lib/esm/proto/zwift_hub.js +3 -3
- package/lib/types/ble/base/interface.d.ts +3 -0
- package/lib/types/direct-connect/base/interface.d.ts +4 -0
- package/lib/types/proto/zwift_hub.d.ts +1 -1
- package/lib/types/types/interface.d.ts +2 -0
- package/package.json +1 -1
|
@@ -46,7 +46,8 @@ class BleAdapter extends adpater_js_1.default {
|
|
|
46
46
|
return p;
|
|
47
47
|
}
|
|
48
48
|
async waitForPeripheral() {
|
|
49
|
-
|
|
49
|
+
const settings = { ...this.settings };
|
|
50
|
+
this.logEvent({ message: 'waiting for sensor ...', device: this.getName(), interface: this.getInterface(), address: settings.address });
|
|
50
51
|
const ble = this.getBle();
|
|
51
52
|
const peripheral = await ble.waitForPeripheral(this.settings);
|
|
52
53
|
this.updateSensor(peripheral);
|
|
@@ -26,6 +26,7 @@ class BleInterface extends node_events_1.EventEmitter {
|
|
|
26
26
|
unsupported = [];
|
|
27
27
|
expectedServices = ['180d', '1818', '1826', '6e40fec1'];
|
|
28
28
|
matching = [];
|
|
29
|
+
backgroundPaused = false;
|
|
29
30
|
connectTask;
|
|
30
31
|
disconnectTask;
|
|
31
32
|
scanTask;
|
|
@@ -244,6 +245,20 @@ class BleInterface extends node_events_1.EventEmitter {
|
|
|
244
245
|
delete this.scanTask;
|
|
245
246
|
return this.buildDeviceSettings(this.matching);
|
|
246
247
|
}
|
|
248
|
+
async pauseBackgroundActivity() {
|
|
249
|
+
if (this.backgroundPaused)
|
|
250
|
+
return;
|
|
251
|
+
this.backgroundPaused = true;
|
|
252
|
+
this.logEvent({ message: 'pausing background activity' });
|
|
253
|
+
await this.stopPeripheralScan();
|
|
254
|
+
}
|
|
255
|
+
async resumeBackgroundActivity() {
|
|
256
|
+
if (!this.backgroundPaused)
|
|
257
|
+
return;
|
|
258
|
+
this.backgroundPaused = false;
|
|
259
|
+
this.logEvent({ message: 'resuming background activity' });
|
|
260
|
+
await this.startPeripheralScan();
|
|
261
|
+
}
|
|
247
262
|
pauseLogging() {
|
|
248
263
|
this.logEvent({ message: 'pausing logging' });
|
|
249
264
|
this.logDisabled = true;
|
|
@@ -320,6 +335,8 @@ class BleInterface extends node_events_1.EventEmitter {
|
|
|
320
335
|
await this.connectInternal(true);
|
|
321
336
|
}
|
|
322
337
|
async startPeripheralScan(retry = false) {
|
|
338
|
+
if (this.backgroundPaused)
|
|
339
|
+
return;
|
|
323
340
|
if (!this.isConnected() || this.isDiscovering()) {
|
|
324
341
|
return;
|
|
325
342
|
}
|
|
@@ -341,12 +358,12 @@ class BleInterface extends node_events_1.EventEmitter {
|
|
|
341
358
|
this.startPeripheralScan(true);
|
|
342
359
|
}
|
|
343
360
|
}
|
|
344
|
-
stopPeripheralScan() {
|
|
345
|
-
|
|
361
|
+
async stopPeripheralScan() {
|
|
362
|
+
const ble = this.getBinding();
|
|
363
|
+
if (!ble)
|
|
346
364
|
return;
|
|
347
365
|
this.logEvent({ message: 'stopping peripheral discovery ...' });
|
|
348
|
-
this.discoverTask
|
|
349
|
-
const ble = this.getBinding();
|
|
366
|
+
this.discoverTask?.stop();
|
|
350
367
|
ble.off('discover', this.onDiscovered);
|
|
351
368
|
return new Promise(done => {
|
|
352
369
|
ble.stopScanning(() => {
|
|
@@ -307,11 +307,17 @@ class BleZwiftPlaySensor extends sensor_js_1.TBleSensor {
|
|
|
307
307
|
onTrainerResponse(m) {
|
|
308
308
|
try {
|
|
309
309
|
const data = zwift_hub_js_1.TrainerResponse.fromBinary(m);
|
|
310
|
+
const text = data.content?.text !== undefined ? Buffer.from(data.content.text).toString('utf-8') : undefined;
|
|
310
311
|
this.emit('hub-trainer-response', data);
|
|
311
|
-
this.logEvent({ message: 'trainer response received', data });
|
|
312
|
+
this.logEvent({ message: 'trainer response received', unknown: data.unknown, text });
|
|
312
313
|
}
|
|
313
314
|
catch (err) {
|
|
314
|
-
|
|
315
|
+
let payload = 'unknown';
|
|
316
|
+
try {
|
|
317
|
+
payload = m.toString('hex');
|
|
318
|
+
}
|
|
319
|
+
catch { }
|
|
320
|
+
this.logEvent({ message: 'Error', fn: 'onTrainerResponse', error: err.message, stack: err.stack, payload });
|
|
315
321
|
}
|
|
316
322
|
}
|
|
317
323
|
onRidingData(m) {
|
|
@@ -28,6 +28,7 @@ class DirectConnectInterface extends node_events_1.EventEmitter {
|
|
|
28
28
|
matching = [];
|
|
29
29
|
instance;
|
|
30
30
|
connected = false;
|
|
31
|
+
backgroundPaused = false;
|
|
31
32
|
static getInstance(props = {}) {
|
|
32
33
|
if (DirectConnectInterface._instance === undefined)
|
|
33
34
|
DirectConnectInterface._instance = new DirectConnectInterface(props);
|
|
@@ -129,14 +130,7 @@ class DirectConnectInterface extends node_events_1.EventEmitter {
|
|
|
129
130
|
}
|
|
130
131
|
this.logEvent({ message: 'connecting to Direct Connect' });
|
|
131
132
|
this.getBinding().mdns.connect();
|
|
132
|
-
|
|
133
|
-
this.logEvent({ message: 'starting multicast DNS scan ..' });
|
|
134
|
-
this.getBinding().mdns.find(null, (service) => {
|
|
135
|
-
this.addService(service, 'unfiltered');
|
|
136
|
-
});
|
|
137
|
-
this.getBinding().mdns.find({ type: DC_TYPE }, (service) => {
|
|
138
|
-
this.addService(service, DC_TYPE);
|
|
139
|
-
});
|
|
133
|
+
this.startServiceDiscovery(reconnect);
|
|
140
134
|
}
|
|
141
135
|
catch (err) {
|
|
142
136
|
this.logError(err, 'connect');
|
|
@@ -146,6 +140,45 @@ class DirectConnectInterface extends node_events_1.EventEmitter {
|
|
|
146
140
|
this.emit('connected');
|
|
147
141
|
return true;
|
|
148
142
|
}
|
|
143
|
+
startServiceDiscovery(reconnect) {
|
|
144
|
+
if (this.backgroundPaused)
|
|
145
|
+
return;
|
|
146
|
+
if (!reconnect)
|
|
147
|
+
this.logEvent({ message: 'starting multicast DNS scan ..' });
|
|
148
|
+
this.getBinding().mdns.find(null, (service) => {
|
|
149
|
+
this.addService(service, 'unfiltered');
|
|
150
|
+
});
|
|
151
|
+
this.getBinding().mdns.find({ type: DC_TYPE }, (service) => {
|
|
152
|
+
this.addService(service, DC_TYPE);
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
async pauseBackgroundActivity() {
|
|
156
|
+
if (this.backgroundPaused)
|
|
157
|
+
return;
|
|
158
|
+
this.backgroundPaused = true;
|
|
159
|
+
this.logEvent({ message: 'pausing background activity' });
|
|
160
|
+
try {
|
|
161
|
+
this.getBinding()?.mdns?.disconnect();
|
|
162
|
+
}
|
|
163
|
+
catch (err) {
|
|
164
|
+
this.logError(err, 'pauseBackgroundActivity');
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
async resumeBackgroundActivity() {
|
|
168
|
+
if (!this.backgroundPaused)
|
|
169
|
+
return;
|
|
170
|
+
this.backgroundPaused = false;
|
|
171
|
+
this.logEvent({ message: 'resuming background activity' });
|
|
172
|
+
if (!this.isConnected())
|
|
173
|
+
return;
|
|
174
|
+
try {
|
|
175
|
+
this.getBinding()?.mdns?.connect();
|
|
176
|
+
this.startServiceDiscovery();
|
|
177
|
+
}
|
|
178
|
+
catch (err) {
|
|
179
|
+
this.logError(err, 'resumeBackgroundActivity');
|
|
180
|
+
}
|
|
181
|
+
}
|
|
149
182
|
async disconnect() {
|
|
150
183
|
if (!this.isConnected())
|
|
151
184
|
return true;
|
|
@@ -766,7 +766,7 @@ exports.TrainerResponse = new TrainerResponse$Type();
|
|
|
766
766
|
class TrainerResponseContent$Type extends runtime_4.MessageType {
|
|
767
767
|
constructor() {
|
|
768
768
|
super("org.cagnulen.qdomyoszwift.TrainerResponseContent", [
|
|
769
|
-
{ no: 4, name: "Text", kind: "scalar", jsonName: "Text", opt: true, T:
|
|
769
|
+
{ no: 4, name: "Text", kind: "scalar", jsonName: "Text", opt: true, T: 12 }
|
|
770
770
|
]);
|
|
771
771
|
}
|
|
772
772
|
create(value) {
|
|
@@ -781,7 +781,7 @@ class TrainerResponseContent$Type extends runtime_4.MessageType {
|
|
|
781
781
|
let [fieldNo, wireType] = reader.tag();
|
|
782
782
|
switch (fieldNo) {
|
|
783
783
|
case 4:
|
|
784
|
-
message.text = reader.
|
|
784
|
+
message.text = reader.bytes();
|
|
785
785
|
break;
|
|
786
786
|
default:
|
|
787
787
|
let u = options.readUnknownField;
|
|
@@ -796,7 +796,7 @@ class TrainerResponseContent$Type extends runtime_4.MessageType {
|
|
|
796
796
|
}
|
|
797
797
|
internalBinaryWrite(message, writer, options) {
|
|
798
798
|
if (message.text !== undefined)
|
|
799
|
-
writer.tag(4, runtime_1.WireType.LengthDelimited).
|
|
799
|
+
writer.tag(4, runtime_1.WireType.LengthDelimited).bytes(message.text);
|
|
800
800
|
let u = options.writeUnknownFields;
|
|
801
801
|
if (u !== false)
|
|
802
802
|
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -41,7 +41,8 @@ export default class BleAdapter extends IncyclistDevice {
|
|
|
41
41
|
return p;
|
|
42
42
|
}
|
|
43
43
|
async waitForPeripheral() {
|
|
44
|
-
|
|
44
|
+
const settings = { ...this.settings };
|
|
45
|
+
this.logEvent({ message: 'waiting for sensor ...', device: this.getName(), interface: this.getInterface(), address: settings.address });
|
|
45
46
|
const ble = this.getBle();
|
|
46
47
|
const peripheral = await ble.waitForPeripheral(this.settings);
|
|
47
48
|
this.updateSensor(peripheral);
|
|
@@ -23,6 +23,7 @@ export class BleInterface extends EventEmitter {
|
|
|
23
23
|
unsupported = [];
|
|
24
24
|
expectedServices = ['180d', '1818', '1826', '6e40fec1'];
|
|
25
25
|
matching = [];
|
|
26
|
+
backgroundPaused = false;
|
|
26
27
|
connectTask;
|
|
27
28
|
disconnectTask;
|
|
28
29
|
scanTask;
|
|
@@ -241,6 +242,20 @@ export class BleInterface extends EventEmitter {
|
|
|
241
242
|
delete this.scanTask;
|
|
242
243
|
return this.buildDeviceSettings(this.matching);
|
|
243
244
|
}
|
|
245
|
+
async pauseBackgroundActivity() {
|
|
246
|
+
if (this.backgroundPaused)
|
|
247
|
+
return;
|
|
248
|
+
this.backgroundPaused = true;
|
|
249
|
+
this.logEvent({ message: 'pausing background activity' });
|
|
250
|
+
await this.stopPeripheralScan();
|
|
251
|
+
}
|
|
252
|
+
async resumeBackgroundActivity() {
|
|
253
|
+
if (!this.backgroundPaused)
|
|
254
|
+
return;
|
|
255
|
+
this.backgroundPaused = false;
|
|
256
|
+
this.logEvent({ message: 'resuming background activity' });
|
|
257
|
+
await this.startPeripheralScan();
|
|
258
|
+
}
|
|
244
259
|
pauseLogging() {
|
|
245
260
|
this.logEvent({ message: 'pausing logging' });
|
|
246
261
|
this.logDisabled = true;
|
|
@@ -317,6 +332,8 @@ export class BleInterface extends EventEmitter {
|
|
|
317
332
|
await this.connectInternal(true);
|
|
318
333
|
}
|
|
319
334
|
async startPeripheralScan(retry = false) {
|
|
335
|
+
if (this.backgroundPaused)
|
|
336
|
+
return;
|
|
320
337
|
if (!this.isConnected() || this.isDiscovering()) {
|
|
321
338
|
return;
|
|
322
339
|
}
|
|
@@ -338,12 +355,12 @@ export class BleInterface extends EventEmitter {
|
|
|
338
355
|
this.startPeripheralScan(true);
|
|
339
356
|
}
|
|
340
357
|
}
|
|
341
|
-
stopPeripheralScan() {
|
|
342
|
-
|
|
358
|
+
async stopPeripheralScan() {
|
|
359
|
+
const ble = this.getBinding();
|
|
360
|
+
if (!ble)
|
|
343
361
|
return;
|
|
344
362
|
this.logEvent({ message: 'stopping peripheral discovery ...' });
|
|
345
|
-
this.discoverTask
|
|
346
|
-
const ble = this.getBinding();
|
|
363
|
+
this.discoverTask?.stop();
|
|
347
364
|
ble.off('discover', this.onDiscovered);
|
|
348
365
|
return new Promise(done => {
|
|
349
366
|
ble.stopScanning(() => {
|
|
@@ -304,11 +304,17 @@ export class BleZwiftPlaySensor extends TBleSensor {
|
|
|
304
304
|
onTrainerResponse(m) {
|
|
305
305
|
try {
|
|
306
306
|
const data = TrainerResponse.fromBinary(m);
|
|
307
|
+
const text = data.content?.text !== undefined ? Buffer.from(data.content.text).toString('utf-8') : undefined;
|
|
307
308
|
this.emit('hub-trainer-response', data);
|
|
308
|
-
this.logEvent({ message: 'trainer response received', data });
|
|
309
|
+
this.logEvent({ message: 'trainer response received', unknown: data.unknown, text });
|
|
309
310
|
}
|
|
310
311
|
catch (err) {
|
|
311
|
-
|
|
312
|
+
let payload = 'unknown';
|
|
313
|
+
try {
|
|
314
|
+
payload = m.toString('hex');
|
|
315
|
+
}
|
|
316
|
+
catch { }
|
|
317
|
+
this.logEvent({ message: 'Error', fn: 'onTrainerResponse', error: err.message, stack: err.stack, payload });
|
|
312
318
|
}
|
|
313
319
|
}
|
|
314
320
|
onRidingData(m) {
|
|
@@ -25,6 +25,7 @@ export default class DirectConnectInterface extends EventEmitter {
|
|
|
25
25
|
matching = [];
|
|
26
26
|
instance;
|
|
27
27
|
connected = false;
|
|
28
|
+
backgroundPaused = false;
|
|
28
29
|
static getInstance(props = {}) {
|
|
29
30
|
if (DirectConnectInterface._instance === undefined)
|
|
30
31
|
DirectConnectInterface._instance = new DirectConnectInterface(props);
|
|
@@ -126,14 +127,7 @@ export default class DirectConnectInterface extends EventEmitter {
|
|
|
126
127
|
}
|
|
127
128
|
this.logEvent({ message: 'connecting to Direct Connect' });
|
|
128
129
|
this.getBinding().mdns.connect();
|
|
129
|
-
|
|
130
|
-
this.logEvent({ message: 'starting multicast DNS scan ..' });
|
|
131
|
-
this.getBinding().mdns.find(null, (service) => {
|
|
132
|
-
this.addService(service, 'unfiltered');
|
|
133
|
-
});
|
|
134
|
-
this.getBinding().mdns.find({ type: DC_TYPE }, (service) => {
|
|
135
|
-
this.addService(service, DC_TYPE);
|
|
136
|
-
});
|
|
130
|
+
this.startServiceDiscovery(reconnect);
|
|
137
131
|
}
|
|
138
132
|
catch (err) {
|
|
139
133
|
this.logError(err, 'connect');
|
|
@@ -143,6 +137,45 @@ export default class DirectConnectInterface extends EventEmitter {
|
|
|
143
137
|
this.emit('connected');
|
|
144
138
|
return true;
|
|
145
139
|
}
|
|
140
|
+
startServiceDiscovery(reconnect) {
|
|
141
|
+
if (this.backgroundPaused)
|
|
142
|
+
return;
|
|
143
|
+
if (!reconnect)
|
|
144
|
+
this.logEvent({ message: 'starting multicast DNS scan ..' });
|
|
145
|
+
this.getBinding().mdns.find(null, (service) => {
|
|
146
|
+
this.addService(service, 'unfiltered');
|
|
147
|
+
});
|
|
148
|
+
this.getBinding().mdns.find({ type: DC_TYPE }, (service) => {
|
|
149
|
+
this.addService(service, DC_TYPE);
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
async pauseBackgroundActivity() {
|
|
153
|
+
if (this.backgroundPaused)
|
|
154
|
+
return;
|
|
155
|
+
this.backgroundPaused = true;
|
|
156
|
+
this.logEvent({ message: 'pausing background activity' });
|
|
157
|
+
try {
|
|
158
|
+
this.getBinding()?.mdns?.disconnect();
|
|
159
|
+
}
|
|
160
|
+
catch (err) {
|
|
161
|
+
this.logError(err, 'pauseBackgroundActivity');
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
async resumeBackgroundActivity() {
|
|
165
|
+
if (!this.backgroundPaused)
|
|
166
|
+
return;
|
|
167
|
+
this.backgroundPaused = false;
|
|
168
|
+
this.logEvent({ message: 'resuming background activity' });
|
|
169
|
+
if (!this.isConnected())
|
|
170
|
+
return;
|
|
171
|
+
try {
|
|
172
|
+
this.getBinding()?.mdns?.connect();
|
|
173
|
+
this.startServiceDiscovery();
|
|
174
|
+
}
|
|
175
|
+
catch (err) {
|
|
176
|
+
this.logError(err, 'resumeBackgroundActivity');
|
|
177
|
+
}
|
|
178
|
+
}
|
|
146
179
|
async disconnect() {
|
|
147
180
|
if (!this.isConnected())
|
|
148
181
|
return true;
|
|
@@ -368,6 +368,7 @@ export class DirectConnectPeripheral {
|
|
|
368
368
|
this.socket.on('end', this.onPortCloseHandler);
|
|
369
369
|
resolve(true);
|
|
370
370
|
});
|
|
371
|
+
this.logEvent({ message: 'connecting to wifi peripheral', path: this.getPath() });
|
|
371
372
|
this.socket.connect(port, address);
|
|
372
373
|
});
|
|
373
374
|
}
|
|
@@ -763,7 +763,7 @@ export const TrainerResponse = new TrainerResponse$Type();
|
|
|
763
763
|
class TrainerResponseContent$Type extends MessageType {
|
|
764
764
|
constructor() {
|
|
765
765
|
super("org.cagnulen.qdomyoszwift.TrainerResponseContent", [
|
|
766
|
-
{ no: 4, name: "Text", kind: "scalar", jsonName: "Text", opt: true, T:
|
|
766
|
+
{ no: 4, name: "Text", kind: "scalar", jsonName: "Text", opt: true, T: 12 }
|
|
767
767
|
]);
|
|
768
768
|
}
|
|
769
769
|
create(value) {
|
|
@@ -778,7 +778,7 @@ class TrainerResponseContent$Type extends MessageType {
|
|
|
778
778
|
let [fieldNo, wireType] = reader.tag();
|
|
779
779
|
switch (fieldNo) {
|
|
780
780
|
case 4:
|
|
781
|
-
message.text = reader.
|
|
781
|
+
message.text = reader.bytes();
|
|
782
782
|
break;
|
|
783
783
|
default:
|
|
784
784
|
let u = options.readUnknownField;
|
|
@@ -793,7 +793,7 @@ class TrainerResponseContent$Type extends MessageType {
|
|
|
793
793
|
}
|
|
794
794
|
internalBinaryWrite(message, writer, options) {
|
|
795
795
|
if (message.text !== undefined)
|
|
796
|
-
writer.tag(4, WireType.LengthDelimited).
|
|
796
|
+
writer.tag(4, WireType.LengthDelimited).bytes(message.text);
|
|
797
797
|
let u = options.writeUnknownFields;
|
|
798
798
|
if (u !== false)
|
|
799
799
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -27,6 +27,7 @@ export declare class BleInterface extends EventEmitter implements IBleInterface<
|
|
|
27
27
|
protected unsupported: BlePeripheralAnnouncement[];
|
|
28
28
|
protected expectedServices: string[];
|
|
29
29
|
protected matching: string[];
|
|
30
|
+
protected backgroundPaused: boolean;
|
|
30
31
|
protected connectTask: InteruptableTask<TaskState, boolean>;
|
|
31
32
|
protected disconnectTask: InteruptableTask<TaskState, boolean>;
|
|
32
33
|
protected scanTask: InteruptableTask<TaskState, void>;
|
|
@@ -63,6 +64,8 @@ export declare class BleInterface extends EventEmitter implements IBleInterface<
|
|
|
63
64
|
scan(props: BleScanProps): Promise<DeviceSettings[]>;
|
|
64
65
|
stopScan(): Promise<boolean>;
|
|
65
66
|
onScanDone(): DeviceSettings[];
|
|
67
|
+
pauseBackgroundActivity(): Promise<void>;
|
|
68
|
+
resumeBackgroundActivity(): Promise<void>;
|
|
66
69
|
pauseLogging(): void;
|
|
67
70
|
resumeLogging(): void;
|
|
68
71
|
isLoggingPaused(): boolean;
|
|
@@ -28,6 +28,7 @@ export default class DirectConnectInterface extends EventEmitter implements IBle
|
|
|
28
28
|
protected matching?: Array<string>;
|
|
29
29
|
protected instance: number;
|
|
30
30
|
protected connected: boolean;
|
|
31
|
+
protected backgroundPaused: boolean;
|
|
31
32
|
static getInstance(props?: InterfaceProps): DirectConnectInterface;
|
|
32
33
|
constructor(props: InterfaceProps);
|
|
33
34
|
setProps(props: InterfaceProps): void;
|
|
@@ -43,6 +44,9 @@ export default class DirectConnectInterface extends EventEmitter implements IBle
|
|
|
43
44
|
getBinding(): DirectConnectBinding;
|
|
44
45
|
autoConnect(): void;
|
|
45
46
|
connect(reconnect?: boolean): Promise<boolean>;
|
|
47
|
+
protected startServiceDiscovery(reconnect?: boolean): void;
|
|
48
|
+
pauseBackgroundActivity(): Promise<void>;
|
|
49
|
+
resumeBackgroundActivity(): Promise<void>;
|
|
46
50
|
disconnect(): Promise<boolean>;
|
|
47
51
|
terminate(): Promise<void>;
|
|
48
52
|
isConnected(): boolean;
|