Kgapi

fileresumablemodifyjob.h
1/*
2 * This file is part of LibKGAPI library
3 *
4 * SPDX-FileCopyrightText: 2020 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 "fileabstractresumablejob.h"
12#include "kgapidrive_export.h"
13
14namespace KGAPI2
15{
16
17namespace Drive
18{
19
20class KGAPIDRIVE_EXPORT FileResumableModifyJob : public KGAPI2::Drive::FileAbstractResumableJob
21{
22 Q_OBJECT
23
24 /**
25 * Whether a blob upload should create a new revision. If set to false,
26 * the blob data in the current head revision is replaced. If true, a new
27 * blob is created as head revision, and previous revisions are preserved
28 * (causing increased use of the user's data storage quota).
29 *
30 * Default value is true.
31 *
32 * This property can be modified only when the job is not running.
33 */
34 Q_PROPERTY(bool createNewRevision READ createNewRevision WRITE setCreateNewRevision)
35
36 /**
37 * Whether to set the modified date with the supplied modified date.
38 *
39 * Default value is false.
40 *
41 * This property can be modified only when the job is not running.
42 */
43 Q_PROPERTY(bool updateModifiedDate READ updateModifiedDate WRITE setUpdateModifiedDate)
44
45 /**
46 * Whether to update the view date after successfully updating the file.
47 *
48 * Default value is true.
49 *
50 * This property can be modified only when the job is not running.
51 */
52 Q_PROPERTY(bool updateViewedDate READ updateViewedDate WRITE setUpdateViewedDate)
53
54public:
55 explicit FileResumableModifyJob(const FilePtr &metadata, const AccountPtr &account, QObject *parent = nullptr);
56
57 explicit FileResumableModifyJob(const QString &fileId, const AccountPtr &account, QObject *parent = nullptr);
58 explicit FileResumableModifyJob(QIODevice *device, const FilePtr &metadata, const AccountPtr &account, QObject *parent = nullptr);
59 explicit FileResumableModifyJob(QIODevice *device, const QString &fileId, const AccountPtr &account, QObject *parent = nullptr);
60 ~FileResumableModifyJob() override;
61
62 [[nodiscard]] bool createNewRevision() const;
63 void setCreateNewRevision(bool createNewRevision);
64
65 [[nodiscard]] bool updateModifiedDate() const;
66 void setUpdateModifiedDate(bool updateModifiedDate);
67
68 [[nodiscard]] bool updateViewedDate() const;
69 void setUpdateViewedDate(bool updateViewedDate);
70
71protected:
72 QUrl createUrl() override;
73
74private:
75 class Private;
77 friend class Private;
78};
79
80} // namespace Drive
81
82} // namespace KGAPI2
Abstract superclass for KGAPI2::Drive::File create or modify jobs that use chunked uploading of the f...
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 18 2024 12:17:41 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.