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 ADAPTERTEST_H |
8 | #define ADAPTERTEST_H |
9 | |
10 | #include <QList> |
11 | #include <QObject> |
12 | |
13 | #include "bluezadapter1_tst.h" |
14 | #include "dbusproperties_tst.h" |
15 | |
16 | #include "adapter.h" |
17 | #include "manager.h" |
18 | |
19 | class AdapterTest : public QObject |
20 | { |
21 | Q_OBJECT |
22 | |
23 | public: |
24 | explicit AdapterTest(); |
25 | |
26 | private Q_SLOTS: |
27 | void initTestCase(); |
28 | void cleanupTestCase(); |
29 | |
30 | void getPropertiesTest(); |
31 | void setAliasTest(); |
32 | void setPoweredTest(); |
33 | void setDiscoverableTest(); |
34 | void setDiscoverableTimeoutTest(); |
35 | void setPairableTest(); |
36 | void setPairableTimeoutTest(); |
37 | |
38 | void discoveryTest(); |
39 | void removeDeviceTest(); |
40 | void discoveryFilterTest_data(); |
41 | void discoveryFilterTest(); |
42 | void adapterRemovedTest(); |
43 | |
44 | private: |
45 | struct AdapterUnit { |
46 | BluezQt::AdapterPtr adapter; |
47 | org::bluez::Adapter1 *dbusAdapter; |
48 | org::freedesktop::DBus::Properties *dbusProperties; |
49 | }; |
50 | |
51 | BluezQt::Manager *m_manager; |
52 | QList<AdapterUnit> m_units; |
53 | }; |
54 | |
55 | #endif // ADAPTERTEST_H |
56 |