1 | /* |
2 | * SPDX-FileCopyrightText: 2021 Ivan Podkurkov <podkiva2@gmail.com> |
3 | * |
4 | * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
5 | */ |
6 | |
7 | #ifndef GATTDESCRIPTORREMOTETEST_H |
8 | #define GATTDESCRIPTORREMOTETEST_H |
9 | |
10 | #include <QList> |
11 | #include <QObject> |
12 | |
13 | #include "bluezgattdescriptor1_tst.h" |
14 | #include "dbusproperties_tst.h" |
15 | |
16 | #include "gattdescriptorremote.h" |
17 | #include "manager.h" |
18 | |
19 | class GattDescriptorRemoteTest : public QObject |
20 | { |
21 | Q_OBJECT |
22 | |
23 | public: |
24 | explicit GattDescriptorRemoteTest(); |
25 | |
26 | private Q_SLOTS: |
27 | void initTestCase(); |
28 | void cleanupTestCase(); |
29 | |
30 | void getPropertiesTest(); |
31 | void setHandleTest(); |
32 | |
33 | void readValueTest(); |
34 | void writeValueTest(); |
35 | |
36 | void descriptorRemovedTest(); |
37 | |
38 | private: |
39 | struct GattDescriptorRemoteUnit { |
40 | BluezQt::GattDescriptorRemotePtr descriptor; |
41 | org::bluez::GattDescriptor1 *dbusDescriptor; |
42 | org::freedesktop::DBus::Properties *dbusProperties; |
43 | }; |
44 | |
45 | BluezQt::Manager *m_manager; |
46 | QList<GattDescriptorRemoteUnit> m_units; |
47 | }; |
48 | |
49 | #endif // GATTDESCRIPTORREMOTETEST_H |
50 | |