| 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 |
#include "testinterface.h" |
| 8 |
#include "fakebluez.h" |
| 9 |
|
| 10 |
#include <QDBusConnection> |
| 11 |
|
| 12 |
TestInterface::TestInterface(FakeBluez *parent) |
| 13 |
: QDBusAbstractAdaptor(parent) |
| 14 |
, m_fakeBluez(parent) |
| 15 |
{ |
| 16 |
} |
| 17 |
|
| 18 |
void TestInterface::runTest(const QString &testName) |
| 19 |
{ |
| 20 |
m_fakeBluez->runTest(testName); |
| 21 |
} |
| 22 |
|
| 23 |
void TestInterface::runAction(const QString &object, const QString &actionName, const QVariantMap &properties, const QDBusMessage &msg) |
| 24 |
{ |
| 25 |
m_msg = msg; |
| 26 |
m_msg.setDelayedReply(true); |
| 27 |
|
| 28 |
m_fakeBluez->runAction(object, actionName, properties); |
| 29 |
} |
| 30 |
|
| 31 |
void TestInterface::emitActionFinished() |
| 32 |
{ |
| 33 |
QDBusConnection::sessionBus().send(m_msg.createReply()); |
| 34 |
} |
| 35 |
|
| 36 |
#include "moc_testinterface.cpp" |