Akonadi

collectionidentificationattribute.h
1/*
2 SPDX-FileCopyrightText: 2014 Christian Mollekopf <mollekopf@kolabsys.com>
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
14namespace Akonadi
15{
16class 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 <mollekopf@kolabsys.com>
24 * @since 4.15
25 */
27{
28public:
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 [[nodiscard]] QByteArray identifier() const;
41
42 void setMail(const QByteArray &);
43 [[nodiscard]] QByteArray mail() const;
44
45 void setOu(const QByteArray &);
46 [[nodiscard]] QByteArray ou() const;
47
48 void setName(const QByteArray &);
49 [[nodiscard]] 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 [[nodiscard]] QByteArray collectionNamespace() const;
60 [[nodiscard]] QByteArray type() const override;
61 Attribute *clone() const override;
62 [[nodiscard]] QByteArray serialized() const override;
63 void deserialize(const QByteArray &data) override;
64
65private:
66 /// @cond PRIVATE
67 const std::unique_ptr<CollectionIdentificationAttributePrivate> d;
68 /// @endcond
69};
70
71} // namespace Akonadi
Provides interface for custom attributes for Entity.
Definition attribute.h:132
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-2024 The KDE developers.
Generated on Fri Jun 7 2024 11:56:44 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.