56QLowEnergyDescriptor::QLowEnergyDescriptor(
const QLowEnergyDescriptor &other):
60 data =
new QLowEnergyDescriptorPrivate();
61 data->charHandle = other.data->charHandle;
62 data->descHandle = other.data->descHandle;
93QLowEnergyDescriptor &QLowEnergyDescriptor::operator=(
const QLowEnergyDescriptor &other)
104 data =
new QLowEnergyDescriptorPrivate();
106 data->charHandle = other.data->charHandle;
107 data->descHandle = other.data->descHandle;
188QBluetoothUuid QLowEnergyDescriptor::uuid()
const
190 if (d_ptr.isNull() || !data
191 || !d_ptr->characteristicList.contains(data->charHandle)
192 || !d_ptr->characteristicList[data->charHandle].
193 descriptorList.contains(data->descHandle)) {
194 return QBluetoothUuid();
197 return d_ptr->characteristicList[data->charHandle].descriptorList[data->descHandle].uuid;
223QByteArray QLowEnergyDescriptor::value()
const
225 if (d_ptr.isNull() || !data
226 || !d_ptr->characteristicList.contains(data->charHandle)
227 || !d_ptr->characteristicList[data->charHandle].
228 descriptorList.contains(data->descHandle)) {
232 return d_ptr->characteristicList[data->charHandle].descriptorList[data->descHandle].value;
257QBluetoothUuid::DescriptorType QLowEnergyDescriptor::type()
const
259 const QBluetoothUuid u = uuid();
261 QBluetoothUuid::DescriptorType shortUuid =
static_cast<QBluetoothUuid::DescriptorType>(u.toUInt16(&ok));
264 return QBluetoothUuid::DescriptorType::UnknownDescriptorType;
267 case QBluetoothUuid::DescriptorType::CharacteristicExtendedProperties:
268 case QBluetoothUuid::DescriptorType::CharacteristicUserDescription:
269 case QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration:
270 case QBluetoothUuid::DescriptorType::ServerCharacteristicConfiguration:
271 case QBluetoothUuid::DescriptorType::CharacteristicPresentationFormat:
272 case QBluetoothUuid::DescriptorType::CharacteristicAggregateFormat:
273 case QBluetoothUuid::DescriptorType::ValidRange:
274 case QBluetoothUuid::DescriptorType::ExternalReportReference:
275 case QBluetoothUuid::DescriptorType::ReportReference:
276 return (QBluetoothUuid::DescriptorType) shortUuid;
281 return QBluetoothUuid::DescriptorType::UnknownDescriptorType;