File indexing completed on 2024-12-22 05:01:14
0001 /* 0002 SPDX-FileCopyrightText: 2010 Till Adam <adam@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <Akonadi/Attribute> 0010 #include <Akonadi/Collection> 0011 0012 #include <QByteArray> 0013 0014 namespace Akonadi 0015 { 0016 class SearchDescriptionAttribute : public Akonadi::Attribute 0017 { 0018 public: 0019 SearchDescriptionAttribute(); 0020 [[nodiscard]] QByteArray description() const; 0021 void setDescription(const QByteArray &desc); 0022 [[nodiscard]] Akonadi::Collection baseCollection() const; 0023 void setBaseCollection(const Akonadi::Collection &); 0024 [[nodiscard]] bool recursive() const; 0025 void setRecursive(bool); 0026 0027 void setListCollection(const QList<Akonadi::Collection::Id> &col); 0028 QList<Akonadi::Collection::Id> listCollection() const; 0029 0030 [[nodiscard]] QByteArray type() const override; 0031 Attribute *clone() const override; 0032 QByteArray serialized() const override; 0033 void deserialize(const QByteArray &data) override; 0034 0035 private: 0036 QList<Akonadi::Collection::Id> mListCollection; 0037 QByteArray mDescription; 0038 Akonadi::Collection mBaseCollection; 0039 bool mRecursive = false; 0040 }; 0041 }