KDAV

davcollectionsfetchjob.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_DAVCOLLECTIONSFETCHJOB_H
8#define KDAV_DAVCOLLECTIONSFETCHJOB_H
9
10#include "kdav_export.h"
11
12#include "davcollection.h"
13#include "davjobbase.h"
14#include "davurl.h"
15
16namespace KDAV
17{
18class DavCollectionsFetchJobPrivate;
19
20/**
21 * @class DavCollectionsFetchJob davcollectionsfetchjob.h <KDAV/DavCollectionsFetchJob>
22 *
23 * @short A job that fetches all DAV collection.
24 *
25 * This job is used to fetch all DAV collection that are available
26 * under a certain DAV URL.
27 */
28class KDAV_EXPORT DavCollectionsFetchJob : public DavJobBase
29{
30 Q_OBJECT
31
32public:
33 /**
34 * Creates a new DAV collections fetch job.
35 *
36 * @param url The DAV URL of the DAV collection whose sub collections shall be fetched.
37 * @param parent The parent object.
38 */
39 explicit DavCollectionsFetchJob(const DavUrl &url, QObject *parent = nullptr);
40
41 /**
42 * Starts the job.
43 */
44 void start() override;
45
46 /**
47 * Returns the list of fetched DAV collections.
48 */
49 Q_REQUIRED_RESULT DavCollection::List collections() const;
50
51 /**
52 * Return the DavUrl used by this job
53 */
54 Q_REQUIRED_RESULT DavUrl davUrl() const;
55
56Q_SIGNALS:
57 /**
58 * This signal is emitted every time a new collection has been discovered.
59 *
60 * @param collectionUrl The URL of the discovered collection
61 * @param configuredUrl The URL given to the job
62 */
63 void collectionDiscovered(KDAV::Protocol protocol, const QString &collectionUrl, const QString &configuredUrl);
64
65private:
66 Q_DECLARE_PRIVATE(DavCollectionsFetchJob)
67};
68}
69
70#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.
base class for the jobs used by the resource.
Definition davjobbase.h:27
A helper class to combine URL and protocol of a DAV URL.
Definition davurl.h:27
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 Fri Oct 4 2024 11:56:16 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.