Debian Codegraph @

autotests/gattcharacteristicremotetest.h

raw
1 /*
2 * SPDX-FileCopyrightText: 2021 Ivan Podkurkov <[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 GATTCHARACTERISTICREMOTETEST_H
8 #define GATTCHARACTERISTICREMOTETEST_H
9
10 #include <QList>
11 #include <QObject>
12
13 #include "bluezgattcharacteristic1_tst.h"
14 #include "dbusproperties_tst.h"
15
16 #include "gattserviceremote.h"
17 #include "gattcharacteristicremote.h"
18 #include "manager.h"
19
20 class GattCharacteristicRemoteTest : public QObject
21 {
22 Q_OBJECT
23
24 public:
25 explicit GattCharacteristicRemoteTest();
26
27 private Q_SLOTS:
28 void initTestCase();
29 void cleanupTestCase();
30
31 void getPropertiesTest();
32 void setHandleTest();
33
34 void readValueTest();
35 void writeValueTest();
36 void startNotifyTest();
37 void stopNotifyTest();
38
39 void characteristicRemovedTest();
40
41 private:
42 struct GattCharacteristicRemoteUnit {
43 BluezQt::GattCharacteristicRemotePtr characteristic;
44 org::bluez::GattCharacteristic1 *dbusCharacteristic;
45 org::freedesktop::DBus::Properties *dbusProperties;
46 };
47
48 BluezQt::Manager *m_manager;
49 QList<GattCharacteristicRemoteUnit> m_units;
50 };
51
52 #endif // GATTCHARACTERISTICREMOTETEST_H