MCPcopy Index your code
hub / github.com/dotintent/react-native-ble-plx / BleModuleInterface

Interface BleModuleInterface

src/BleModule.js:262–848  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260 * @private
261 */
262export interface BleModuleInterface {
263 // NativeModule methods
264
265 addListener(string): void;
266 removeListeners(number): void;
267
268 // Lifecycle
269
270 /**
271 * Creates new native module internally. Only one module
272 * is allowed to be instantiated.
273 * @param {?string} restoreIdentifierKey Optional unique Id used for state restoration of BLE manager.
274 * @private
275 */
276 createClient(restoreIdentifierKey: ?string): void;
277
278 /**
279 * Destroys previously instantiated module. This function is
280 * only safe when previously BleModule was created.
281 * @returns {Promise<void>} Promise may return an error when the function cannot be called.
282 * @private
283 */
284 destroyClient(): Promise<void>;
285
286 // Monitoring state
287
288 /**
289 * Enable Bluetooth. This function blocks until BLE is in PoweredOn state. [Android only]
290 *
291 * @param {TransactionId} transactionId Transaction handle used to cancel operation
292 * @returns {Promise<void>} Promise completes when state transition was successful.
293 * @private
294 */
295 enable(transactionId: TransactionId): Promise<void>;
296
297 /**
298 * Disable Bluetooth. This function blocks until BLE is in PoweredOff state. [Android only]
299 *
300 * @param {TransactionId} transactionId Transaction handle used to cancel operation
301 * @returns {Promise<void>} Promise completes when state transition was successful.
302 * @private
303 */
304 disable(transactionId: TransactionId): Promise<void>;
305
306 /**
307 * Current state of BLE device.
308 *
309 * @returns {Promise<State>} Current state of BLE device.
310 * @private
311 */
312 state(): Promise<$Keys<typeof State>>;
313
314 // Scanning
315
316 /**
317 * Starts device scan.
318 *
319 * @param {?Array<UUID>} filteredUUIDs List of UUIDs for services which needs to be present to detect device during

Callers 209

constructorMethod · 0.65
onStateChangeMethod · 0.65
startDeviceScanMethod · 0.65
onDeviceDisconnectedMethod · 0.65
addListenerMethod · 0.65
Utils.jsFile · 0.65
constructorMethod · 0.65
destroyMethod · 0.65
startDisableEnableTestFunction · 0.65
utils.tsFile · 0.65
BLEServiceInstanceClass · 0.65

Implementers 1

BlePlxModuleandroid/src/main/java/com/bleplx/BlePl

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…