Pages
API Documentation
On this page

BluezQt::LEAdvertisement Class

Bluetooth LE advertisement. More...

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

List of all members, including inherited members

Public Functions

Protected Functions

Detailed Description

This class represents a Bluetooth LE advertisement.

Member Function Documentation

[explicit] LEAdvertisement::LEAdvertisement(const QStringList &serviceUuids, QObject *parent = nullptr)

Creates a new LEAdvertisement object with the given serviceUuids as a child of parent.

[since 6.1] QHash<quint16, QByteArray> LEAdvertisement::manufacturerData() const

Returns the manufacturer IDs and associated data included in the advertisement.

Keys are the manufacturer ID.

This function was introduced in Qt 6.1.

See also setManufacturerData()

[virtual protected] QDBusObjectPath LEAdvertisement::objectPath() const

Returns the D-Bus object path of the advertisement.

The path where the advertisement will be registered.

Note: You must provide valid object path!

[virtual] void LEAdvertisement::release()

Indicates that the LEAdvertisement was unregistered.

This method gets called when the service daemon removes the Advertisement.

A client can use it to do cleanup tasks.

There is no need to call UnregisterAdvertisement because when this method gets called it has already been unregistered.

QHash<QString, QByteArray> LEAdvertisement::serviceData() const

Returns the service data included in the advertisement.

See also setServiceData()

[virtual] QStringList LEAdvertisement::serviceUuids() const

List of UUIDs to include in the "Service UUID" field of the Advertising Data.

[since 6.1] void LEAdvertisement::setManufacturerData(const QHash<quint16, QByteArray> &data)

Sets the manufacturer IDs and associated data to be included in the advertisement.

Keys are the manufacturer ID.

This function was introduced in Qt 6.1.

See also manufacturerData()

void LEAdvertisement::setServiceData(const QHash<QString, QByteArray> &data)

Sets the service data to include in the advertisement.

Keys are the UUIDs of the associated data.

See also serviceData()

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