File indexing completed on 2024-05-12 05:22:21

0001 /*
0002     SPDX-FileCopyrightText: 2012 Andrius da Costa Ribas <andriusmao@gmail.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #pragma once
0008 
0009 #include "permission.h"
0010 
0011 namespace KGAPI2
0012 {
0013 
0014 namespace Drive
0015 {
0016 
0017 class Q_DECL_HIDDEN Permission::Private
0018 {
0019 public:
0020     Private();
0021     Private(const Private &other);
0022 
0023     QString id;
0024     QUrl selfLink;
0025     QString name;
0026     Role role;
0027     QList<Role> additionalRoles;
0028     Type type;
0029     QString authKey;
0030     bool withLink;
0031     QUrl photoLink;
0032     QString value;
0033     QString emailAddress;
0034     QString domain;
0035     QDateTime expirationDate;
0036     bool deleted;
0037     PermissionDetailsList permissionDetails;
0038 
0039     static Role roleFromName(const QString &roleName);
0040     static Type typeFromName(const QString &typeName);
0041     static QString roleToName(Permission::Role role);
0042     static QString typeToName(Permission::Type type);
0043     static PermissionPtr fromJSON(const QVariantMap &map);
0044 
0045     friend class File::Private;
0046 };
0047 
0048 } // namespace Drive
0049 
0050 } // namespace KGAPI2