| 1 | /* |
|---|---|
| 2 | * BluezQt - Asynchronous Bluez wrapper library |
| 3 | * |
| 4 | * SPDX-FileCopyrightText: 2018 Manuel Weichselbaumer <mincequi@web.de> |
| 5 | * |
| 6 | * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 7 | */ |
| 8 | |
| 9 | #include "mediaendpointadaptor.h" |
| 10 | #include "mediaendpoint.h" |
| 11 | #include "request.h" |
| 12 | |
| 13 | #include <QDBusMessage> |
| 14 | #include <QDBusObjectPath> |
| 15 | |
| 16 | namespace BluezQt |
| 17 | { |
| 18 | MediaEndpointAdaptor::MediaEndpointAdaptor(MediaEndpoint *parent) |
| 19 | : QDBusAbstractAdaptor(parent) |
| 20 | , m_endpoint(parent) |
| 21 | { |
| 22 | } |
| 23 | |
| 24 | void MediaEndpointAdaptor::SetConfiguration(const QDBusObjectPath &transport, const QVariantMap &properties) |
| 25 | { |
| 26 | m_endpoint->setConfiguration(transportObjectPath: transport.path(), properties); |
| 27 | } |
| 28 | |
| 29 | QByteArray MediaEndpointAdaptor::SelectConfiguration(const QByteArray &capabilities, const QDBusMessage &msg) |
| 30 | { |
| 31 | msg.setDelayedReply(true); |
| 32 | Request<QByteArray> req(OrgBluezMediaEndpoint, msg); |
| 33 | |
| 34 | m_endpoint->selectConfiguration(capabilities, request: req); |
| 35 | return QByteArray(); |
| 36 | } |
| 37 | |
| 38 | void MediaEndpointAdaptor::ClearConfiguration(const QDBusObjectPath &transport) |
| 39 | { |
| 40 | m_endpoint->clearConfiguration(transportObjectPath: transport.path()); |
| 41 | } |
| 42 | |
| 43 | void MediaEndpointAdaptor::Release() |
| 44 | { |
| 45 | m_endpoint->release(); |
| 46 | } |
| 47 | |
| 48 | } // namespace BluezQt |
| 49 | |
| 50 | #include "moc_mediaendpointadaptor.cpp" |
| 51 |
