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 GATTSERVICEREMOTETEST_H |
8 | #define GATTSERVICEREMOTETEST_H |
9 | |
10 | #include <QList> |
11 | #include <QObject> |
12 | |
13 | #include "bluezgattservice1_tst.h" |
14 | #include "dbusproperties_tst.h" |
15 | |
16 | #include "gattserviceremote.h" |
17 | #include "manager.h" |
18 | |
19 | class GattServiceRemoteTest : public QObject |
20 | { |
21 | Q_OBJECT |
22 | |
23 | public: |
24 | explicit GattServiceRemoteTest(); |
25 | |
26 | private Q_SLOTS: |
27 | void initTestCase(); |
28 | void cleanupTestCase(); |
29 | |
30 | void getPropertiesTest(); |
31 | void setHandleTest(); |
32 | |
33 | void serviceRemovedTest(); |
34 | |
35 | private: |
36 | struct GattServiceRemoteUnit { |
37 | BluezQt::GattServiceRemotePtr service; |
38 | org::bluez::GattService1 *dbusService; |
39 | org::freedesktop::DBus::Properties *dbusProperties; |
40 | }; |
41 | |
42 | BluezQt::Manager *m_manager; |
43 | QList<GattServiceRemoteUnit> m_units; |
44 | }; |
45 | |
46 | #endif // GATTSERVICEREMOTETEST_H |
47 | |