Akonadi

collectionidentificationattribute.h
1 /*
2  SPDX-FileCopyrightText: 2014 Christian Mollekopf <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "attribute.h"
10 #include <QByteArray>
11 
12 #include <memory>
13 
14 namespace Akonadi
15 {
16 class CollectionIdentificationAttributePrivate;
17 
18 /**
19  * @short Attribute that stores additional information on a collection that can be used for searching.
20  *
21  * Additional indexed properties that can be used for searching.
22  *
23  * @author Christian Mollekopf <[email protected]>
24  * @since 4.15
25  */
26 class AKONADICORE_EXPORT CollectionIdentificationAttribute : public Akonadi::Attribute
27 {
28 public:
29  explicit CollectionIdentificationAttribute(const QByteArray &identifier = QByteArray(),
30  const QByteArray &folderNamespace = QByteArray(),
31  const QByteArray &name = QByteArray(),
32  const QByteArray &organizationUnit = QByteArray(),
33  const QByteArray &mail = QByteArray());
35 
36  /**
37  * Sets an identifier for the collection.
38  */
39  void setIdentifier(const QByteArray &identifier);
40  QByteArray identifier() const;
41 
42  void setMail(const QByteArray &);
43  QByteArray mail() const;
44 
45  void setOu(const QByteArray &);
46  QByteArray ou() const;
47 
48  void setName(const QByteArray &);
49  QByteArray name() const;
50 
51  /**
52  * Sets a namespace the collection is in.
53  *
54  * Initially used are:
55  * * "person" for a collection shared by a person.
56  * * "shared" for a collection shared by a person.
57  */
58  void setCollectionNamespace(const QByteArray &ns);
59  QByteArray collectionNamespace() const;
60  QByteArray type() const override;
61  Attribute *clone() const override;
62  QByteArray serialized() const override;
63  void deserialize(const QByteArray &data) override;
64 
65 private:
66  /// @cond PRIVATE
67  const std::unique_ptr<CollectionIdentificationAttributePrivate> d;
68  /// @endcond
69 };
70 
71 } // namespace Akonadi
72 
Provides interface for custom attributes for Entity.
Definition: attribute.h:124
Attribute that stores additional information on a collection that can be used for searching.
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jul 2 2022 06:41:47 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.