File indexing completed on 2024-05-12 05:22:21
0001 /* 0002 * This file is part of LibKGAPI library 0003 * 0004 * SPDX-FileCopyrightText: 2013 Daniel Vrátil <dvratil@redhat.com> 0005 * 0006 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #pragma once 0010 0011 #include "deletejob.h" 0012 #include "kgapidrive_export.h" 0013 0014 #include <QStringList> 0015 0016 namespace KGAPI2 0017 { 0018 0019 namespace Drive 0020 { 0021 0022 class KGAPIDRIVE_EXPORT PermissionDeleteJob : public KGAPI2::DeleteJob 0023 { 0024 Q_OBJECT 0025 0026 public: 0027 explicit PermissionDeleteJob(const QString &fileId, const PermissionPtr &permission, const AccountPtr &account, QObject *parent = nullptr); 0028 explicit PermissionDeleteJob(const QString &fileId, const QString &permissionId, const AccountPtr &account, QObject *parent = nullptr); 0029 explicit PermissionDeleteJob(const QString &fileId, const PermissionsList &permissions, const AccountPtr &account, QObject *parent = nullptr); 0030 explicit PermissionDeleteJob(const QString &fileId, const QStringList &permissionsIds, const AccountPtr &account, QObject *parent = nullptr); 0031 ~PermissionDeleteJob() override; 0032 0033 /** 0034 * @brief Whether the request supports both My Drives and shared drives. 0035 * 0036 * Set to true by default as LibKGAPI supports Team Drives. 0037 * 0038 * @deprecated This parameter will only be effective until June 1, 2020. Afterwards all applications 0039 * are assumed to support shared drives. 0040 */ 0041 KGAPIDRIVE_DEPRECATED bool supportsAllDrives() const; 0042 0043 /** 0044 * @brief Sets whether the request supports both My Drives and shared drives. 0045 * 0046 * Set to true by default as LibKGAPI supports Team Drives. 0047 * 0048 * @deprecated This parameter will only be effective until June 1, 2020. Afterwards all applications 0049 * are assumed to support shared drives. 0050 */ 0051 KGAPIDRIVE_DEPRECATED void setSupportsAllDrives(bool supportsAllDrives); 0052 0053 /** 0054 * @brief Issue the request as a domain administrator; if set to true, 0055 * then the requester will be granted access if the file ID parameter refers 0056 * to a shared drive and the requester is an administrator of the domain to 0057 * which the shared drive belongs. (Default: false) 0058 */ 0059 bool useDomainAdminAccess() const; 0060 0061 /** 0062 * @brief Sets to issue the request as a domain administrator; if set to true, 0063 * then the requester will be granted access if the file ID parameter refers 0064 * to a shared drive and the requester is an administrator of the domain to 0065 * which the shared drive belongs. (Default: false) 0066 */ 0067 void setUseDomainAdminAccess(bool useDomainAdminAccess); 0068 0069 protected: 0070 void start() override; 0071 0072 private: 0073 class Private; 0074 QScopedPointer<Private> d; 0075 friend class Private; 0076 }; 0077 0078 } // namespace Drive 0079 0080 } // namespace KGAPI2