Kgapi

teamdrivefetchjob.h
1/*
2 * This file is part of LibKGAPI library
3 *
4 * SPDX-FileCopyrightText: 2019 David Barchiesi <david@barchie.si>
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
14#include "teamdrivesearchquery.h"
15
16namespace KGAPI2
17{
18
19namespace Drive
20{
21
22class KGAPIDRIVE_DEPRECATED_EXPORT TeamdriveFetchJob : public KGAPI2::FetchJob
23{
24 Q_OBJECT
25
26 /**
27 * Maximum number of teamdrives to return.
28 *
29 * Default value if missing is 10.
30 *
31 * This property does not have any effect when fetching a specific event and
32 * can be modified only when the job is not running.
33 */
34 Q_PROPERTY(int maxResults READ maxResults WRITE setMaxResults)
35
36 /**
37 * Issue the request as a domain administrator; if set to true, then all
38 * Team Drives of the domain in which the requester is an administrator
39 * are returned.
40 *
41 * Default value if missing is false.
42 *
43 * This property does not have any effect when fetching a specific event and
44 * can be modified only when the job is not running.
45 */
46 Q_PROPERTY(bool useDomainAdminAccess READ useDomainAdminAccess WRITE setUseDomainAdminAccess)
47
48public:
49 TeamdriveFetchJob(const TeamdriveSearchQuery &query, const AccountPtr &account, QObject *parent = nullptr);
50 explicit TeamdriveFetchJob(const AccountPtr &account, QObject *parent = nullptr);
51 TeamdriveFetchJob(const QString &teamdriveId, const AccountPtr &account, QObject *parent = nullptr);
52 ~TeamdriveFetchJob() override;
53
54 [[nodiscard]] int maxResults() const;
55 void setMaxResults(int maxResults);
56
57 void setUseDomainAdminAccess(bool useDomainAdminAccess);
58 [[nodiscard]] bool useDomainAdminAccess() const;
59
60 void setFields(const QStringList &fields);
61 [[nodiscard]] QStringList fields() const;
62
63protected:
64 void start() override;
65 KGAPI2::ObjectsList handleReplyWithItems(const QNetworkReply *reply, const QByteArray &rawData) override;
66
67private:
68 class Private;
70 friend class Private;
71
72 void applyRequestParameters(QUrl &url);
73};
74
75} // namespace Drive
76
77} // 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 Fri Nov 29 2024 11:54:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.