TalerBluetoothSettings.kt
/*
* This file is part of GNU Taler
* (C) 2026 Taler Systems S.A.
*
* GNU Taler is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 3, or (at your option) any later version.
*
* GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
package net.taler.merchantpos.devices
import androidx.annotation.StringRes
import net.taler.merchantpos.R
@StringRes
internal fun TalerBleStatus.label(): Int =
when (this)
{
TalerBleStatus.Disabled -> R.string.payment_option_disabled
TalerBleStatus.Unsupported -> R.string.taler_ble_unsupported
TalerBleStatus.PermissionRequired -> R.string.taler_ble_permission
TalerBleStatus.BluetoothOff -> R.string.taler_ble_off
TalerBleStatus.LocationOff -> R.string.taler_ble_location
TalerBleStatus.Disconnected -> R.string.payment_device_status_disconnected
TalerBleStatus.Scanning -> R.string.taler_ble_scanning
TalerBleStatus.Connecting -> R.string.taler_ble_connecting
TalerBleStatus.Pairing -> R.string.taler_ble_pairing
TalerBleStatus.PairingRequired -> R.string.taler_ble_pairing_required
TalerBleStatus.Connected, TalerBleStatus.Ready -> R.string.payment_device_status_connected
TalerBleStatus.Sending -> R.string.taler_ble_sending
TalerBleStatus.TooLong -> R.string.taler_ble_too_long
TalerBleStatus.Failed -> R.string.taler_ble_failed
}