KDAV

davurl.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_DAVURL_H
8#define KDAV_DAVURL_H
9
10#include "kdav_export.h"
11
12#include "enums.h"
13
14#include <QList>
15#include <QSharedDataPointer>
16#include <QUrl>
17
18namespace KDAV
19{
20class DavUrlPrivate;
21/**
22 * @class DavUrl davurl.h <KDAV/DavUrl>
23 *
24 * @short A helper class to combine URL and protocol of a DAV URL.
25 */
26class KDAV_EXPORT DavUrl
27{
28public:
29 /**
30 * Defines a list of DAV URL objects.
31 */
33
34 /**
35 * Creates an empty DAV URL.
36 */
37 DavUrl();
38 DavUrl(const DavUrl &);
39 DavUrl(DavUrl &&);
40 ~DavUrl();
41 DavUrl &operator=(const DavUrl &);
42 DavUrl &operator=(DavUrl &&);
43
44 /**
45 * Creates a new DAV URL.
46 *
47 * @param url The URL that identifies the DAV object.
48 * @param protocol The DAV protocol dialect that is used to retrieve the DAV object.
49 */
50 DavUrl(const QUrl &url, Protocol protocol);
51
52 /**
53 * Sets the @p url that identifies the DAV object.
54 */
55 void setUrl(const QUrl &url);
56
57 /**
58 * Returns the URL that identifies the DAV object.
59 */
60 Q_REQUIRED_RESULT QUrl url() const;
61
62 /**
63 * Returns the URL in a user-friendly way without login information.
64 */
65 Q_REQUIRED_RESULT QString toDisplayString() const;
66
67 /**
68 * Sets the DAV @p protocol dialect that is used to retrieve the DAV object.
69 */
70 void setProtocol(Protocol protocol);
71
72 /**
73 * Returns the DAV protocol dialect that is used to retrieve the DAV object.
74 */
75 Q_REQUIRED_RESULT Protocol protocol() const;
76
77private:
79};
80
81KDAV_EXPORT QDataStream &operator<<(QDataStream &out, const DavUrl &url);
82KDAV_EXPORT QDataStream &operator>>(QDataStream &in, DavUrl &url);
83}
84
85Q_DECLARE_TYPEINFO(KDAV::DavUrl, Q_RELOCATABLE_TYPE);
86
87#endif
A helper class to combine URL and protocol of a DAV URL.
Definition davurl.h:27
QList< DavUrl > List
Defines a list of DAV URL objects.
Definition davurl.h:32
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.