Pages
API Documentation
On this page

BluezQt::MediaTransport Class

Media transport. More...

  • Header: #include <BluezQt/MediaTransport>
  • CMake: find_package(KF6 REQUIRED COMPONENTS BluezQt)
    target_link_libraries(mytarget PRIVATE KF6::BluezQt)
  • Inherits: QObject

List of all members, including inherited members

Public Types

Properties

Public Functions

Public Slots

Signals

Detailed Description

This class represents a media transport interface.

Member Type Documentation

enum MediaTransport::State

Indicates the state of the transport.

Constant
BluezQt::MediaTransport::State::Idle 0
BluezQt::MediaTransport::State::Pending 1
BluezQt::MediaTransport::State::Active 2

Property Documentation

[read-only] state : State

Access functions:

  • BluezQt::MediaTransport::State state() const

Notifier signal:

[read-only] volume : quint16

Access functions:

Notifier signal:

Member Function Documentation

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

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

Possible errors:

Returns <fd, uint16, uint16> pending call.

BluezQt::AudioConfiguration MediaTransport::audioConfiguration() const

Returns the (audio) configuration of the transport.

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

Releases file descriptor.

[since 6.6] BluezQt::PendingCall *MediaTransport::setVolume(quint16 volume)

Sets the volume of the transport.

Only works when the transport was acquired by the sender.

The volume of the transport should be within the range [0x00..0x7F] (0-127)

Returns void pending call.

This function was introduced in Qt 6.6.

See also volume()

BluezQt::MediaTransport::State MediaTransport::state() const

Returns the state of the transport.

Note: Getter function for property state.

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

Indicates that the transport's state has changed.

Note: Notifier signal for property state.

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

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:

Returns <fd, uint16, uint16> pending call.

quint16 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.

Note: Getter function for property volume.

See also setVolume()

[signal] void MediaTransport::volumeChanged(quint16 volume)

Indicates that the transport's volume has changed.

Note: Notifier signal for property volume.

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.