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_ENUMS_H |
8 | #define KDAV_ENUMS_H |
9 | |
10 | #include <QFlags> |
11 | |
12 | /*! |
13 | * \namespace KDAV |
14 | * \inmodule KDAV |
15 | * \inheaderfile KDAV/Enums |
16 | * \brief The KDAV namespace. |
17 | */ |
18 | namespace KDAV |
19 | { |
20 | /*! |
21 | * Describes the DAV protocol dialect. |
22 | * |
23 | * \value CalDav The CalDav protocol as defined in https://devguide.calconnect.org/CalDAV |
24 | * \value CardDav The CardDav protocol as defined in https://devguide.calconnect.org/CardDAV |
25 | * \value GroupDav The GroupDav protocol as defined in http://www.groupdav.org |
26 | * |
27 | */ |
28 | enum Protocol { |
29 | CalDav = 0, |
30 | CardDav, |
31 | GroupDav, |
32 | }; |
33 | |
34 | /*! |
35 | * Describes the DAV privileges on a resource (see RFC3744) |
36 | * |
37 | * \value None |
38 | * \value Read |
39 | * \value Write |
40 | * \value WriteProperties |
41 | * \value WriteContent |
42 | * \value Unlock |
43 | * \value ReadAcl |
44 | * \value ReadCurrentUserPrivilegeSet |
45 | * \value WriteAcl |
46 | * \value Bind |
47 | * \value Unbind |
48 | * \value All |
49 | */ |
50 | enum Privilege { |
51 | None = 0x0, |
52 | Read = 0x1, |
53 | Write = 0x2, |
54 | WriteProperties = 0x4, |
55 | WriteContent = 0x8, |
56 | Unlock = 0x10, |
57 | ReadAcl = 0x20, |
58 | ReadCurrentUserPrivilegeSet = 0x40, |
59 | WriteAcl = 0x80, |
60 | Bind = 0x100, |
61 | Unbind = 0x200, |
62 | All = 0x400, |
63 | }; |
64 | Q_DECLARE_FLAGS(Privileges, Privilege) |
65 | Q_DECLARE_OPERATORS_FOR_FLAGS(Privileges) |
66 | } |
67 | |
68 | #endif |
69 | |