File indexing completed on 2024-04-28 03:53:55

0001 /*
0002     SPDX-FileCopyrightText: 2010 Tobias Koenig <tokoe@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef KDAV_DAVITEMDELETEJOB_H
0008 #define KDAV_DAVITEMDELETEJOB_H
0009 
0010 #include "kdav_export.h"
0011 
0012 #include "davitem.h"
0013 #include "davjobbase.h"
0014 #include "davurl.h"
0015 
0016 namespace KDAV
0017 {
0018 class DavItemDeleteJobPrivate;
0019 
0020 /**
0021  * @class DavItemDeleteJob davitemdeletejob.h <KDAV/DavItemDeleteJob>
0022  *
0023  * @short A job to delete a DAV item on the DAV server.
0024  */
0025 class KDAV_EXPORT DavItemDeleteJob : public DavJobBase
0026 {
0027     Q_OBJECT
0028 
0029 public:
0030     /**
0031      * Creates a new DAV item delete job.
0032      *
0033      * @param item The item that shall be deleted.
0034      * @param parent The parent object.
0035      */
0036     explicit DavItemDeleteJob(const DavItem &item, QObject *parent = nullptr);
0037 
0038     /**
0039      * Starts the job.
0040      */
0041     void start() override;
0042 
0043     /**
0044      * Returns the item that triggered the conflict, if any.
0045      */
0046     Q_REQUIRED_RESULT DavItem freshItem() const;
0047 
0048     /**
0049      * Returns the response code we got when fetching the fresh item.
0050      */
0051     Q_REQUIRED_RESULT int freshResponseCode() const;
0052 
0053 private:
0054     Q_DECLARE_PRIVATE(DavItemDeleteJob)
0055 };
0056 }
0057 
0058 #endif