KIMAP2
22 #include <QtCore/QByteArray>
23 #include <QtCore/QMap>
64 Q_GLOBAL_STATIC(RightsMap, globalRights)
73 if (
string.isEmpty()) {
78 if (
string[0] ==
'+' ||
string[0] ==
'-') {
82 for (
int i = pos; i <
string.size(); i++) {
83 if (globalRights->map.contains(
string[i])) {
84 result |= globalRights->map[
string[i]];
95 for (
int right = Lookup; right <= Custom9; right <<= 1) {
97 result += globalRights->map.key((
Right)right);
106 Rights normalized = rights;
107 if (normalized & Create) {
108 normalized |= (CreateMailbox | DeleteMailbox);
109 normalized &= ~Create;
111 if (normalized & Delete) {
112 normalized |= (DeleteMessage | Expunge);
113 normalized &= ~Delete;
120 Rights denormalized = normalizedRights(rights);
121 if (denormalized & (CreateMailbox | DeleteMailbox)) {
122 denormalized |= Create;
124 if (denormalized & (DeleteMessage | Expunge)) {
125 denormalized |= Delete;
@ Delete
Obsolete as of RFC 4314, replaced by DeleteMessage and Expunge.
@ Custom1
Server-specific right 1.
@ Expunge
Expunge the messages in this mailbox.
@ Custom8
Server-specific right 8.
@ Admin
View and modify the access control list for the mailbox.
@ Post
Send mail to the submission address for the mailbox.
@ Lookup
Mailbox is visible to LIST/LSUB commands, SUBSCRIBE mailbox.
@ Custom2
Server-specific right 2.
@ DeleteMailbox
Delete or move the mailbox.
@ Custom0
Server-specific right 0.
@ CreateMailbox
Create new child mailboxes, or move a mailbox with this mailbox as the new parent.
@ Create
Obsolete as of RFC 4314, replaced by CreateMailbox and DeleteMailbox.
@ Custom5
Server-specific right 5.
@ KeepSeen
Set or clear the \Seen flag on messages in the mailbox, and keep it across sessions.
@ WriteShared
Write shared annotations.
@ Custom4
Server-specific right 4.
@ Custom9
Server-specific right 9.
@ Read
SELECT the mailbox, perform STATUS.
@ Custom3
Server-specific right 3.
@ DeleteMessage
Set or clear the \Deleted flag on messages in the mailbox.
KIMAP2_EXPORT QByteArray rightsToString(Rights rights)
Convert a set of rights into text format.
KIMAP2_EXPORT Rights normalizedRights(Rights rights)
Returns a rights mask that has no obsolete members anymore, i.e.
KIMAP2_EXPORT Rights denormalizedRights(Rights rights)
Returns a rights mask that contains both obsolete and new flags if one of them is set.
KIMAP2_EXPORT Rights rightsFromString(const QByteArray &string)
Convert the text form of a set of rights into a Rights bitflag.
@ Custom6
Server-specific right 6.
Right
Possible rights that can be held on a mailbox.
@ Custom7
Server-specific right 7.
@ Write
Set or clear flags other than \Seen and \Deleted on messages in the mailbox.
@ Insert
Perform APPEND and COPY with the mailbox as the target.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Jan 29 2023 04:08:14 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.