1/*
2 SPDX-FileCopyrightText: 2009 Grégory Oestreicher <greg@kamago.net>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "davcollection.h"
8
9#include "davurl.h"
10
11#include <QColor>
12
13using namespace KDAV;
14
15class DavCollectionPrivate : public QSharedData
16{
17public:
18 DavCollection::ContentTypes mContentTypes;
19 QString mCTag;
20 DavUrl mUrl;
21 QString mDisplayName;
22 QColor mColor;
23 Privileges mPrivileges;
24};
25
26DavCollection::DavCollection()
27 : d(new DavCollectionPrivate)
28{
29}
30
31DavCollection::DavCollection(const DavUrl &url, const QString &displayName, ContentTypes contentTypes)
32 : d(new DavCollectionPrivate)
33{
34 d->mUrl = url;
35 d->mDisplayName = displayName;
36 d->mContentTypes = contentTypes;
37 d->mPrivileges = KDAV::All;
38}
39
40DavCollection::DavCollection(const DavCollection &other) = default;
41DavCollection::DavCollection(DavCollection &&) = default;
42DavCollection &DavCollection::operator=(const DavCollection &other) = default;
43DavCollection &DavCollection::operator=(DavCollection &&) = default;
44DavCollection::~DavCollection() = default;
45
46void DavCollection::setCTag(const QString &ctag)
47{
48 d->mCTag = ctag;
49}
50
51QString DavCollection::CTag() const
52{
53 return d->mCTag;
54}
55
56void DavCollection::setUrl(const DavUrl &url)
57{
58 d->mUrl = url;
59}
60
61DavUrl DavCollection::url() const
62{
63 return d->mUrl;
64}
65
66void DavCollection::setDisplayName(const QString &displayName)
67{
68 d->mDisplayName = displayName;
69}
70
71QString DavCollection::displayName() const
72{
73 return d->mDisplayName;
74}
75
76void DavCollection::setColor(const QColor &color)
77{
78 d->mColor = color;
79}
80
81QColor DavCollection::color() const
82{
83 return d->mColor;
84}
85
86void DavCollection::setContentTypes(ContentTypes contentTypes)
87{
88 d->mContentTypes = contentTypes;
89}
90
91DavCollection::ContentTypes DavCollection::contentTypes() const
92{
93 return d->mContentTypes;
94}
95
96void DavCollection::setPrivileges(Privileges privs)
97{
98 d->mPrivileges = privs;
99}
100
101Privileges DavCollection::privileges() const
102{
103 return d->mPrivileges;
104}
105

source code of kdav/src/common/davcollection.cpp