File indexing completed on 2024-05-05 03:52:29

0001 /*
0002  * BluezQt - Asynchronous Bluez wrapper library
0003  *
0004  * SPDX-FileCopyrightText: 2022 Pontus Sjögren
0005  *
0006  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0007  */
0008 
0009 #include "gattdescriptor_p.h"
0010 #include "gattcharacteristic.h"
0011 
0012 namespace BluezQt
0013 {
0014 
0015 GattDescriptorPrivate::GattDescriptorPrivate(const QString &uuid,
0016                                              const QStringList &flags,
0017                                              const QByteArray &initialValue,
0018                                              const GattCharacteristic *characteristic)
0019     : m_uuid(uuid)
0020     , m_characteristic(characteristic)
0021     , m_value(initialValue)
0022     , m_flags(flags)
0023 {
0024     static std::uint8_t descNumber = 0;
0025     m_objectPath.setPath(m_characteristic->objectPath().path() + QStringLiteral("/desc") + QString::number(descNumber++));
0026 }
0027 
0028 }