UNPKG

@sfourdrinier/react-native-ble-plx

Version:
201 lines (181 loc) 5.49 kB
"use strict"; /** * Bluetooth device id. */ /** * Unique identifier for BLE objects. */ /** * Bluetooth UUID */ /** * Base64 value */ /** * Transaction identifier. All transaction identifiers in numeric form are reserved for internal use. */ /** * Characteritic subscription type. */ /** * [Android only] ConnectionOptions parameter to describe when to call BluetoothGatt.refresh() */ /** * Subscription * @interface */ /** * Type of error code mapping table */ /** * Options which can be passed to when creating BLE Manager */ /** * Object representing information about restored BLE state after application relaunch. */ /** * Scan mode for Bluetooth LE scan. */ export let ScanMode = /*#__PURE__*/function (ScanMode) { /** * A special Bluetooth LE scan mode. Applications using this scan mode will passively listen for * other scan results without starting BLE scans themselves. */ ScanMode[ScanMode["Opportunistic"] = -1] = "Opportunistic"; /** * Perform Bluetooth LE scan in low power mode. This is the default scan mode as it consumes the * least power. [default value] */ ScanMode[ScanMode["LowPower"] = 0] = "LowPower"; /** * Perform Bluetooth LE scan in balanced power mode. Scan results are returned at a rate that * provides a good trade-off between scan frequency and power consumption. */ ScanMode[ScanMode["Balanced"] = 1] = "Balanced"; /** * Scan using highest duty cycle. It's recommended to only use this mode when the application is * running in the foreground. */ ScanMode[ScanMode["LowLatency"] = 2] = "LowLatency"; return ScanMode; }({}); /** * Scan callback type for Bluetooth LE scan. * @name ScanCallbackType */ export let ScanCallbackType = /*#__PURE__*/function (ScanCallbackType) { /** * Trigger a callback for every Bluetooth advertisement found that matches the filter criteria. * If no filter is active, all advertisement packets are reported. [default value] */ ScanCallbackType[ScanCallbackType["AllMatches"] = 1] = "AllMatches"; /** * A result callback is only triggered for the first advertisement packet received that matches * the filter criteria. */ ScanCallbackType[ScanCallbackType["FirstMatch"] = 2] = "FirstMatch"; /** * Receive a callback when advertisements are no longer received from a device that has been * previously reported by a first match callback. */ ScanCallbackType[ScanCallbackType["MatchLost"] = 4] = "MatchLost"; return ScanCallbackType; }({}); /** * Options which can be passed to scanning function * @name ScanOptions */ /** * Connection specific options to be passed before connection happen. [Not used] */ /** * Device Bluetooth Low Energy state. It's keys are used to check {@link #blemanagerstate} values * received by {@link BleManager} */ export let State = /*#__PURE__*/function (State) { /** * The current state of the manager is unknown; an update is imminent. */ State["Unknown"] = "Unknown"; /** * The connection with the system service was momentarily lost; an update is imminent. */ State["Resetting"] = "Resetting"; /** * The platform does not support Bluetooth low energy. */ State["Unsupported"] = "Unsupported"; /** * The app is not authorized to use Bluetooth low energy. */ State["Unauthorized"] = "Unauthorized"; /** * Bluetooth is currently powered off. */ State["PoweredOff"] = "PoweredOff"; /** * Bluetooth is currently powered on and available to use. */ State["PoweredOn"] = "PoweredOn"; return State; }({}); /** * Native module logging log level. By default it is set to None. * @name LogLevel */ export let LogLevel = /*#__PURE__*/function (LogLevel) { /** * Logging in native module is disabled */ LogLevel["None"] = "None"; /** * All logs in native module are shown */ LogLevel["Verbose"] = "Verbose"; /** * Only debug logs and of higher importance are shown in native module. */ LogLevel["Debug"] = "Debug"; /** * Only info logs and of higher importance are shown in native module. */ LogLevel["Info"] = "Info"; /** * Only warning logs and of higher importance are shown in native module. */ LogLevel["Warning"] = "Warning"; /** * Only error logs and of higher importance are shown in native module. */ LogLevel["Error"] = "Error"; return LogLevel; }({}); /** * Connection priority of BLE link determining the balance between power consumption and data throughput. * @name ConnectionPriority */ export let ConnectionPriority = /*#__PURE__*/function (ConnectionPriority) { /** * Default, recommended option balanced between power consumption and data throughput. */ ConnectionPriority[ConnectionPriority["Balanced"] = 0] = "Balanced"; /** * High priority, low latency connection, which increases transfer speed at the expense of power consumption. */ ConnectionPriority[ConnectionPriority["High"] = 1] = "High"; /** * Low power, reduced data rate connection setup. */ ConnectionPriority[ConnectionPriority["LowPower"] = 2] = "LowPower"; return ConnectionPriority; }({}); /** * Options for enabling background mode on Android using a foreground service. * This keeps BLE operations alive when the app is in the background. * @name BackgroundModeOptions */ /** * Options for automatic reconnection behavior. * @name ReconnectionOptions */ //# sourceMappingURL=TypeDefinition.js.map