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
20class DeviceTest : public QObject
21{
22 Q_OBJECT
23
24public:
25 explicit DeviceTest();
26
27private 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
38private:
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 deviceRssi(org::bluez::Device1 *device) const;
47
48 BluezQt::Manager *m_manager;
49 QList<DeviceUnit> m_units;
50};
51
52#endif // DEVICETEST_H
53

source code of bluez-qt/autotests/devicetest.h