Akonadi

entityannotationsattribute.h
1/*
2 * SPDX-FileCopyrightText: 2008 Omat Holding B.V. <info@omat.nl>
3 * SPDX-FileCopyrightText: 2014 Christian Mollekopf <mollekopf@kolabsys.com>
4 *
5 * SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7
8#pragma once
9
10#include "akonadicore_export.h"
11#include "attribute.h"
12
13#include <QMap>
14
15namespace Akonadi
16{
17/**
18 * An attribute for annotations.
19 *
20 * The attribute is inspired by RFC5257(IMAP ANNOTATION) and RFC5464(IMAP METADATA), but serves
21 * the purpose of RFC5257.
22 *
23 * For a private note annotation the entry name is:
24 * /private/comment
25 * for a shared note:
26 * /shared/comment
27 *
28 * @since 4.13
29 */
30class AKONADICORE_EXPORT EntityAnnotationsAttribute : public Akonadi::Attribute
31{
32public:
33 explicit EntityAnnotationsAttribute() = default;
35
36 void setAnnotations(const QMap<QByteArray, QByteArray> &annotations);
37 [[nodiscard]] QMap<QByteArray, QByteArray> annotations() const;
38
39 void insert(const QByteArray &key, const QString &value);
40 [[nodiscard]] QString value(const QByteArray &key) const;
41 [[nodiscard]] bool contains(const QByteArray &key) const;
42
43 [[nodiscard]] QByteArray type() const override;
44 Attribute *clone() const override;
45 [[nodiscard]] QByteArray serialized() const override;
46 void deserialize(const QByteArray &data) override;
47
48private:
50};
51
52} // namespace Akonadi
Provides interface for custom attributes for Entity.
Definition attribute.h:132
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:54:40 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.