| 1 | /* |
| 2 | SPDX-FileCopyrightText: 2023 Stefan BrĂ¼ns <stefan.bruens@rwth-aachen.de> |
| 3 | |
| 4 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 5 | */ |
| 6 | |
| 7 | #include "upower.h" |
| 8 | #include "upowerdbusinterface.h" |
| 9 | |
| 10 | #include <QString> |
| 11 | |
| 12 | using DBusInterface = Solid::Backends::UPower::DBusInterface; |
| 13 | |
| 14 | namespace { |
| 15 | |
| 16 | const auto upowerServiceName = QStringLiteral(UP_DBUS_SERVICE); |
| 17 | const auto upowerDBusPath = QStringLiteral(UP_DBUS_PATH); |
| 18 | const char* upowerInterfaceName = UP_DBUS_INTERFACE; |
| 19 | |
| 20 | } // anonymous |
| 21 | |
| 22 | |
| 23 | DBusInterface::DBusInterface(const QDBusConnection &connection, QObject *parent) |
| 24 | : QDBusAbstractInterface(upowerServiceName, upowerDBusPath, upowerInterfaceName, connection, parent) |
| 25 | { |
| 26 | } |
| 27 | |
| 28 | DBusInterface::~DBusInterface() = default; |
| 29 | |
| 30 | QDBusPendingReply<QList<QDBusObjectPath>> DBusInterface::EnumerateDevices() |
| 31 | { |
| 32 | return asyncCall(QStringLiteral("EnumerateDevices" )); |
| 33 | } |
| 34 | |
| 35 | #include "moc_upowerdbusinterface.cpp" |
| 36 | |