BluezQt 5.109.0
Public Types | Properties | Signals | Public Slots | Public Member Functions | List of all members
BluezQt::MediaTransport

Media transport. More...

#include <BluezQt/MediaTransport>

Public Types

enum class  State { Idle , Pending , Active }
 Indicates the state of the transport. More...
 

Properties

State state
 
quint16 volume
 

Signals

void stateChanged (State state)
 Indicates that transport's state have changed.
 
void volumeChanged (quint16 volume)
 Indicates that transport's volume have changed.
 

Public Slots

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.
 
TPendingCall< QDBusUnixFileDescriptor, uint16_t, uint16_t > * tryAcquire ()
 Acquire transport file descriptor only if the transport is in "pending" state at the time the message is received by BlueZ.
 

Public Member Functions

 ~MediaTransport () override
 Destroys a MediaTransport object.
 
AudioConfiguration audioConfiguration () const
 Returns the (audio) configuration of the transport.
 
State state () const
 Returns the state of the transport.
 
quint16 volume () const
 Returns the volume of the transport.
 

Detailed Description

Media transport.

This class represents a media transport interface.

Member Enumeration Documentation

◆ State

enum class BluezQt::MediaTransport::State
strong

Indicates the state of the transport.

Constructor & Destructor Documentation

◆ ~MediaTransport()

BluezQt::MediaTransport::~MediaTransport ( )
override

Destroys a MediaTransport object.

Member Function Documentation

◆ acquire

TPendingCall< QDBusUnixFileDescriptor, uint16_t, uint16_t > * BluezQt::MediaTransport::acquire ( )
slot

Acquire transport file descriptor and the MTU for read and write respectively.

Possible errors: PendingCall::NotAuthorized, PendingCall::Failed

Returns
<fd, uint16, uint16> pending call

◆ audioConfiguration()

AudioConfiguration BluezQt::MediaTransport::audioConfiguration ( ) const

Returns the (audio) configuration of the transport.

Returns
configuration of transport

◆ release

TPendingCall< void > * BluezQt::MediaTransport::release ( )
slot

Releases file descriptor.

Returns
void pending call

◆ state()

State BluezQt::MediaTransport::state ( ) const

Returns the state of the transport.

Returns
state of transport

◆ stateChanged

void BluezQt::MediaTransport::stateChanged ( State  state)
signal

Indicates that transport's state have changed.

◆ tryAcquire

TPendingCall< QDBusUnixFileDescriptor, uint16_t, uint16_t > * BluezQt::MediaTransport::tryAcquire ( )
slot

Acquire transport file descriptor only if the transport is in "pending" state at the time the message is received by BlueZ.

Otherwise no request will be sent to the remote device and the function will just fail with org.bluez.Error.NotAvailable.

Possible errors: PendingCall::NotAuthorized, PendingCall::Failed, PendingCall::NotAvailable

Returns
<fd, uint16, uint16> pending call

◆ volume()

quint16 BluezQt::MediaTransport::volume ( ) const

Returns the volume of the transport.

The volume is a percentage of the maximum. The value 0x00 corresponds to 0%. The value 0x7F corresponds to 100%. Scaling should be applied to achieve values between these two. The existence of this scale does not impose any restriction on the granularity of the volume control scale on the target. As this command specifies a percentage rather than an absolute dB level the controller should exercise caution when sending this command.

Returns
volume of transport

◆ volumeChanged

void BluezQt::MediaTransport::volumeChanged ( quint16  volume)
signal

Indicates that transport's volume have changed.