| 1 |
/* |
| 2 |
* SPDX-FileCopyrightText: 2014-2015 David Rosca <[email protected]> |
| 3 |
* |
| 4 |
* SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 5 |
*/ |
| 6 |
|
| 7 |
#ifndef FAKEBLUEZ_H |
| 8 |
#define FAKEBLUEZ_H |
| 9 |
|
| 10 |
#include <QObject> |
| 11 |
#include <QVariantMap> |
| 12 |
|
| 13 |
class TestInterface; |
| 14 |
class ObjectManager; |
| 15 |
class AgentManager; |
| 16 |
class ProfileManager; |
| 17 |
class DeviceManager; |
| 18 |
class ObexObject; |
| 19 |
class ObexAgentManager; |
| 20 |
class ObexClient; |
| 21 |
|
| 22 |
class FakeBluez : public QObject |
| 23 |
{ |
| 24 |
Q_OBJECT |
| 25 |
|
| 26 |
public: |
| 27 |
explicit FakeBluez(QObject *parent = nullptr); |
| 28 |
|
| 29 |
void runTest(const QString &testName); |
| 30 |
void runAction(const QString &object, const QString &actionName, const QVariantMap &properties); |
| 31 |
|
| 32 |
private Q_SLOTS: |
| 33 |
void doRunAction(); |
| 34 |
|
| 35 |
private: |
| 36 |
void clear(); |
| 37 |
void createObjectManager(); |
| 38 |
void createAgentManager(); |
| 39 |
void createProfileManager(); |
| 40 |
void createDeviceManager(); |
| 41 |
void createObexObjectManager(); |
| 42 |
void createObexAgentManager(); |
| 43 |
void createObexClient(); |
| 44 |
|
| 45 |
void runBluezNotExportingInterfacesTest(); |
| 46 |
void runBluezEmptyManagedObjectsTest(); |
| 47 |
void runBluezNoAdaptersTest(); |
| 48 |
void runBluezStandardTest(); |
| 49 |
|
| 50 |
void runObexNotExportingInterfacesTest(); |
| 51 |
void runObexEmptyManagedObjectsTest(); |
| 52 |
void runObexNoClientTest(); |
| 53 |
void runObexNoAgentManagerTest(); |
| 54 |
void runObexStandardTest(); |
| 55 |
|
| 56 |
TestInterface *m_testInterface; |
| 57 |
ObjectManager *m_objectManager; |
| 58 |
AgentManager *m_agentManager; |
| 59 |
ProfileManager *m_profileManager; |
| 60 |
DeviceManager *m_deviceManager; |
| 61 |
|
| 62 |
ObexObject *m_obexObject; |
| 63 |
ObexAgentManager *m_obexAgentManager; |
| 64 |
ObexClient *m_obexClient; |
| 65 |
|
| 66 |
QString m_actionObject; |
| 67 |
QString m_actionName; |
| 68 |
QVariantMap m_actionProperties; |
| 69 |
}; |
| 70 |
|
| 71 |
#endif // FAKEBLUEZ_H |