Kgapi

permissionmodifyjob.h
1/*
2 * This file is part of LibKGAPI library
3 *
4 * SPDX-FileCopyrightText: 2013 Daniel Vrátil <dvratil@redhat.com>
5 *
6 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7 */
8
9#pragma once
10
11#include "kgapidrive_export.h"
12#include "modifyjob.h"
13
14namespace KGAPI2
15{
16
17namespace Drive
18{
19
20class KGAPIDRIVE_EXPORT PermissionModifyJob : public KGAPI2::ModifyJob
21{
22 Q_OBJECT
23
24public:
25 explicit PermissionModifyJob(const QString &fileId, const PermissionPtr &permission, const AccountPtr &account, QObject *parent = nullptr);
26 explicit PermissionModifyJob(const QString &fileId, const PermissionsList &permissions, const AccountPtr &account, QObject *parent = nullptr);
27 ~PermissionModifyJob() override;
28
29 /**
30 * @brief Whether to remove the expiration date. (Default: false)
31 */
32 bool removeExpiration() const;
33
34 /**
35 * @brief Sets whether to remove the expiration date. (Default: false)
36 */
37 void setRemoveExpiration(bool removeExpiration);
38
39 /**
40 * @brief Whether the request supports both My Drives and shared drives.
41 *
42 * Set to true by default as LibKGAPI supports Team Drives.
43 *
44 * @deprecated This parameter will only be effective until June 1, 2020. Afterwards all applications
45 * are assumed to support shared drives.
46 */
47 KGAPIDRIVE_DEPRECATED bool supportsAllDrives() const;
48
49 /**
50 * @brief Sets whether the request supports both My Drives and shared drives.
51 *
52 * Set to true by default as LibKGAPI supports Team Drives.
53 *
54 * @deprecated This parameter will only be effective until June 1, 2020. Afterwards all applications
55 * are assumed to support shared drives.
56 */
57 KGAPIDRIVE_DEPRECATED void setSupportsAllDrives(bool supportsAllDrives);
58
59 /**
60 * @brief Whether changing a role to 'owner' downgrades the current owners
61 * to writers. Does nothing if the specified role is not 'owner'.
62 * (Default: false)
63 */
64 bool transferOwnership() const;
65
66 /**
67 * @brief Sets whether changing a role to 'owner' downgrades the current owners
68 * to writers. Does nothing if the specified role is not 'owner'.
69 * (Default: false)
70 */
71 void setTransferOwnership(bool transferOwnership);
72
73 /**
74 * @brief Issue the request as a domain administrator; if set to true,
75 * then the requester will be granted access if the file ID parameter refers
76 * to a shared drive and the requester is an administrator of the domain to
77 * which the shared drive belongs. (Default: false)
78 */
79 [[nodiscard]] bool useDomainAdminAccess() const;
80
81 /**
82 * @brief Sets to issue the request as a domain administrator; if set to true,
83 * then the requester will be granted access if the file ID parameter refers
84 * to a shared drive and the requester is an administrator of the domain to
85 * which the shared drive belongs. (Default: false)
86 */
87 void setUseDomainAdminAccess(bool useDomainAdminAccess);
88
89protected:
90 void start() override;
91 KGAPI2::ObjectsList handleReplyWithItems(const QNetworkReply *reply, const QByteArray &rawData) override;
92
93private:
94 class Private;
96 friend class Private;
97};
98
99} // namespace Drive
100
101} // namespace KGAPI2
Abstract superclass for all jobs that somehow modify resources on Google.
Definition modifyjob.h:25
Q_SCRIPTABLE Q_NOREPLY void start()
A job to fetch a single map tile described by a StaticMapUrl.
Definition blog.h:16
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:36:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.