Libkdav2

davdiscoveryjob.h
1/*
2 Copyright (c) 2018 Christian Mollekopf <mollekopf@kolabsys.com>
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#pragma once
19
20#include "kpimkdav2_export.h"
21
22#include "davjobbase.h"
23#include "davurl.h"
24
25#include <KCoreAddons/KJob>
26
27#include <QtCore/QStringList>
28
29namespace KDAV2
30{
31
32/**
33 * @short A job that discovers the principal url using well-known uri's
34 *
35 * It's an incomplete implementation of RFC 6764 so far.
36 */
37class KPIMKDAV2_EXPORT DavDiscoveryJob : public DavJobBase
38{
39 Q_OBJECT
40
41public:
42 /**
43 * Discover the url of the server.
44 *
45 * @param url The DAV url of the server.
46 * @param parent The parent object.
47 */
48 explicit DavDiscoveryJob(const DavUrl &url, const QString &wellKnownSuffix, QObject *parent = nullptr);
49
50 /**
51 * Starts the job.
52 */
53 void start() Q_DECL_OVERRIDE;
54
55 /**
56 * Returns the found principal url.
57 */
58 QUrl url() const;
59
60private Q_SLOTS:
61 void davJobFinished(KJob *);
62
63private:
64 DavUrl mUrl;
65};
66
67}
A job that discovers the principal url using well-known uri's.
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 Fri Nov 8 2024 11:56:00 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.