O'Reilly logo

Qt 5 Projects by Marco Piccolino

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Providing information about the service ID

The next thing we will do is to create an instance of QBluetoothServiceInfo (http://doc.qt.io/qt-5.9/qbluetoothserviceinfo.html), which will act as a proxy class to provide information about the service we are going to register on the local adapter. Since we'll be accessing the class in more than one step, we add it as a private member:

#ifndef BROADCASTER_BT_H#define BROADCASTER_BT_H...namespace channels {class BroadcasterBt : public BroadcasterChannel{    Q_OBJECT    ...private:    QBluetoothServer* _server;    QBluetoothAddress _localAdapter;    QBluetoothServiceInfo _serviceInfo;    ...};}#endif // BROADCASTER_BT_H

First we need to define the service's UUID so that it can be used during service discovery by a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required