Warning, file /network/ruqola/src/core/roles/roles.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 SPDX-FileCopyrightText: 2019-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 #include "libruqolacore_export.h" 0009 #include "role.h" 0010 #include <QJsonObject> 0011 #include <QVector> 0012 0013 class LIBRUQOLACORE_EXPORT Roles 0014 { 0015 public: 0016 Roles(); 0017 0018 [[nodiscard]] QVector<Role> roles() const; 0019 void setRoles(const QVector<Role> &roles); 0020 0021 void parseRole(const QJsonObject &obj); 0022 [[nodiscard]] Role findRoleByUserId(const QString &userId) const; 0023 [[nodiscard]] bool isEmpty() const; 0024 void updateRoles(const QJsonObject &obj); 0025 [[nodiscard]] int count() const; 0026 [[nodiscard]] Role at(int index) const; 0027 0028 private: 0029 QVector<Role> mRoles; 0030 }; 0031 LIBRUQOLACORE_EXPORT QDebug operator<<(QDebug d, const Roles &t);