File indexing completed on 2024-11-24 04:44:28

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 requests a folder from the OX server.
0019  *
0020  * @author Tobias Koenig <tokoe@kde.org>
0021  */
0022 class FolderRequestJob : public KJob
0023 {
0024     Q_OBJECT
0025 
0026 public:
0027     /**
0028      * Creates a new folder request job.
0029      *
0030      * @param folder The folder to request.
0031      * @param parent The parent object.
0032      *
0033      * @note The folder needs the objectId property set.
0034      */
0035     explicit FolderRequestJob(const Folder &folder, QObject *parent = nullptr);
0036 
0037     /**
0038      * Starts the job.
0039      */
0040     void start() override;
0041 
0042     /**
0043      * Returns the requested folder.
0044      */
0045     [[nodiscard]] Folder folder() const;
0046 
0047 private:
0048     void davJobFinished(KJob *);
0049     Folder mFolder;
0050 };
0051 }