KDAV

davcollectionsmultifetchjob.h
1/*
2 SPDX-FileCopyrightText: 2010 Tobias Koenig <tokoe@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef KDAV_DAVCOLLECTIONSMULTIFETCHJOB_H
8#define KDAV_DAVCOLLECTIONSMULTIFETCHJOB_H
9
10#include "kdav_export.h"
11
12#include "davcollection.h"
13#include "davurl.h"
14
15#include <KCompositeJob>
16
17#include <memory>
18
19namespace KDAV
20{
21class DavCollectionsMultiFetchJobPrivate;
22
23/**
24 * @class DavCollectionsMultiFetchJob davcollectionsmultifetchjob.h <KDAV/DavCollectionsMultiFetchJob>
25 *
26 * @short A job that fetches all DAV collection.
27 *
28 * This job is used to fetch all DAV collection that are available
29 * under a certain list of DAV URLs.
30 *
31 * @note This class just combines multiple calls of DavCollectionsFetchJob
32 * into one job.
33 */
35{
36 Q_OBJECT
37
38public:
39 /**
40 * Creates a new DAV collections multi fetch job.
41 *
42 * @param urls The list of DAV URLs whose sub collections shall be fetched.
43 * @param parent The parent object.
44 */
45 explicit DavCollectionsMultiFetchJob(const DavUrl::List &urls, QObject *parent = nullptr);
47
48 /**
49 * Starts the job.
50 */
51 void start() override;
52
53 /**
54 * Returns the list of fetched DAV collections.
55 */
56 Q_REQUIRED_RESULT DavCollection::List collections() const;
57
58Q_SIGNALS:
59 /**
60 * This signal is emitted every time a new collection has been discovered.
61 *
62 * @param collectionUrl The URL of the discovered collection
63 * @param configuredUrl The URL given to the job
64 */
65 void collectionDiscovered(KDAV::Protocol protocol, const QString &collectionUrl, const QString &configuredUrl);
66
67private:
68 void slotResult(KJob *) override;
69
70 const std::unique_ptr<DavCollectionsMultiFetchJobPrivate> d;
71};
72}
73
74#endif
A job that fetches all DAV collection.
void collectionDiscovered(KDAV::Protocol protocol, const QString &collectionUrl, const QString &configuredUrl)
This signal is emitted every time a new collection has been discovered.
Q_SCRIPTABLE Q_NOREPLY void start()
The KDAV namespace.
Protocol
Describes the DAV protocol dialect.
Definition enums.h:20
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sun Feb 25 2024 18:42:58 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.