KDAV 5.109.0
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 <QSharedDataPointer>
15#include <QUrl>
16#include <QVector>
17
18namespace KDAV
19{
20class DavUrlPrivate;
26class KDAV_EXPORT DavUrl
27{
28public:
32 typedef QVector<DavUrl> List;
33
38 DavUrl(const DavUrl &);
39 DavUrl(DavUrl &&);
40 ~DavUrl();
41 DavUrl &operator=(const DavUrl &);
42 DavUrl &operator=(DavUrl &&);
43
50 DavUrl(const QUrl &url, Protocol protocol);
51
55 void setUrl(const QUrl &url);
56
60 Q_REQUIRED_RESULT QUrl url() const;
61
65 Q_REQUIRED_RESULT QString toDisplayString() const;
66
70 void setProtocol(Protocol protocol);
71
75 Q_REQUIRED_RESULT Protocol protocol() const;
76
77private:
78 QSharedDataPointer<DavUrlPrivate> d;
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_MOVABLE_TYPE);
86
87#endif
A helper class to combine URL and protocol of a DAV URL.
Definition davurl.h:27
Protocol protocol() const
Returns the DAV protocol dialect that is used to retrieve the DAV object.
void setUrl(const QUrl &url)
Sets the url that identifies the DAV object.
QString toDisplayString() const
Returns the URL in a user-friendly way without login information.
QUrl url() const
Returns the URL that identifies the DAV object.
QVector< DavUrl > List
Defines a list of DAV URL objects.
Definition davurl.h:32
void setProtocol(Protocol protocol)
Sets the DAV protocol dialect that is used to retrieve the DAV object.
DavUrl(const QUrl &url, Protocol protocol)
Creates a new DAV URL.
DavUrl()
Creates an empty DAV URL.
The KDAV namespace.
Definition davjobbase.h:17
Protocol
Describes the DAV protocol dialect.
Definition enums.h:20