File indexing completed on 2024-05-12 05:22:19
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 "kgapidrive_export.h" 0012 #include "modifyjob.h" 0013 0014 #include <QStringList> 0015 0016 namespace KGAPI2 0017 { 0018 0019 namespace Drive 0020 { 0021 0022 class KGAPIDRIVE_EXPORT FileAbstractModifyJob : public KGAPI2::ModifyJob 0023 { 0024 Q_OBJECT 0025 0026 public: 0027 explicit FileAbstractModifyJob(const QString &fileId, const AccountPtr &account, QObject *parent = nullptr); 0028 explicit FileAbstractModifyJob(const QStringList &filesIds, const AccountPtr &account, QObject *parent = nullptr); 0029 explicit FileAbstractModifyJob(const FilePtr &file, const AccountPtr &account, QObject *parent = nullptr); 0030 explicit FileAbstractModifyJob(const FilesList &files, const AccountPtr &account, QObject *parent = nullptr); 0031 ~FileAbstractModifyJob() 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 protected: 0054 void start() override; 0055 KGAPI2::ObjectsList handleReplyWithItems(const QNetworkReply *reply, const QByteArray &rawData) override; 0056 0057 virtual QUrl url(const QString &fileId) = 0; 0058 0059 private: 0060 class Private; 0061 Private *const d; 0062 friend class Private; 0063 }; 0064 0065 } // namespace Drive 0066 0067 } // namespace KGAPI2