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 creates a new folder on the OX server.
0019  *
0020  * @author Tobias Koenig <tokoe@kde.org>
0021  */
0022 class FolderCreateJob : public KJob
0023 {
0024     Q_OBJECT
0025 
0026 public:
0027     /**
0028      * Creates a new folder create job.
0029      *
0030      * @param folder The folder to create.
0031      * @param parent The parent object.
0032      */
0033     explicit FolderCreateJob(const Folder &folder, QObject *parent = nullptr);
0034 
0035     /**
0036      * Starts the job.
0037      */
0038     void start() override;
0039 
0040     /**
0041      * Returns the updated folder that has been created.
0042      */
0043     Folder folder() const;
0044 
0045 private Q_SLOTS:
0046     void davJobFinished(KJob *);
0047 
0048 private:
0049     Folder mFolder;
0050 };
0051 }