import { QueueComProtocol } from '@iotize/tap/protocol/core';
import { BLEPacketBuilder } from './ble-packet-builder';
import { BLEPacketSplitter } from './ble-packet-splitter';
import { BleComError } from './errors';
/**
 * @deprecated use UniversalBleProtocolAdpater
 * Abstract class for BLE communication
 *
 * With ble communication, data is split into sub packets.
 * This class handles creation of packet chunks.
 *
 * - You must only implement the function to send one packet chunk writeLwm2mPacketChunk()
 * -
 */
export declare abstract class AbstractBleProtocol extends QueueComProtocol {
    bleOptions: {
        mtu: number;
    };
    static RECEIVED_BUFFER_LENGTH: number;
    protected packetBuilder?: BLEPacketBuilder;
    protected packetSplitter?: BLEPacketSplitter;
    protected _readReject?: (reason?: any) => void;
    protected _pendingRead?: Uint8Array;
    protected _readResolve?: (value: Uint8Array | PromiseLike<Uint8Array>) => void;
    protected _readPromise?: Promise<Uint8Array>;
    /**
     * Actual implementation to send a packet chunk with ble
     */
    abstract writeLwm2mPacketChunk(data: Uint8Array): Promise<Uint8Array>;
    /**
     * Actual implementation to listen ble messages coming from LWM2M IoTize device
     */
    abstract subscribeToLwm2mMessage(): void;
    constructor(bleOptions?: {
        mtu: number;
    });
    onNewLwm2mMessage(data: Uint8Array): void;
    onNewLwm2mMessageError(err: Error): void;
    onLwm2mDataChunkError(error: BleComError): void;
    getLwm2mResponsePromise(): Promise<Uint8Array>;
    createLwm2mResponsePromise(): Promise<Uint8Array>;
    read(): Promise<Uint8Array>;
    write(data: Uint8Array): Promise<any>;
    /**
     *
     * @param data data chunk
     */
    onNewLwm2mPacket(data: Uint8Array): void;
}
