File indexing completed on 2024-05-12 05:22:18
0001 /* 0002 * This file is part of LibKGAPI library 0003 * 0004 * SPDX-FileCopyrightText: 2019 David Barchiesi <david@barchie.si> 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 "kgapidrive_export.h" 0012 #include "modifyjob.h" 0013 0014 namespace KGAPI2 0015 { 0016 0017 namespace Drive 0018 { 0019 0020 class KGAPIDRIVE_EXPORT DrivesModifyJob : public KGAPI2::ModifyJob 0021 { 0022 Q_OBJECT 0023 0024 /** 0025 * Issue the request as a domain administrator; if set to true, then all 0026 * shared Drives of the domain in which the requester is an administrator 0027 * are returned. 0028 * 0029 * Default value if missing is false. 0030 * 0031 * This property does not have any effect when fetching a specific event and 0032 * can be modified only when the job is not running. 0033 */ 0034 Q_PROPERTY(bool useDomainAdminAccess READ useDomainAdminAccess WRITE setUseDomainAdminAccess) 0035 0036 public: 0037 explicit DrivesModifyJob(const DrivesPtr &drives, const AccountPtr &account, QObject *parent = nullptr); 0038 explicit DrivesModifyJob(const DrivesList &drives, const AccountPtr &account, QObject *parent = nullptr); 0039 ~DrivesModifyJob() override; 0040 0041 void setUseDomainAdminAccess(bool useDomainAdminAccess); 0042 [[nodiscard]] bool useDomainAdminAccess() const; 0043 0044 protected: 0045 void start() override; 0046 KGAPI2::ObjectsList handleReplyWithItems(const QNetworkReply *reply, const QByteArray &rawData) override; 0047 0048 private: 0049 class Private; 0050 QScopedPointer<Private> d; 0051 friend class Private; 0052 }; 0053 0054 } // namespace Drive 0055 0056 } // namespace KGAPI2