BluezQt::MediaEndpoint Class

class BluezQt::MediaEndpoint

Bluetooth MediaEndpoint. More...

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

Public Types

struct Configuration
enum class Codec { Sbc, Aac }
enum class Role { AudioSource, AudioSink }

Public Functions

MediaEndpoint(const BluezQt::MediaEndpoint::Configuration &configuration, QObject *parent = nullptr)
virtual void clearConfiguration(const QString &transportObjectPath)
virtual QDBusObjectPath objectPath() const
virtual const QVariantMap &properties() const
virtual void release()
virtual void selectConfiguration(const QByteArray &capabilities, const BluezQt::Request<QByteArray> &request)
virtual void setConfiguration(const QString &transportObjectPath, const QVariantMap &properties)

Signals

void configurationCleared(const QString &transportObjectPath)
void configurationSelected(const QByteArray &capabilities, const QByteArray &configuration)
void configurationSet(const QString &transportObjectPath, const QVariantMap &properties)

Detailed Description

This class represents a Bluetooth MediaEndpoint.

Member Type Documentation

enum class MediaEndpoint::Codec

Codec which this MediaEndpoint supports.

ConstantValue
BluezQt::MediaEndpoint::Codec::Sbc0
BluezQt::MediaEndpoint::Codec::Aac1

enum class MediaEndpoint::Role

Role which this MediaEndpoint acts as.

ConstantValue
BluezQt::MediaEndpoint::Role::AudioSource0
BluezQt::MediaEndpoint::Role::AudioSink1

Member Function Documentation

[explicit] MediaEndpoint::MediaEndpoint(const BluezQt::MediaEndpoint::Configuration &configuration, QObject *parent = nullptr)

Creates a new MediaEndpoint object with the given configuration as a child of parent.

[virtual] void MediaEndpoint::clearConfiguration(const QString &transportObjectPath)

Clear the transport configuration at transportObjectPath.

[signal] void MediaEndpoint::configurationCleared(const QString &transportObjectPath)

Indicates that the configuration was cleared for transport.

[signal] void MediaEndpoint::configurationSelected(const QByteArray &capabilities, const QByteArray &configuration)

Indicates that the configuration was selected.

[signal] void MediaEndpoint::configurationSet(const QString &transportObjectPath, const QVariantMap &properties)

Indicates that the configuration was set for transport.

[virtual] QDBusObjectPath MediaEndpoint::objectPath() const

Returns the D-Bus object path of the MediaEndpoint.

The path where the MediaEndpoint will be registered.

Note: You must provide valid object path!

[virtual] const QVariantMap &MediaEndpoint::properties() const

Returns the properties of the endpoint.

[virtual] void MediaEndpoint::release()

Indicates that the MediaEndpoint was unregistered.

This method gets called when the Bluetooth daemon unregisters the MediaEndpoint.

A MediaEndpoint can use it to do cleanup tasks. There is no need to unregister the MediaEndpoint, because when this method gets called it has already been unregistered.

[virtual] void MediaEndpoint::selectConfiguration(const QByteArray &capabilities, const BluezQt::Request<QByteArray> &request)

Select preferable configuration from the supported capabilities with a request to be used for sending the reply.

Note: There is no need to cache the selected configuration since on success the configuration is send back as parameter of SetConfiguration.

[virtual] void MediaEndpoint::setConfiguration(const QString &transportObjectPath, const QVariantMap &properties)

Set configuration for the transport at the transportObjectPath with the given properties.