Kgapi

permissionfetchjob.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 "fetchjob.h"
12#include "kgapidrive_export.h"
13
14namespace KGAPI2
15{
16
17namespace Drive
18{
19
20class KGAPIDRIVE_EXPORT PermissionFetchJob : public KGAPI2::FetchJob
21{
22 Q_OBJECT
23
24public:
25 explicit PermissionFetchJob(const QString &fileId, const AccountPtr &account, QObject *parent = nullptr);
26 explicit PermissionFetchJob(const FilePtr &file, const AccountPtr &account, QObject *parent = nullptr);
27 explicit PermissionFetchJob(const QString &fileId, const QString &permissionId, const AccountPtr &account, QObject *parent = nullptr);
28 explicit PermissionFetchJob(const FilePtr &file, const QString &permissionId, const AccountPtr &account, QObject *parent = nullptr);
29 ~PermissionFetchJob() override;
30
31 /**
32 * @brief Whether the request supports both My Drives and shared drives.
33 *
34 * Set to true by default as LibKGAPI supports Team Drives.
35 *
36 * @deprecated This parameter will only be effective until June 1, 2020. Afterwards all applications
37 * are assumed to support shared drives.
38 */
39 KGAPIDRIVE_DEPRECATED bool supportsAllDrives() const;
40
41 /**
42 * @brief Sets whether the request supports both My Drives and shared drives.
43 *
44 * Set to true by default as LibKGAPI supports Team Drives.
45 *
46 * @deprecated This parameter will only be effective until June 1, 2020. Afterwards all applications
47 * are assumed to support shared drives.
48 */
49 KGAPIDRIVE_DEPRECATED void setSupportsAllDrives(bool supportsAllDrives);
50
51 /**
52 * @brief Issue the request as a domain administrator; if set to true,
53 * then the requester will be granted access if the file ID parameter refers
54 * to a shared drive and the requester is an administrator of the domain to
55 * which the shared drive belongs. (Default: false)
56 */
57 [[nodiscard]] bool useDomainAdminAccess() const;
58
59 /**
60 * @brief Sets to issue the request as a domain administrator; if set to true,
61 * then the requester will be granted access if the file ID parameter refers
62 * to a shared drive and the requester is an administrator of the domain to
63 * which the shared drive belongs. (Default: false)
64 */
65 void setUseDomainAdminAccess(bool useDomainAdminAccess);
66
67protected:
68 void start() override;
69 KGAPI2::ObjectsList handleReplyWithItems(const QNetworkReply *reply, const QByteArray &rawData) override;
70
71private:
72 class Private;
74 friend class Private;
75};
76
77} // namespace Drive
78
79} // namespace KGAPI2
Abstract superclass for all jobs that fetch resources from Google.
Definition fetchjob.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.