1 | /* |
2 | * SPDX-FileCopyrightText: 2014-2015 David Rosca <nowrep@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 DEVICETEST_H |
8 | #define DEVICETEST_H |
9 | |
10 | #include <QList> |
11 | #include <QObject> |
12 | |
13 | #include "bluezdevice1_tst.h" |
14 | #include "dbusproperties_tst.h" |
15 | |
16 | #include "adapter.h" |
17 | #include "device.h" |
18 | #include "manager.h" |
19 | |
20 | class DeviceTest : public QObject |
21 | { |
22 | Q_OBJECT |
23 | |
24 | public: |
25 | explicit DeviceTest(); |
26 | |
27 | private Q_SLOTS: |
28 | void initTestCase(); |
29 | void cleanupTestCase(); |
30 | |
31 | void getPropertiesTest(); |
32 | void setAliasTest(); |
33 | void setTrustedTest(); |
34 | void setBlockedTest(); |
35 | |
36 | void deviceRemovedTest(); |
37 | |
38 | private: |
39 | struct DeviceUnit { |
40 | BluezQt::DevicePtr device; |
41 | org::bluez::Device1 *dbusDevice; |
42 | org::freedesktop::DBus::Properties *dbusProperties; |
43 | }; |
44 | |
45 | QString deviceIcon(org::bluez::Device1 *device) const; |
46 | qint16 (org::bluez::Device1 *device) const; |
47 | |
48 | BluezQt::Manager *m_manager; |
49 | QList<DeviceUnit> m_units; |
50 | }; |
51 | |
52 | #endif // DEVICETEST_H |
53 | |