Libkdav2

davitemslistjob.h
1/*
2 Copyright (c) 2010 Tobias Koenig <tokoe@kde.org>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17*/
18
19#ifndef KDAV2_DAVITEMSLISTJOB_H
20#define KDAV2_DAVITEMSLISTJOB_H
21
22#include "kpimkdav2_export.h"
23
24#include "davitem.h"
25#include "davjobbase.h"
26
27#include <memory>
28
29
30#include <QtCore/QStringList>
31
32class DavItemsListJobPrivate;
33
34namespace KDAV2
35{
36
37class DavUrl;
38
39/**
40 * @short A job that lists all DAV items inside a DAV collection.
41 */
42class KPIMKDAV2_EXPORT DavItemsListJob : public DavJobBase
43{
44 Q_OBJECT
45
46public:
47 /**
48 * Creates a new dav items list job.
49 *
50 * @param url The url of the DAV collection.
51 * @param parent The parent object.
52 */
53 DavItemsListJob(const DavUrl &url, QObject *parent = nullptr);
54
56
57 /**
58 * Limits the mime types of the items requested.
59 *
60 * If no mime type is given then all will be requested.
61 *
62 * @param types The list of mime types to include
63 */
64 void setContentMimeTypes(const QStringList &types);
65
66 /**
67 * Sets the start and end time to list items for.
68 *
69 * @param start The range start, in format "date with UTC time"
70 * @param end The range end, in format "date with UTC time"
71 */
72 void setTimeRange(const QString &start, const QString &end);
73
74 /**
75 * Starts the job.
76 */
77 void start() Q_DECL_OVERRIDE;
78
79 /**
80 * Returns the list of items seen including identifier url and etag information.
81 */
82 DavItem::List items() const;
83
84private Q_SLOTS:
85 void davJobFinished(KJob *);
86
87private:
88 std::unique_ptr<DavItemsListJobPrivate> d;
89};
90
91}
92
93#endif
A job that lists all DAV items inside a DAV collection.
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 Sun Feb 25 2024 18:38:36 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.