BluezQt 5.109.0
Public Member Functions | Protected Member Functions | List of all members
BluezQt::LEAdvertisement

Bluetooth LE advertisement. More...

#include <BluezQt/LEAdvertisement>

Public Member Functions

 LEAdvertisement (const QStringList &serviceUuids, QObject *parent=nullptr)
 Creates a new LEAdvertisement object.
 
 ~LEAdvertisement () override
 Destroys a LEAdvertisement object.
 
virtual void release ()
 Indicates that the LEAdvertisement was unregistered.
 
QHash< QString, QByteArray > serviceData () const
 Returns the service data included in the advertisement.
 
virtual QStringList serviceUuids () const
 List of UUIDs to include in the "Service UUID" field of the Advertising Data.
 
void setServiceData (const QHash< QString, QByteArray > &data)
 Sets the service data to include in the advertisement.
 

Protected Member Functions

virtual QDBusObjectPath objectPath () const
 D-Bus object path of the advertisement.
 

Detailed Description

Bluetooth LE advertisement.

This class represents a Bluetooth LE advertisement.

Constructor & Destructor Documentation

◆ LEAdvertisement()

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

Creates a new LEAdvertisement object.

Parameters
parent

◆ ~LEAdvertisement()

BluezQt::LEAdvertisement::~LEAdvertisement ( )
override

Destroys a LEAdvertisement object.

Member Function Documentation

◆ objectPath()

virtual QDBusObjectPath BluezQt::LEAdvertisement::objectPath ( ) const
protectedvirtual

D-Bus object path of the advertisement.

The path where the advertisement will be registered.

Note
You must provide valid object path!
Returns
object path of advertisement

◆ release()

virtual void BluezQt::LEAdvertisement::release ( )
virtual

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.

◆ serviceData()

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

Returns the service data included in the advertisement.

Since
5.75

◆ serviceUuids()

virtual QStringList BluezQt::LEAdvertisement::serviceUuids ( ) const
virtual

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

Returns
UUIDs of the advertisement

◆ setServiceData()

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

Sets the service data to include in the advertisement.

Keys are the UUIDs of the associated data.

Since
5.75