Akonadi

collectionannotationsattribute.h
1/*
2 SPDX-FileCopyrightText: 2008 Omat Holding B.V. <info@omat.nl>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "attribute.h"
10
11#include <QMap>
12
13namespace Akonadi
14{
15
16/**
17 * Collection annotations attribute.
18 *
19 * This is primarily meant for storing IMAP ANNOTATION (RFC5257) data for resources
20 * supporting that.
21 *
22 * @since 5.23.43
23 */
24class AKONADICORE_EXPORT CollectionAnnotationsAttribute : public Akonadi::Attribute
25{
26public:
27 CollectionAnnotationsAttribute();
28 explicit CollectionAnnotationsAttribute(const QMap<QByteArray, QByteArray> &annotations);
29 ~CollectionAnnotationsAttribute() override = default;
30
31 void setAnnotations(const QMap<QByteArray, QByteArray> &annotations);
32 [[nodiscard]] QMap<QByteArray, QByteArray> annotations() const;
33
34 [[nodiscard]] QByteArray type() const override;
35 CollectionAnnotationsAttribute *clone() const override;
36 [[nodiscard]] QByteArray serialized() const override;
37 void deserialize(const QByteArray &data) override;
38
39 bool operator==(const CollectionAnnotationsAttribute &other) const;
40
41private:
43};
44
45}
Provides interface for custom attributes for Entity.
Definition attribute.h:132
void deserialize(const QByteArray &data) override
Sets the data of this attribute, using the same encoding as returned by toByteArray().
CollectionAnnotationsAttribute * clone() const override
Creates a copy of this attribute.
QByteArray serialized() const override
Returns a QByteArray representation of the attribute which will be storaged.
QByteArray type() const override
Returns the type of the attribute.
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:49:56 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.