Libkdav2

davitemsfetchjob.h
1/*
2 Copyright (c) 2010 Grégory Oestreicher <greg@kamago.net>
3 Based on DavItemsListJob which is copyright (c) 2010 Tobias Koenig <tokoe@kde.org>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KDAV2_DAVITEMSFETCHJOB_H
21#define KDAV2_DAVITEMSFETCHJOB_H
22
23#include "kpimkdav2_export.h"
24
25#include "davitem.h"
26#include "davjobbase.h"
27#include "davurl.h"
28
29#include <QtCore/QMap>
30#include <QtCore/QStringList>
31
32namespace KDAV2
33{
34
35/**
36 * @short A job that fetches a list of items from a DAV server using a multiget query.
37 */
38class KPIMKDAV2_EXPORT DavItemsFetchJob : public DavJobBase
39{
40 Q_OBJECT
41
42public:
43 /**
44 * Creates a new items fetch job.
45 *
46 * @param collectionUrl The DAV collection on which to run the query
47 * @param urls The list of urls to fetch
48 * @param parent The parent object
49 */
50 DavItemsFetchJob(const DavUrl &collectionUrl, const QStringList &urls, QObject *parent = nullptr);
51
52 /**
53 * Starts the job.
54 */
55 void start() Q_DECL_OVERRIDE;
56
57 /**
58 * Returns the list of fetched items
59 */
60 DavItem::List items() const;
61
62 /**
63 * Return the item found at @p url
64 */
65 DavItem item(const QString &url) const;
66
67private Q_SLOTS:
68 void davJobFinished(KJob *);
69
70private:
71 DavUrl mCollectionUrl;
72 QStringList mUrls;
74};
75
76}
77
78#endif
A helper class to store information about DAV resources.
Definition davitem.h:52
A job that fetches a list of items from a DAV server using a multiget query.
base class for the jobs used by the resource.
Definition davjobbase.h:38
A helper class to combine url and protocol of a DAV url.
Definition davurl.h:36
Q_SCRIPTABLE Q_NOREPLY void start()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:13:28 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.