PimCommon::ImapAclAttribute Class

class PimCommon::ImapAclAttribute

The ImapAclAttribute class stores IMAP ACL information as an Akonadi attribute Author: Kevin Ottens <ervin@kde.org>. More...

Header: #include <PimCommonAkonadi/ImapAclAttribute>
CMake: find_package(KPim6PimCommonAkonadi REQUIRED)
target_link_libraries(mytarget PRIVATE KPim6::PimCommonAkonadi)

Public Functions

ImapAclAttribute()
ImapAclAttribute(const QMap<QByteArray, KIMAP::Acl::Rights> &rights, const QMap<QByteArray, KIMAP::Acl::Rights> &oldRights)
virtual ~ImapAclAttribute() override
KIMAP::Acl::Rights myRights() const
QMap<QByteArray, KIMAP::Acl::Rights> oldRights() const
QMap<QByteArray, KIMAP::Acl::Rights> rights() const
void setMyRights(KIMAP::Acl::Rights rights)
void setRights(const QMap<QByteArray, KIMAP::Acl::Rights> &rights)
bool operator==(const PimCommon::ImapAclAttribute &other) const

Reimplemented Public Functions

virtual PimCommon::ImapAclAttribute *clone() const override
virtual void deserialize(const QByteArray &data) override
virtual QByteArray serialized() const override
virtual QByteArray type() const override

Detailed Description

Member Function Documentation

ImapAclAttribute::ImapAclAttribute()

Constructs a default ImapAclAttribute.

ImapAclAttribute::ImapAclAttribute(const QMap<QByteArray, KIMAP::Acl::Rights> &rights, const QMap<QByteArray, KIMAP::Acl::Rights> &oldRights)

Constructs an ImapAclAttribute with given rights. @param rights The current ACL rights @param oldRights The previous ACL rights

[override virtual noexcept] ImapAclAttribute::~ImapAclAttribute()

Destructs the ImapAclAttribute.

[override virtual] PimCommon::ImapAclAttribute *ImapAclAttribute::clone() const

Creates a clone of this attribute. @return A new ImapAclAttribute with the same data

[override virtual] void ImapAclAttribute::deserialize(const QByteArray &data)

Deserializes an attribute from a byte array. @param data The serialized attribute data

KIMAP::Acl::Rights ImapAclAttribute::myRights() const

Returns the user's own ACL rights. @return The user's ACL rights

See also setMyRights().

QMap<QByteArray, KIMAP::Acl::Rights> ImapAclAttribute::oldRights() const

Returns the previous ACL rights. @return The old ACL rights map

QMap<QByteArray, KIMAP::Acl::Rights> ImapAclAttribute::rights() const

Returns the current ACL rights. @return The ACL rights map

See also setRights().

[override virtual] QByteArray ImapAclAttribute::serialized() const

Serializes this attribute to a byte array. @return The serialized attribute data

void ImapAclAttribute::setMyRights(KIMAP::Acl::Rights rights)

Sets the user's own ACL rights. @param rights The user's ACL rights

See also myRights().

void ImapAclAttribute::setRights(const QMap<QByteArray, KIMAP::Acl::Rights> &rights)

Sets the ACL rights. @param rights The ACL rights map

See also rights().

[override virtual] QByteArray ImapAclAttribute::type() const

Returns the type of this attribute. @return The attribute type name

bool ImapAclAttribute::operator==(const PimCommon::ImapAclAttribute &other) const

Compares this attribute with another for equality. @param other The attribute to compare with @return true if equal, false otherwise