4#include "abstractcommand.h"
18 bool start()
override;
22 #if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
42 friend class TestScanCommand;
The AbstractCommand class provides a consistent base for the classes that implement CLI commands.
The ScanCommand class implements the scan CLI command, by scanning for nearby Pokit Bluetooth devices...
static QJsonObject toJson(const QBluetoothDeviceInfo &info)
Returns info as a JSON object.
QStringList requiredOptions(const QCommandLineParser &parser) const override
Returns a list of CLI option names required by this command.
void deviceUpdated(const QBluetoothDeviceInfo &info, const QBluetoothDeviceInfo::Fields updatedFields)
Handles updated Pokit devices, writing info to stdout.
ScanCommand(QObject *const parent=nullptr)
Construct a new ScanCommand object with parent.
static QString toString(const QBluetoothDeviceInfo::MajorDeviceClass &majorClass)
Returns majorClass as a human-readable string, or a null QString if majorClass is not recognised.
void deviceDiscoveryFinished() override
Handles the completion of device discovery.
bool start() override
Begins scanning for Pokit devices.
QStringList processOptions(const QCommandLineParser &parser) override
Processes the relevant options from the command line parser.
bool showCsvHeader
Whether or not to show a header as the first line of CSV output.
void deviceDiscovered(const QBluetoothDeviceInfo &info) override
Handles discovered Pokit devices, writing info to stdout.
QStringList supportedOptions(const QCommandLineParser &parser) const override
Returns a list of CLI option names supported by this command.
typedef CoreConfigurations
QObject * parent() const const