File indexing completed on 2024-09-01 03:42:41
0001 /* 0002 * SPDX-FileCopyrightText: 2014-2015 David Rosca <nowrep@gmail.com> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #ifndef FAKEBLUEZ_H 0008 #define FAKEBLUEZ_H 0009 0010 #include <QObject> 0011 #include <QVariantMap> 0012 0013 class TestInterface; 0014 class ObjectManager; 0015 class AgentManager; 0016 class ProfileManager; 0017 class DeviceManager; 0018 class ObexObject; 0019 class ObexAgentManager; 0020 class ObexClient; 0021 0022 class FakeBluez : public QObject 0023 { 0024 Q_OBJECT 0025 0026 public: 0027 explicit FakeBluez(QObject *parent = nullptr); 0028 0029 void runTest(const QString &testName); 0030 void runAction(const QString &object, const QString &actionName, const QVariantMap &properties); 0031 0032 private Q_SLOTS: 0033 void doRunAction(); 0034 0035 private: 0036 void clear(); 0037 void createObjectManager(); 0038 void createAgentManager(); 0039 void createProfileManager(); 0040 void createDeviceManager(); 0041 void createObexObjectManager(); 0042 void createObexAgentManager(); 0043 void createObexClient(); 0044 0045 void runBluezNotExportingInterfacesTest(); 0046 void runBluezEmptyManagedObjectsTest(); 0047 void runBluezNoAdaptersTest(); 0048 void runBluezStandardTest(); 0049 0050 void runObexNotExportingInterfacesTest(); 0051 void runObexEmptyManagedObjectsTest(); 0052 void runObexNoClientTest(); 0053 void runObexNoAgentManagerTest(); 0054 void runObexStandardTest(); 0055 0056 TestInterface *m_testInterface; 0057 ObjectManager *m_objectManager; 0058 AgentManager *m_agentManager; 0059 ProfileManager *m_profileManager; 0060 DeviceManager *m_deviceManager; 0061 0062 ObexObject *m_obexObject; 0063 ObexAgentManager *m_obexAgentManager; 0064 ObexClient *m_obexClient; 0065 0066 QString m_actionObject; 0067 QString m_actionName; 0068 QVariantMap m_actionProperties; 0069 }; 0070 0071 #endif // FAKEBLUEZ_H