File indexing completed on 2024-04-21 03:52:04

0001 /*
0002  * BluezQt - Asynchronous BlueZ wrapper library
0003  *
0004  * SPDX-FileCopyrightText: 2019 Manuel Weichselbaumer <mincequi@web.de>
0005  *
0006  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0007  */
0008 
0009 #include "Property.h"
0010 
0011 Property::Property()
0012 {
0013 }
0014 
0015 bool Property::finalize()
0016 {
0017     for (auto tag : m_stringTags) {
0018         m_tags.isOptional |= tag.contains(QLatin1String("optional"), Qt::CaseInsensitive);
0019         m_tags.isExperimental |= tag.contains(QLatin1String("experimental"), Qt::CaseInsensitive);
0020         m_tags.isReadOnly |= tag.contains(QLatin1String("read-only"), Qt::CaseInsensitive);
0021     }
0022     m_tags.isServerOnly = m_limitation.contains(QLatin1String("server only"), Qt::CaseInsensitive);
0023 
0024     bool success = true;
0025     success &= m_comment.finalize();
0026 
0027     return success;
0028 }
0029 
0030 QString Property::name() const
0031 {
0032     return m_name;
0033 }
0034 
0035 QString Property::type() const
0036 {
0037     return m_type;
0038 }
0039 
0040 Property::Tags Property::tags() const
0041 {
0042     return m_tags;
0043 }
0044 
0045 QStringList Property::comment() const
0046 {
0047     return m_comment;
0048 }