Akonadi

indexpolicyattribute.h
1/*
2 SPDX-FileCopyrightText: 2010 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "akonadicore_export.h"
10#include "attribute.h"
11
12#include <memory>
13
14namespace Akonadi
15{
16class IndexPolicyAttributePrivate;
17
18/**
19 * @short An attribute to specify how a collection should be indexed for searching.
20 *
21 * This attribute can be attached to any collection and should be honored by indexing
22 * agents.
23 *
24 * @since 4.6
25 */
26class AKONADICORE_EXPORT IndexPolicyAttribute : public Akonadi::Attribute
27{
28public:
29 /**
30 * Creates a new index policy attribute.
31 */
33
34 /**
35 * Destroys the index policy attribute.
36 */
38
39 /**
40 * Returns whether this collection is supposed to be indexed at all.
41 */
42 [[nodiscard]] bool indexingEnabled() const;
43
44 /**
45 * Sets whether this collection should be indexed at all.
46 * @param enable @c true to enable indexing, @c false to exclude this collection from indexing
47 */
48 void setIndexingEnabled(bool enable);
49
50 /// @cond PRIVATE
51 [[nodiscard]] QByteArray type() const override;
52 Attribute *clone() const override;
53 [[nodiscard]] QByteArray serialized() const override;
54 void deserialize(const QByteArray &data) override;
55 /// @endcond
56
57private:
58 /// @cond PRIVATE
59 const std::unique_ptr<IndexPolicyAttributePrivate> d;
60 /// @endcond
61};
62
63} // namespace Akonadi
Provides interface for custom attributes for Entity.
Definition attribute.h:132
An attribute to specify how a collection should be indexed for searching.
~IndexPolicyAttribute() override
Destroys the index policy attribute.
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:13:38 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.