Warning, file /frameworks/kdav/src/common/davcollectionsmultifetchjob.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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_DAVCOLLECTIONSMULTIFETCHJOB_H
0008 #define KDAV_DAVCOLLECTIONSMULTIFETCHJOB_H
0009 
0010 #include "kdav_export.h"
0011 
0012 #include "davcollection.h"
0013 #include "davurl.h"
0014 
0015 #include <KCompositeJob>
0016 
0017 #include <memory>
0018 
0019 namespace KDAV
0020 {
0021 class DavCollectionsMultiFetchJobPrivate;
0022 
0023 /**
0024  * @class DavCollectionsMultiFetchJob davcollectionsmultifetchjob.h <KDAV/DavCollectionsMultiFetchJob>
0025  *
0026  * @short A job that fetches all DAV collection.
0027  *
0028  * This job is used to fetch all DAV collection that are available
0029  * under a certain list of DAV URLs.
0030  *
0031  * @note This class just combines multiple calls of DavCollectionsFetchJob
0032  *       into one job.
0033  */
0034 class KDAV_EXPORT DavCollectionsMultiFetchJob : public KCompositeJob
0035 {
0036     Q_OBJECT
0037 
0038 public:
0039     /**
0040      * Creates a new DAV collections multi fetch job.
0041      *
0042      * @param urls The list of DAV URLs whose sub collections shall be fetched.
0043      * @param parent The parent object.
0044      */
0045     explicit DavCollectionsMultiFetchJob(const DavUrl::List &urls, QObject *parent = nullptr);
0046     ~DavCollectionsMultiFetchJob() override;
0047 
0048     /**
0049      * Starts the job.
0050      */
0051     void start() override;
0052 
0053     /**
0054      * Returns the list of fetched DAV collections.
0055      */
0056     Q_REQUIRED_RESULT DavCollection::List collections() const;
0057 
0058 Q_SIGNALS:
0059     /**
0060      * This signal is emitted every time a new collection has been discovered.
0061      *
0062      * @param collectionUrl The URL of the discovered collection
0063      * @param configuredUrl The URL given to the job
0064      */
0065     void collectionDiscovered(KDAV::Protocol protocol, const QString &collectionUrl, const QString &configuredUrl);
0066 
0067 private:
0068     void slotResult(KJob *) override;
0069 
0070     const std::unique_ptr<DavCollectionsMultiFetchJobPrivate> d;
0071 };
0072 }
0073 
0074 #endif