LCOV - code coverage report
Current view: top level - src/lib - statusservice_p.h (source / functions) Coverage Total Hit
Project: Dokit Lines: 100.0 % 2 2
Version: Functions: - 0 0

            Line data    Source code
       1              : // SPDX-FileCopyrightText: 2022-2024 Paul Colby <git@colby.id.au>
       2              : // SPDX-License-Identifier: LGPL-3.0-or-later
       3              : 
       4              : /*!
       5              :  * \file
       6              :  * Declares the StatusServicePrivate class.
       7              :  */
       8              : 
       9              : #ifndef QTPOKIT_STATUSSERVICE_P_H
      10              : #define QTPOKIT_STATUSSERVICE_P_H
      11              : 
      12              : #include <qtpokit/statusservice.h>
      13              : 
      14              : #include "abstractpokitservice_p.h"
      15              : 
      16              : #include <optional>
      17              : 
      18              : QTPOKIT_BEGIN_NAMESPACE
      19              : 
      20              : class QTPOKIT_EXPORT StatusServicePrivate : public AbstractPokitServicePrivate
      21              : {
      22           76 :     Q_OBJECT
      23              : 
      24              : public:
      25              :     explicit StatusServicePrivate(QLowEnergyController * controller, StatusService * const q);
      26              : 
      27              :     static StatusService::DeviceCharacteristics parseDeviceCharacteristics(const QByteArray &value);
      28              :     static StatusService::Status parseStatus(const QByteArray &value);
      29              :     static std::optional<StatusService::TorchStatus> parseTorchStatus(const QByteArray &value);
      30              :     static std::optional<StatusService::ButtonStatus> parseButtonPress(const QByteArray &value);
      31              : 
      32              : protected:
      33              :     void serviceDiscovered(const QBluetoothUuid &newService) override;
      34              : 
      35              :     void characteristicRead(const QLowEnergyCharacteristic &characteristic,
      36              :                             const QByteArray &value) override;
      37              :     void characteristicWritten(const QLowEnergyCharacteristic &characteristic,
      38              :                                const QByteArray &newValue) override;
      39              : 
      40              : private:
      41           76 :     Q_DECLARE_PUBLIC(StatusService)
      42              :     Q_DISABLE_COPY(StatusServicePrivate)
      43              :     friend class TestStatusService;
      44              : };
      45              : 
      46              : QTPOKIT_END_NAMESPACE
      47              : 
      48              : #endif // QTPOKIT_STATUSSERVICE_P_H
        

Generated by: LCOV version 2.0-1