Libkdav2

davjob.h
1/*
2 Copyright (c) 2014 Gregory Oestreicher <greg@kamago.net>
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_DAVJOB_H
20#define KDAV2_DAVJOB_H
21
22#include <memory>
23
24#include "kpimkdav2_export.h"
25
26#include <KCoreAddons/KJob>
27#include <QDomDocument>
28#include <QUrl>
29#include <QNetworkReply>
30
31class DavJobPrivate;
32
33namespace KDAV2
34{
35class KPIMKDAV2_EXPORT DavJob : public KJob
36{
37 Q_OBJECT
38
39public:
40 explicit DavJob(QNetworkReply *reply, QUrl url, QObject *parent = nullptr);
41 ~DavJob();
42
43 virtual void start() Q_DECL_OVERRIDE;
44
45 QDomDocument response() const;
46 QByteArray data() const;
47 QUrl url() const;
48 QNetworkReply::NetworkError responseCode() const;
49 int httpStatusCode() const;
50 QString getLocationHeader() const;
51 QString getETagHeader() const;
52 QString getContentTypeHeader() const;
53
54private:
55 void connectToReply(QNetworkReply *reply);
56 std::unique_ptr<DavJobPrivate> d;
57};
58
59}
60
61#endif
Q_SCRIPTABLE Q_NOREPLY void start()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:32:58 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.