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 "folder.h"
0012 
0013 #include <KJob>
0014 
0015 namespace OXA
0016 {
0017 /**
0018  * @short A job that deletes a folder on the OX server.
0019  *
0020  * @author Tobias Koenig <tokoe@kde.org>
0021  */
0022 class FolderDeleteJob : public KJob
0023 {
0024     Q_OBJECT
0025 
0026 public:
0027     /**
0028      * Creates a new folder delete job.
0029      *
0030      * @param folder The folder to delete.
0031      * @param parent The parent object.
0032      *
0033      * @note The folder needs the objectId, folderId and lastModified property set.
0034      */
0035     explicit FolderDeleteJob(const Folder &folder, QObject *parent = nullptr);
0036 
0037     /**
0038      * Starts the job.
0039      */
0040     void start() override;
0041 
0042 private:
0043     void davJobFinished(KJob *);
0044     const Folder mFolder;
0045 };
0046 }