LCOV - code coverage report
Current view: top level - src/app - devicecommand.h (source / functions) Hit Total Coverage
Project: QtPokit Lines: 0 1 0.0 %
Version: Functions: 0 0 -

          Line data    Source code
       1             : // SPDX-FileCopyrightText: 2022 Paul Colby <git@colby.id.au>
       2             : // SPDX-License-Identifier: LGPL-3.0-or-later
       3             : 
       4             : #ifndef QTPOKIT_DEVICECOMMAND_H
       5             : #define QTPOKIT_DEVICECOMMAND_H
       6             : 
       7             : #include "abstractcommand.h"
       8             : 
       9             : #include <QLowEnergyController>
      10             : 
      11             : class AbstractPokitService;
      12             : class PokitDevice;
      13             : 
      14           0 : class DeviceCommand : public AbstractCommand
      15             : {
      16             : public:
      17             :     explicit DeviceCommand(QObject * const parent);
      18             : 
      19             : public slots:
      20             :     bool start() override;
      21             : 
      22             : protected:
      23             :     PokitDevice * device; ///< Pokit Bluetooth device (if any) this command inerracts with.
      24             :     int exitCodeOnDisconnect; ///< Exit code to return on device disconnection.
      25             : 
      26             :     void disconnect(int exitCode=EXIT_SUCCESS);
      27             :     virtual AbstractPokitService * getService() = 0;
      28             : 
      29             : protected slots:
      30             :     virtual void controllerError(const QLowEnergyController::Error error);
      31             :     virtual void deviceDisconnected();
      32             :     virtual void serviceError(const QLowEnergyService::ServiceError error);
      33             :     virtual void serviceDetailsDiscovered();
      34             : 
      35             : private slots:
      36             :     // These are protected in the base class, but hidden (private) for our descendents.
      37             :     void deviceDiscovered(const QBluetoothDeviceInfo &info) override;
      38             :     void deviceDiscoveryFinished() override;
      39             : 
      40             :     friend class TestDeviceCommand;
      41             : };
      42             : 
      43             : #endif // QTPOKIT_DEVICECOMMAND_H

Generated by: LCOV version 1.14