KDAV 5.109.0
davcollection.h
1/*
2 SPDX-FileCopyrightText: 2009 Grégory Oestreicher <greg@kamago.net>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef KDAV_DAVCOLLECTION_H
8#define KDAV_DAVCOLLECTION_H
9
10#include "kdav_export.h"
11
12#include "enums.h"
13
14#include <QSharedDataPointer>
15#include <QString>
16#include <QVector>
17
18class QColor;
19
20class DavCollectionPrivate;
21
22namespace KDAV
23{
24class DavUrl;
25}
26
27namespace KDAV
28{
37class KDAV_EXPORT DavCollection
38{
39public:
43 typedef QVector<DavCollection> List;
44
49 Events = 1,
50 Todos = 2,
51 Contacts = 4,
52 FreeBusy = 8,
53 Journal = 16,
54 Calendar = 32,
55 };
56 Q_DECLARE_FLAGS(ContentTypes, ContentType)
57
58
62
70 DavCollection(const DavUrl &url, const QString &displayName, ContentTypes contentTypes);
71
72 DavCollection(const DavCollection &other);
74 DavCollection &operator=(const DavCollection &other);
75 DavCollection &operator=(DavCollection &&);
76
78
83 void setCTag(const QString &ctag);
84
90 Q_REQUIRED_RESULT QString CTag() const;
91
95 void setUrl(const DavUrl &url);
96
100 Q_REQUIRED_RESULT DavUrl url() const;
101
105 void setDisplayName(const QString &name);
106
110 Q_REQUIRED_RESULT QString displayName() const;
111
115 void setColor(const QColor &color);
116
121 Q_REQUIRED_RESULT QColor color() const;
122
126 void setContentTypes(ContentTypes types);
127
131 Q_REQUIRED_RESULT ContentTypes contentTypes() const;
132
136 void setPrivileges(Privileges privs);
137
141 Q_REQUIRED_RESULT Privileges privileges() const;
142
143private:
144 QSharedDataPointer<DavCollectionPrivate> d;
145};
146
147Q_DECLARE_OPERATORS_FOR_FLAGS(DavCollection::ContentTypes)
148
149}
150
151Q_DECLARE_TYPEINFO(KDAV::DavCollection, Q_MOVABLE_TYPE);
152
153#endif
A helper class to store information about DAV collection.
Definition davcollection.h:38
ContentType
Describes the possible content type of the DAV collection.
Definition davcollection.h:48
QVector< DavCollection > List
Defines a list of DAV collection objects.
Definition davcollection.h:43
A helper class to combine URL and protocol of a DAV URL.
Definition davurl.h:27
The KDAV namespace.
Definition davjobbase.h:17