Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include "lecmaccalculator_p.h"
#include "qlowenergycontroller_bluez_p.h"
#include "qbluetoothsocketbase_p.h"
#include "qbluetoothsocket_bluez_p.h"
#include "qleadvertiser_bluez_p.h"
#include "bluez/bluez_data_p.h"
#include "bluez/hcimanager_p.h"
#include "bluez/objectmanager_p.h"
#include "bluez/remotedevicemanager_p.h"
#include "bluez/bluez5_helper_p.h"
#include "bluez/bluetoothmanagement_p.h"
#include <QtCore/QFileInfo>
#include <QtCore/QLoggingCategory>
#include <QtCore/QSettings>
#include <QtCore/QTimer>
#include <QtBluetooth/QBluetoothLocalDevice>
#include <QtBluetooth/QBluetoothSocket>
#include <QtBluetooth/QLowEnergyCharacteristicData>
#include <QtBluetooth/QLowEnergyDescriptorData>
#include <QtBluetooth/QLowEnergyService>
#include <QtBluetooth/QLowEnergyServiceData>
#include <algorithm>
#include <climits>
#include <cstring>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
#include "moc_qlowenergycontroller_bluez_p.cpp"
Go to the source code of this file.
Classes | |
class | ServerSocket |
Macros | |
#define | GATT_PRIMARY_SERVICE quint16(0x2800) |
#define | GATT_SECONDARY_SERVICE quint16(0x2801) |
#define | GATT_INCLUDED_SERVICE quint16(0x2802) |
#define | GATT_CHARACTERISTIC quint16(0x2803) |
#define | ERROR_RESPONSE_HEADER_SIZE 5 |
#define | FIND_INFO_REQUEST_HEADER_SIZE 5 |
#define | GRP_TYPE_REQ_HEADER_SIZE 7 |
#define | READ_BY_TYPE_REQ_HEADER_SIZE 7 |
#define | READ_REQUEST_HEADER_SIZE 3 |
#define | READ_BLOB_REQUEST_HEADER_SIZE 5 |
#define | WRITE_REQUEST_HEADER_SIZE 3 |
#define | PREPARE_WRITE_HEADER_SIZE 5 |
#define | EXECUTE_WRITE_HEADER_SIZE 2 |
#define | MTU_EXCHANGE_HEADER_SIZE 3 |
#define | APPEND_VALUE true |
#define | NEW_VALUE false |
Functions | |
static void | dumpErrorInformation (const QByteArray &response) |
static int | getUuidSize (const QBluetoothUuid &uuid) |
template<typename T > | |
static void | putDataAndIncrement (const T &src, char *&dst) |
template<> | |
void | putDataAndIncrement (const QBluetoothUuid &uuid, char *&dst) |
template<> | |
void | putDataAndIncrement (const QByteArray &value, char *&dst) |
QLowEnergyHandle | parseReadByTypeCharDiscovery (QLowEnergyServicePrivate::CharData *charData, const char *data, quint16 elementLength) |
QLowEnergyHandle | parseReadByTypeIncludeDiscovery (QList< QBluetoothUuid > *foundServices, const char *data, quint16 elementLength) |
static bool | isNotificationEnabled (quint16 clientConfigValue) |
static bool | isIndicationEnabled (quint16 clientConfigValue) |
static QString | nameOfRemoteCentral (const QBluetoothAddress &peerAddress) |
static QByteArray | uuidToByteArray (const QBluetoothUuid &uuid) |
Variables | |
constexpr quint16 | ATT_DEFAULT_LE_MTU = 23 |
constexpr quint16 | ATT_MAX_LE_MTU = 0x200 |
const int | maxPrepareQueueSize = 1024 |
#define APPEND_VALUE true |
Definition at line 56 of file qlowenergycontroller_bluez.cpp.
#define ERROR_RESPONSE_HEADER_SIZE 5 |
Definition at line 45 of file qlowenergycontroller_bluez.cpp.
#define EXECUTE_WRITE_HEADER_SIZE 2 |
Definition at line 53 of file qlowenergycontroller_bluez.cpp.
#define FIND_INFO_REQUEST_HEADER_SIZE 5 |
Definition at line 46 of file qlowenergycontroller_bluez.cpp.
#define GATT_CHARACTERISTIC quint16(0x2803) |
Definition at line 42 of file qlowenergycontroller_bluez.cpp.
Referenced by QLowEnergyControllerPrivateBluez::addToGenericAttributeList().
#define GATT_INCLUDED_SERVICE quint16(0x2802) |
Definition at line 41 of file qlowenergycontroller_bluez.cpp.
Referenced by QLowEnergyControllerPrivateBluez::addToGenericAttributeList(), and QLowEnergyControllerPrivateBluez::discoverServiceDetails().
#define GATT_PRIMARY_SERVICE quint16(0x2800) |
Definition at line 39 of file qlowenergycontroller_bluez.cpp.
Referenced by QLowEnergyControllerPrivateBluez::discoverServices().
#define GATT_SECONDARY_SERVICE quint16(0x2801) |
Definition at line 40 of file qlowenergycontroller_bluez.cpp.
#define GRP_TYPE_REQ_HEADER_SIZE 7 |
Definition at line 47 of file qlowenergycontroller_bluez.cpp.
#define MTU_EXCHANGE_HEADER_SIZE 3 |
Definition at line 54 of file qlowenergycontroller_bluez.cpp.
#define NEW_VALUE false |
Definition at line 57 of file qlowenergycontroller_bluez.cpp.
#define PREPARE_WRITE_HEADER_SIZE 5 |
Definition at line 52 of file qlowenergycontroller_bluez.cpp.
#define READ_BLOB_REQUEST_HEADER_SIZE 5 |
Definition at line 50 of file qlowenergycontroller_bluez.cpp.
#define READ_BY_TYPE_REQ_HEADER_SIZE 7 |
Definition at line 48 of file qlowenergycontroller_bluez.cpp.
#define READ_REQUEST_HEADER_SIZE 3 |
Definition at line 49 of file qlowenergycontroller_bluez.cpp.
Referenced by QLowEnergyControllerPrivateBluez::readCharacteristic(), and QLowEnergyControllerPrivateBluez::readDescriptor().
#define WRITE_REQUEST_HEADER_SIZE 3 |
Definition at line 51 of file qlowenergycontroller_bluez.cpp.
|
static |
Definition at line 67 of file qlowenergycontroller_bluez.cpp.
References QBluezConst::ATT_ERROR_APPLICATION_END, QBluezConst::ATT_ERROR_APPLICATION_START, QBluezConst::ATT_ERROR_ATTRIBUTE_NOT_FOUND, QBluezConst::ATT_ERROR_ATTRIBUTE_NOT_LONG, QBluezConst::ATT_ERROR_INSUF_AUTHENTICATION, QBluezConst::ATT_ERROR_INSUF_AUTHORIZATION, QBluezConst::ATT_ERROR_INSUF_ENCR_KEY_SIZE, QBluezConst::ATT_ERROR_INSUF_ENCRYPTION, QBluezConst::ATT_ERROR_INSUF_RESOURCES, QBluezConst::ATT_ERROR_INVAL_ATTR_VALUE_LEN, QBluezConst::ATT_ERROR_INVALID_HANDLE, QBluezConst::ATT_ERROR_INVALID_OFFSET, QBluezConst::ATT_ERROR_INVALID_PDU, QBluezConst::ATT_ERROR_PREPARE_QUEUE_FULL, QBluezConst::ATT_ERROR_READ_NOT_PERM, QBluezConst::ATT_ERROR_REQUEST_NOT_SUPPORTED, QBluezConst::ATT_ERROR_UNLIKELY, QBluezConst::ATT_ERROR_UNSUPPRTED_GROUP_TYPE, QBluezConst::ATT_ERROR_WRITE_NOT_PERM, QBluezConst::ATT_OP_ERROR_RESPONSE, bt_get_le16(), QByteArray::constData(), qCDebug, qCWarning, QStringLiteral, and QByteArray::size().
|
static |
Definition at line 131 of file qlowenergycontroller_bluez.cpp.
References QBluetoothUuid::minimumSize().
|
static |
Definition at line 2527 of file qlowenergycontroller_bluez.cpp.
|
static |
Definition at line 2526 of file qlowenergycontroller_bluez.cpp.
|
static |
Definition at line 2965 of file qlowenergycontroller_bluez.cpp.
References QSet< T >::constBegin(), QSet< T >::constEnd(), initializeBluez5(), it, manager, QStringLiteral, reply, QDBusConnection::systemBus(), toString(), QVariant::value(), and QMap< Key, T >::value().
QLowEnergyHandle parseReadByTypeCharDiscovery | ( | QLowEnergyServicePrivate::CharData * | charData, |
const char * | data, | ||
quint16 | elementLength ) |
Definition at line 900 of file qlowenergycontroller_bluez.cpp.
References bt_get_le16(), QUuid::fromBytes(), Qt::hex(), QSysInfo::LittleEndian, Q_ASSERT, and qCDebug.
QLowEnergyHandle parseReadByTypeIncludeDiscovery | ( | QList< QBluetoothUuid > * | foundServices, |
const char * | data, | ||
quint16 | elementLength ) |
Definition at line 926 of file qlowenergycontroller_bluez.cpp.
References bt_get_le16(), QUuid::fromBytes(), Qt::hex(), QSysInfo::LittleEndian, Q_ASSERT, and qCDebug.
void putDataAndIncrement | ( | const QBluetoothUuid & | uuid, |
char *& | dst ) |
Definition at line 141 of file qlowenergycontroller_bluez.cpp.
References QSysInfo::LittleEndian, ok, putBtData(), QUuid::toBytes(), and QBluetoothUuid::toUInt16().
void putDataAndIncrement | ( | const QByteArray & | value, |
char *& | dst ) |
Definition at line 154 of file qlowenergycontroller_bluez.cpp.
|
static |
Definition at line 136 of file qlowenergycontroller_bluez.cpp.
References putBtData().
Referenced by QLowEnergyControllerPrivateBluez::addToGenericAttributeList(), and uuidToByteArray().
|
static |
Definition at line 3208 of file qlowenergycontroller_bluez.cpp.
References ba, QByteArray::constData(), QByteArray::data(), ptr(), putDataAndIncrement(), QByteArray::resize(), and Qt::Uninitialized.
Referenced by QLowEnergyControllerPrivateBluez::addToGenericAttributeList().
|
constexpr |
Definition at line 36 of file qlowenergycontroller_bluez.cpp.
|
constexpr |
Definition at line 37 of file qlowenergycontroller_bluez.cpp.
const int maxPrepareQueueSize = 1024 |
Definition at line 65 of file qlowenergycontroller_bluez.cpp.