package Ġcom . tr if ork . bluetooth . le Ċ Ċ import Ġandroid . bluetooth . Bluetooth Device Ċ import Ġandroid . bluetooth . Bluetooth Gatt Ċ import Ġandroid . bluetooth . Bluetooth GattCharacteristic Ċ import Ġandroid . os . Parcelable Ċ import Ġkotlinx . parcel ize . Parcel ize Ċ Ċ @ Parcel ize Ċ class ĠConnection Ġinternal Ġconstructor ( internal Ġval Ġdevice : ĠBluetooth Device ) Ġ: ĠParcel able Ġ{ ĊĠĠĠ Ġinterface ĠCommunication Callback Ġ{ ĊĠĠĠĠĠĠĠ Ġfun Ġon Read ( character istic : ĠBluetooth GattCharacteristic , Ġdata : ĠByteArray ) Ġ{} ĊĠĠĠĠĠĠĠ Ġfun ĠonChanged ( character istic : ĠBluetooth GattCharacteristic , Ġdata : ĠByteArray ) Ġ{} ĊĠĠĠĠĠĠĠ Ġfun Ġon Write ( character istic : ĠBluetooth GattCharacteristic ) Ġ{} ĊĠĠĠĠĠĠĠ Ġfun Ġon Rel iable Write Completed () Ġ{} ĊĠĠĠĠĠĠĠ Ġfun Ġon Notification Changed ( character istic : ĠBluetooth GattCharacteristic ) Ġ{} ĊĠĠĠĠĠĠĠ Ġfun Ġon Read ( rssi : ĠInt ) Ġ{} ĊĠĠĠĠĠĠĠ Ġfun Ġon Updated ( interval : ĠInt ) Ġ{} ĊĠĠĠĠĠĠĠ Ġfun Ġon Disconnected ( connection : ĠConnection , Ġstatus : ĠInt ) Ġ{} ĊĠĠĠĠĠĠĠ Ġfun Ġon ( failure : ĠBluetooth Manager . Failure ) Ġ{} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġenum Ġclass ĠPriority ( val Ġvalue : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ ĠHigh ( Bluetooth Gatt . CONNECTION _ PRIORITY _ HIGH ), ĊĠĠĠĠĠĠĠ ĠBal anced ( Bluetooth Gatt . CONNECTION _ PRIORITY _ BAL ANCED ), ĊĠĠĠĠĠĠĠ ĠLow ( Bluetooth Gatt . CONNECTION _ PRIORITY _ LOW _ POWER ) ĊĠĠĠ Ġ} Ċ }