import type { HybridObject } from 'react-native-nitro-modules'; export declare enum DfuState { Connecting = 0, Starting = 1, EnablingDfuMode = 2, Uploading = 3, Validating = 4, Disconnecting = 5, Completed = 6, Aborted = 7 } export declare enum DfuError { RemoteLegacyDfuInvalidState = 2, RemoteLegacyDfuNotSupported = 3, RemoteLegacyDfuDataExceedsLimit = 4, RemoteLegacyDfuCrcError = 5, RemoteLegacyDfuOperationFailed = 6, RemoteSecureDfuOpCodeNotSupported = 12, RemoteSecureDfuInvalidParameter = 13, RemoteSecureDfuInsufficientResources = 14, RemoteSecureDfuInvalidObject = 15, RemoteSecureDfuSignatureMismatch = 16, RemoteSecureDfuUnsupportedType = 17, RemoteSecureDfuOperationNotPermitted = 18, RemoteSecureDfuOperationFailed = 20, RemoteSecureDfuExtendedError = 21, RemoteExtendedErrorWrongCommandFormat = 22, RemoteExtendedErrorUnknownCommand = 23, RemoteExtendedErrorInitCommandInvalid = 24, RemoteExtendedErrorFwVersionFailure = 25, RemoteExtendedErrorHwVersionFailure = 26, RemoteExtendedErrorSdVersionFailure = 27, RemoteExtendedErrorSignatureMissing = 28, RemoteExtendedErrorWrongHashType = 29, RemoteExtendedErrorHashFailed = 30, RemoteExtendedErrorWrongSignatureType = 31, RemoteExtendedErrorVerificationFailed = 32, RemoteExtendedErrorInsufficientSpace = 33, RemoteButtonlessDfuOpCodeNotSupported = 92, RemoteButtonlessDfuOperationFailed = 94, RemoteButtonlessDfuInvalidAdvertisementName = 95, RemoteButtonlessDfuBusy = 96, RemoteButtonlessDfuNotBonded = 97, RemoteExperimentalButtonlessDfuOpCodeNotSupported = 9002, RemoteExperimentalButtonlessDfuOperationFailed = 9004, FileNotSpecified = 101, FileInvalid = 102, ExtendedInitPacketRequired = 103, InitPacketRequired = 104, FileSizeInvalid = 105, FileTypeUnsupported = 106, FileIOError = 107, FailedToConnect = 201, DeviceDisconnected = 202, BluetoothDisabled = 203, DeviceNotBonded = 204, ServiceDiscoveryFailed = 301, DeviceNotSupported = 302, ReadingVersionFailed = 303, EnablingControlPointFailed = 304, WritingCharacteristicFailed = 305, ReceivingNotificationFailed = 306, UnsupportedResponse = 307, BytesLost = 308, CrcError = 309, InvalidInternalState = 500 } export declare enum DfuFirmwareType { Application = 0, Bootloader = 1, SoftDevice = 2, SoftDeviceBootloader = 3, SoftDeviceBootloaderApplication = 4 } export interface DfuOptions { deviceId: string; filePath: string; firmwareType?: DfuFirmwareType; packetReceiptNotificationParameter?: number; forceDfu?: boolean; enableUnsafeExperimentalButtonlessDfu?: boolean; forceScanningForNewAddressInLegacyDfu?: boolean; numberOfRetries?: number; connectionTimeout?: number; dataObjectPreparationDelay?: number; alternativeAdvertisingNameEnabled?: boolean; disableResume?: boolean; } export type DfuStateCallback = (state: DfuState) => void; export type DfuProgressCallback = (part: number, totalParts: number, progress: number, currentSpeed: number, avgSpeed: number) => void; export type DfuErrorCallback = (error: DfuError, message: string) => void; export interface NativeDfuNitro extends HybridObject<{ ios: 'swift'; android: 'kotlin'; }> { startDfu(options: DfuOptions, stateCallback: DfuStateCallback, progressCallback: DfuProgressCallback, errorCallback: DfuErrorCallback): void; pauseDfu(): void; resumeDfu(): void; abortDfu(): void; } //# sourceMappingURL=NativeDfuNitro.nitro.d.ts.map