* @brief Get Bluetooth adapter availability and connection status */
| 508 | * @brief Get Bluetooth adapter availability and connection status |
| 509 | */ |
| 510 | API::CommandResponse API::Handlers::BluetoothLEHandler::getStatus(const QString& id, |
| 511 | const QJsonObject& params) |
| 512 | { |
| 513 | Q_UNUSED(params) |
| 514 | |
| 515 | auto* ble = IO::ConnectionManager::instance().connectedBluetoothLE(); |
| 516 | |
| 517 | QJsonObject result; |
| 518 | result[QStringLiteral("operatingSystemSupported")] = ble->operatingSystemSupported(); |
| 519 | result[QStringLiteral("adapterAvailable")] = ble->adapterAvailable(); |
| 520 | result[QStringLiteral("isOpen")] = ble->isOpen(); |
| 521 | result[QStringLiteral("deviceCount")] = ble->deviceCount(); |
| 522 | |
| 523 | return CommandResponse::makeSuccess(id, result); |
| 524 | } |
nothing calls this directly
no test coverage detected