BluezQt

mediatransport.cpp
1 /*
2  * BluezQt - Asynchronous Bluez wrapper library
3  *
4  * SPDX-FileCopyrightText: 2019 Manuel Weichselbaumer <[email protected]>
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 
12 namespace BluezQt
13 {
14 MediaTransport::MediaTransport(const QString &path, const QVariantMap &properties)
15  : QObject()
16  , d(new MediaTransportPrivate(path, properties))
17 {
18 }
19 
21 {
22  delete d;
23 }
24 
25 AudioConfiguration MediaTransport::audioConfiguration() const
26 {
27  return d->m_configuration;
28 }
29 
30 MediaTransport::State MediaTransport::state() const
31 {
32  return d->m_state;
33 }
34 
35 quint16 MediaTransport::volume() const
36 {
37  return d->m_volume;
38 }
39 
41 {
42  return new TPendingCall<QDBusUnixFileDescriptor, uint16_t, uint16_t>(d->m_dbusInterface.Acquire(), this);
43 }
44 
46 {
47  return new TPendingCall<QDBusUnixFileDescriptor, uint16_t, uint16_t>(d->m_dbusInterface.TryAcquire(), this);
48 }
49 
51 {
52  return new TPendingCall<void>(d->m_dbusInterface.Release(), this);
53 }
54 
55 } // namespace BluezQt
TPendingCall< QDBusUnixFileDescriptor, uint16_t, uint16_t > * acquire()
Acquire transport file descriptor and the MTU for read and write respectively.
TPendingCall< void > * release()
Releases file descriptor.
KGuiItem properties()
State
Indicates the state of the transport.
AudioConfiguration audioConfiguration() const
Returns the (audio) configuration of the transport.
TPendingCall< QDBusUnixFileDescriptor, uint16_t, uint16_t > * tryAcquire()
Acquire transport file descriptor only if the transport is in "pending" state at the time the message...
~MediaTransport() override
Destroys a MediaTransport object.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sun Sep 25 2022 04:19:10 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.