File indexing completed on 2024-10-06 03:36:45
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 #include "testinterface.h" 0008 #include "fakebluez.h" 0009 0010 #include <QDBusConnection> 0011 0012 TestInterface::TestInterface(FakeBluez *parent) 0013 : QDBusAbstractAdaptor(parent) 0014 , m_fakeBluez(parent) 0015 { 0016 } 0017 0018 void TestInterface::runTest(const QString &testName) 0019 { 0020 m_fakeBluez->runTest(testName); 0021 } 0022 0023 void TestInterface::runAction(const QString &object, const QString &actionName, const QVariantMap &properties, const QDBusMessage &msg) 0024 { 0025 m_msg = msg; 0026 m_msg.setDelayedReply(true); 0027 0028 m_fakeBluez->runAction(object, actionName, properties); 0029 } 0030 0031 void TestInterface::emitActionFinished() 0032 { 0033 QDBusConnection::sessionBus().send(m_msg.createReply()); 0034 } 0035 0036 #include "moc_testinterface.cpp"