LCOV - code coverage report
Current view: top level - include/qtpokit - abstractpokitservice.h (source / functions) Hit Total Coverage
Project: QtPokit Lines: 2 2 100.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             : /*!
       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             : 
      14             : #include <QLowEnergyService>
      15             : #include <QObject>
      16             : 
      17             : class QLowEnergyController;
      18             : 
      19             : QTPOKIT_BEGIN_NAMESPACE
      20             : 
      21             : class AbstractPokitServicePrivate;
      22             : 
      23             : class QTPOKIT_EXPORT AbstractPokitService : public QObject
      24             : {
      25          17 :     Q_OBJECT
      26             : 
      27             : public:
      28             :     AbstractPokitService() = delete;
      29             :     virtual ~AbstractPokitService();
      30             : 
      31             :     virtual bool readCharacteristics() = 0;
      32             : 
      33             :     bool autoDiscover() const;
      34             :     void setAutoDiscover(const bool discover = true);
      35             : 
      36             :     QLowEnergyService * service();
      37             :     const QLowEnergyService * service() const;
      38             : 
      39             : signals:
      40             :     void serviceDetailsDiscovered();
      41             :     void serviceErrorOccurred(QLowEnergyService::ServiceError newError);
      42             : 
      43             : protected:
      44             :     /// \cond internal
      45             :     AbstractPokitServicePrivate * d_ptr; ///< Internal d-pointer.
      46             :     AbstractPokitService(AbstractPokitServicePrivate * const d, QObject * const parent);
      47             :     /// \endcond
      48             : 
      49             : private:
      50          72 :     Q_DECLARE_PRIVATE(AbstractPokitService)
      51             :     Q_DISABLE_COPY(AbstractPokitService)
      52             :     friend class TestAbstractPokitService;
      53             : };
      54             : 
      55             : QTPOKIT_END_NAMESPACE
      56             : 
      57             : #endif // QTPOKIT_ABSTRACTPOKITSERVICE_H

Generated by: LCOV version 1.14