18#include <QtCore/private/qglobal_p.h>
19#include <QtCore/qendian.h>
20#include <sys/socket.h>
21#include <QtBluetooth/QBluetoothUuid>
22#include <QtCore/qtmetamacros.h>
26#define ATTRIBUTE_CHANNEL_ID 4
27#define SIGNALING_CHANNEL_ID 5
28#define SECURITY_CHANNEL_ID 6
30#define BTPROTO_L2CAP 0
32#define BTPROTO_RFCOMM 3
38#define SOL_BLUETOOTH 274
43#define RFCOMM_LM_AUTH 0x0002
44#define RFCOMM_LM_ENCRYPT 0x0004
45#define RFCOMM_LM_TRUSTED 0x0008
46#define RFCOMM_LM_SECURE 0x0020
49#define L2CAP_LM_AUTH 0x0002
50#define L2CAP_LM_ENCRYPT 0x0004
51#define L2CAP_LM_TRUSTED 0x0008
52#define L2CAP_LM_SECURE 0x0020
59#define BT_SECURITY_SDP 0
60#define BT_SECURITY_LOW 1
61#define BT_SECURITY_MEDIUM 2
62#define BT_SECURITY_HIGH 3
64#define BDADDR_LE_PUBLIC 0x01
65#define BDADDR_LE_RANDOM 0x02
73#if __BYTE_ORDER == __LITTLE_ENDIAN
80#elif __BYTE_ORDER == __BIG_ENDIAN
81#define htobs(d) qbswap((quint16)(d))
82#define htobl(d) qbswap((quint32)(d))
83#define htobll(d) qbswap((quint64)(d))
84#define btohs(d) qbswap((quint16)(d))
85#define btohl(d) qbswap((quint32)(d))
86#define btohll(d) qbswap((quint64)(d))
88#error "Unknown byte order"
91#define HCIGETCONNLIST _IOR('H', 212, int)
92#define HCIGETDEVINFO _IOR('H', 211, int)
93#define HCIGETDEVLIST _IOR('H', 210, int)
109#if !defined(QT_BLUEZ_NO_BTLE)
125 return qFromLittleEndian<T>(
reinterpret_cast<const uchar *
>(
ptr));
130 return getBtData<quint16>(
ptr);
140#define HCI_MAX_DEV 16
141#define HCI_DEV_NONE 0xffff
143#define HCI_CHANNEL_CONTROL 0x3
145#define HCI_MAX_EVENT_SIZE 260
151#define HCI_COMMAND_PKT 0x01
152#define HCI_ACL_PKT 0x02
153#define HCI_EVENT_PKT 0x04
154#define HCI_VENDOR_PKT 0xff
156#define HCI_FLT_TYPE_BITS 31
157#define HCI_FLT_EVENT_BITS 63
235 *((
quint32 *)
addr + (nr >> 5)) |= (1 << (nr & 31));
239 *((
quint32 *)
addr + (nr >> 5)) &= ~(1 << (nr & 31));
243 memset(
f, 0,
sizeof(*
f));
263 memset((
void *) &
f->type_mask, 0xff,
sizeof(
f->type_mask));
267 memset((
void *)
f->event_mask, 0xff,
sizeof(
f->event_mask));
274#define HCI_EVENT_HDR_SIZE 2
281#define EVT_ENCRYPT_CHANGE_SIZE 4
388#define opCodePack(ogf, ocf) (quint16(((ocf) & 0x03ff)|((ogf) << 10)))
389#define ogfFromOpCode(op) ((op) >> 10)
390#define ocfFromOpCode(op) ((op) & 0x03ff)
static void hci_filter_all_ptypes(struct hci_filter *f)
static void hci_filter_all_events(struct hci_filter *f)
#define HCI_FLT_EVENT_BITS
#define HCI_FLT_TYPE_BITS
T getBtData(const void *ptr)
static void hci_filter_set_ptype(int t, struct hci_filter *f)
QUuid::Id128Bytes BluezUint128
static quint16 bt_get_le16(const void *ptr)
static void hci_clear_bit(int nr, void *addr)
static void hci_filter_clear(struct hci_filter *f)
static void hci_filter_clear_ptype(int t, struct hci_filter *f)
static void hci_set_bit(int nr, void *addr)
void putBtData(T src, void *dst)
static void hci_filter_clear_event(int e, struct hci_filter *f)
static void hci_filter_set_event(int e, struct hci_filter *f)
@ OcfLeSetScanResponseData
@ ATT_ERROR_INVAL_ATTR_VALUE_LEN
@ ATT_ERROR_INVALID_OFFSET
@ ATT_ERROR_INSUF_AUTHORIZATION
@ ATT_ERROR_READ_NOT_PERM
@ ATT_ERROR_REQUEST_NOT_SUPPORTED
@ ATT_ERROR_INSUF_ENCRYPTION
@ ATT_ERROR_INVALID_HANDLE
@ ATT_ERROR_INSUF_ENCR_KEY_SIZE
@ ATT_ERROR_WRITE_NOT_PERM
@ ATT_ERROR_ATTRIBUTE_NOT_LONG
@ ATT_ERROR_APPLICATION_END
@ ATT_ERROR_REQUEST_STALLED
@ ATT_ERROR_INSUF_AUTHENTICATION
@ ATT_ERROR_ATTRIBUTE_NOT_FOUND
@ ATT_ERROR_PREPARE_QUEUE_FULL
@ ATT_ERROR_APPLICATION_START
@ ATT_ERROR_INSUF_RESOURCES
@ ATT_ERROR_UNSUPPRTED_GROUP_TYPE
@ ATT_OP_FIND_BY_TYPE_VALUE_RESPONSE
@ ATT_OP_PREPARE_WRITE_RESPONSE
@ ATT_OP_EXECUTE_WRITE_REQUEST
@ ATT_OP_FIND_BY_TYPE_VALUE_REQUEST
@ ATT_OP_READ_BLOB_REQUEST
@ ATT_OP_EXECUTE_WRITE_RESPONSE
@ ATT_OP_FIND_INFORMATION_RESPONSE
@ ATT_OP_SIGNED_WRITE_COMMAND
@ ATT_OP_EXCHANGE_MTU_REQUEST
@ ATT_OP_HANDLE_VAL_NOTIFICATION
@ ATT_OP_READ_BY_TYPE_REQUEST
@ ATT_OP_EXCHANGE_MTU_RESPONSE
@ ATT_OP_READ_BY_GROUP_REQUEST
@ ATT_OP_HANDLE_VAL_CONFIRMATION
@ ATT_OP_HANDLE_VAL_INDICATION
@ ATT_OP_READ_BY_TYPE_RESPONSE
@ ATT_OP_FIND_INFORMATION_REQUEST
@ ATT_OP_PREPARE_WRITE_REQUEST
@ ATT_OP_READ_BLOB_RESPONSE
@ ATT_OP_READ_MULTIPLE_REQUEST
@ ATT_OP_READ_MULTIPLE_RESPONSE
@ ATT_OP_READ_BY_GROUP_RESPONSE
Combined button and popup list for selecting options.
constexpr T qToLittleEndian(T source)
static ControlElement< T > * ptr(QWidget *widget)
GLboolean GLboolean GLboolean b
GLuint GLenum GLsizei GLsizei GLint GLint GLboolean packed
struct hci_conn_info conn_info[0]
struct hci_dev_stats stat
struct hci_dev_req dev_req[0]
unsigned short hci_channel