Akonadi

entityannotationsattribute.h
1 /*
2  * Copyright (C) 2008 Omat Holding B.V. <[email protected]>
3  * Copyright (C) 2014 Christian Mollekopf <[email protected]>
4  *
5  * This library is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU Library General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or (at your
8  * option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13  * License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB. If not, write to the
17  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18  * 02110-1301, USA.
19  */
20 
21 #ifndef AKONADI_ENTITYANNOTATIONSATTRIBUTE_H
22 #define AKONADI_ENTITYANNOTATIONSATTRIBUTE_H
23 
24 #include "akonadicore_export.h"
25 #include "attribute.h"
26 
27 #include <QMap>
28 
29 namespace Akonadi
30 {
31 
45 class AKONADICORE_EXPORT EntityAnnotationsAttribute : public Akonadi::Attribute
46 {
47 public:
50 
51  void setAnnotations(const QMap<QByteArray, QByteArray> &annotations);
52  QMap<QByteArray, QByteArray> annotations() const;
53 
54  void insert(const QByteArray &key, const QString &value);
55  QString value(const QByteArray &key) const;
56  bool contains(const QByteArray &key) const;
57 
58  QByteArray type() const override;
59  Attribute *clone() const override;
60  QByteArray serialized() const override;
61  void deserialize(const QByteArray &data) override;
62 
63 private:
64  QMap<QByteArray, QByteArray> mAnnotations;
65 };
66 
67 }
68 
69 #endif
Provides interface for custom attributes for Entity.
Definition: attribute.h:139
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon May 25 2020 22:46:10 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.