Kgapi

permissioncreatejob.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 "createjob.h"
12#include "kgapidrive_export.h"
13
14namespace KGAPI2
15{
16
17namespace Drive
18{
19
20class KGAPIDRIVE_EXPORT PermissionCreateJob : public KGAPI2::CreateJob
21{
22 Q_OBJECT
23
24public:
25 explicit PermissionCreateJob(const QString &fileId, const PermissionPtr &permission, const AccountPtr &account, QObject *parent = nullptr);
26 explicit PermissionCreateJob(const QString &fileId, const PermissionsList &permissions, const AccountPtr &account, QObject *parent = nullptr);
27 ~PermissionCreateJob() override;
28
29 /**
30 * @brief The plain text custom message to include in notification emails.
31 */
32 [[nodiscard]] QString emailMessage() const;
33
34 /**
35 * @brief Sets the plain text custom message to include in notification emails.
36 */
37 void setEmailMessage(const QString &emailMessage);
38
39 /**
40 * @brief Sets whether to send notification emails when sharing to users
41 * or groups. This parameter is ignored and an email is sent if the role
42 * is owner. (Default: true)
43 */
44 [[nodiscard]] bool sendNotificationEmails() const;
45
46 /**
47 * @brief Whether to send notification emails when sharing to users or
48 * groups. This parameter is ignored and an email is sent if the role
49 * is owner. (Default: true)
50 */
51 void setSendNotificationEmails(bool sendNotificationEmails);
52
53 /**
54 * @brief Whether the request supports both My Drives and shared drives.
55 *
56 * Set to true by default as LibKGAPI supports Team Drives.
57 *
58 * @deprecated This parameter will only be effective until June 1, 2020. Afterwards all applications
59 * are assumed to support shared drives.
60 */
61 KGAPIDRIVE_DEPRECATED bool supportsAllDrives() const;
62
63 /**
64 * @brief Sets whether the request supports both My Drives and shared drives.
65 *
66 * Set to true by default as LibKGAPI supports Team Drives.
67 *
68 * @deprecated This parameter will only be effective until June 1, 2020. Afterwards all applications
69 * are assumed to support shared drives.
70 */
71 KGAPIDRIVE_DEPRECATED void setSupportsAllDrives(bool supportsAllDrives);
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 create new objects on the server.
Definition createjob.h:26
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 Tue Mar 26 2024 11:19:52 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.