| 1 |
/* |
| 2 |
* SPDX-FileCopyrightText: 2019 Manuel Weichselbaumer <[email protected]> |
| 3 |
* |
| 4 |
* SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 5 |
*/ |
| 6 |
|
| 7 |
#ifndef LESERVER_H |
| 8 |
#define LESERVER_H |
| 9 |
|
| 10 |
#include <QObject> |
| 11 |
#include <QTimer> |
| 12 |
|
| 13 |
#include "gattcharacteristic.h" |
| 14 |
#include "types.h" |
| 15 |
|
| 16 |
namespace BluezQt |
| 17 |
{ |
| 18 |
class PendingCall; |
| 19 |
} |
| 20 |
|
| 21 |
class LeServer : public QObject |
| 22 |
{ |
| 23 |
Q_OBJECT |
| 24 |
|
| 25 |
public: |
| 26 |
explicit LeServer(BluezQt::Manager *manager, QObject *parent = nullptr); |
| 27 |
|
| 28 |
private: |
| 29 |
void onCallFinished(BluezQt::PendingCall *call); |
| 30 |
|
| 31 |
BluezQt::Manager *m_manager; |
| 32 |
BluezQt::GattCharacteristic *m_notifyingCharacteristic = nullptr; |
| 33 |
|
| 34 |
QTimer m_characteristicWriteTimer; // < Used to write to characteristic with 'notify' flag set. |
| 35 |
}; |
| 36 |
|
| 37 |
#endif |