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

          Line data    Source code
       1             : // SPDX-FileCopyrightText: 2022-2023 Paul Colby <git@colby.id.au>
       2             : // SPDX-License-Identifier: LGPL-3.0-or-later
       3             : 
       4             : /*!
       5             :  * \file
       6             :  * Declares the AbstractPokitService class.
       7             :  */
       8             : 
       9             : #ifndef QTPOKIT_ABSTRACTPOKITSERVICE_H
      10             : #define QTPOKIT_ABSTRACTPOKITSERVICE_H
      11             : 
      12             : #include "qtpokit_global.h"
      13             : #include "pokitproducts.h"
      14             : 
      15             : #include <QLowEnergyService>
      16             : #include <QObject>
      17             : 
      18             : class QLowEnergyController;
      19             : 
      20             : QTPOKIT_BEGIN_NAMESPACE
      21             : 
      22             : class AbstractPokitServicePrivate;
      23             : 
      24             : class QTPOKIT_EXPORT AbstractPokitService : public QObject
      25             : {
      26          18 :     Q_OBJECT
      27             : 
      28             : public:
      29             :     AbstractPokitService() = delete;
      30             :     virtual ~AbstractPokitService();
      31             : 
      32             :     virtual bool readCharacteristics() = 0;
      33             : 
      34             :     bool autoDiscover() const;
      35             :     void setAutoDiscover(const bool discover = true);
      36             : 
      37             :     PokitProduct pokitProduct() const;
      38             :     void setPokitProduct(const PokitProduct product);
      39             : 
      40             :     QLowEnergyService * service();
      41             :     const QLowEnergyService * service() const;
      42             : 
      43             : signals:
      44             :     void serviceDetailsDiscovered();
      45             :     void serviceErrorOccurred(QLowEnergyService::ServiceError newError);
      46             : 
      47             : protected:
      48             :     /// \cond internal
      49             :     AbstractPokitServicePrivate * d_ptr; ///< Internal d-pointer.
      50             :     AbstractPokitService(AbstractPokitServicePrivate * const d, QObject * const parent);
      51             :     /// \endcond
      52             : 
      53             : private:
      54        9792 :     Q_DECLARE_PRIVATE(AbstractPokitService)
      55             :     Q_DISABLE_COPY(AbstractPokitService)
      56             :     friend class TestAbstractPokitService;
      57             : };
      58             : 
      59             : QTPOKIT_END_NAMESPACE
      60             : 
      61             : #endif // QTPOKIT_ABSTRACTPOKITSERVICE_H

Generated by: LCOV version 1.14