MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / getStatus

Method getStatus

app/src/API/Handlers/BluetoothLEHandler.cpp:510–524  ·  view source on GitHub ↗

* @brief Get Bluetooth adapter availability and connection status */

Source from the content-addressed store, hash-verified

508 * @brief Get Bluetooth adapter availability and connection status
509 */
510API::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}

Callers

nothing calls this directly

Calls 5

connectedBluetoothLEMethod · 0.80
adapterAvailableMethod · 0.80
deviceCountMethod · 0.80
isOpenMethod · 0.45

Tested by

no test coverage detected