File indexing completed on 2024-12-01 04:48:03
0001 /* 0002 This file is part of oxaccess. 0003 0004 SPDX-FileCopyrightText: 2009 Tobias Koenig <tokoe@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.0-or-later 0007 */ 0008 0009 #pragma once 0010 0011 #include <KJob> 0012 0013 #include "folder.h" 0014 0015 namespace OXA 0016 { 0017 /** 0018 * @short A job that modifies a folder on the OX server. 0019 * 0020 * @author Tobias Koenig <tokoe@kde.org> 0021 */ 0022 class FolderModifyJob : public KJob 0023 { 0024 Q_OBJECT 0025 0026 public: 0027 /** 0028 * Creates a new folder modify job. 0029 * 0030 * @param folder The folder to modify. 0031 * @param parent The parent object. 0032 * 0033 * @note The folder needs at least the objectId and lastModified property set. 0034 */ 0035 explicit FolderModifyJob(const Folder &folder, QObject *parent = nullptr); 0036 0037 /** 0038 * Starts the job. 0039 */ 0040 void start() override; 0041 0042 /** 0043 * Returns the updated folder that has been modified. 0044 */ 0045 [[nodiscard]] Folder folder() const; 0046 0047 private: 0048 void davJobFinished(KJob *); 0049 Folder mFolder; 0050 }; 0051 }