1/*
2 * BluezQt - Asynchronous Bluez wrapper library
3 *
4 * SPDX-FileCopyrightText: 2019 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 "mediatransport.h"
10#include "mediatransport_p.h"
11
12namespace BluezQt
13{
14MediaTransport::MediaTransport(const QString &path, const QVariantMap &properties)
15 : QObject()
16 , d(new MediaTransportPrivate(path, properties))
17{
18}
19
20MediaTransport::~MediaTransport() = default;
21
22AudioConfiguration MediaTransport::audioConfiguration() const
23{
24 return d->m_configuration;
25}
26
27MediaTransport::State MediaTransport::state() const
28{
29 return d->m_state;
30}
31
32quint16 MediaTransport::volume() const
33{
34 return d->m_volume;
35}
36
37TPendingCall<QDBusUnixFileDescriptor, uint16_t, uint16_t> *MediaTransport::acquire()
38{
39 return new TPendingCall<QDBusUnixFileDescriptor, uint16_t, uint16_t>(d->m_dbusInterface.Acquire(), this);
40}
41
42TPendingCall<QDBusUnixFileDescriptor, uint16_t, uint16_t> *MediaTransport::tryAcquire()
43{
44 return new TPendingCall<QDBusUnixFileDescriptor, uint16_t, uint16_t>(d->m_dbusInterface.TryAcquire(), this);
45}
46
47TPendingCall<void> *MediaTransport::release()
48{
49 return new TPendingCall<void>(d->m_dbusInterface.Release(), this);
50}
51
52} // namespace BluezQt
53
54#include "moc_mediatransport.cpp"
55

source code of bluez-qt/src/mediatransport.cpp