File indexing completed on 2024-04-14 03:49:54

0001 /*
0002  * SPDX-FileCopyrightText: 2019 Kai Uwe Broulik <kde@broulik.de>
0003  *
0004  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005  */
0006 
0007 #ifndef BATTERYTEST_H
0008 #define BATTERYTEST_H
0009 
0010 #include <QObject>
0011 
0012 #include "bluezbattery1_tst.h"
0013 
0014 #include "battery.h"
0015 #include "device.h"
0016 #include "manager.h"
0017 
0018 class BatteryTest : public QObject
0019 {
0020     Q_OBJECT
0021 
0022 public:
0023     explicit BatteryTest();
0024 
0025 private Q_SLOTS:
0026     void initTestCase();
0027     void cleanupTestCase();
0028 
0029     void getPropertiesTest();
0030 
0031 private:
0032     struct BatteryUnit {
0033         BluezQt::DevicePtr device;
0034         org::bluez::Battery1 *dbusBattery;
0035     };
0036 
0037     BluezQt::Manager *m_manager;
0038     QList<BatteryUnit> m_units;
0039 };
0040 
0041 #endif // BATTERYTEST_H