File indexing completed on 2024-11-24 04:44:35
0001 /* 0002 SPDX-FileCopyrightText: 2009 Kevin Ottens <ervin@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "akonadi-singlefileresource_export.h" 0010 #include <Akonadi/Attribute> 0011 0012 #include <QMap> 0013 0014 namespace Akonadi 0015 { 0016 class AKONADI_SINGLEFILERESOURCE_EXPORT ImapQuotaAttribute : public Akonadi::Attribute 0017 { 0018 public: 0019 ImapQuotaAttribute(); 0020 ImapQuotaAttribute(const QList<QByteArray> &roots, const QList<QMap<QByteArray, qint64>> &limits, const QList<QMap<QByteArray, qint64>> &usages); 0021 0022 void setQuotas(const QList<QByteArray> &roots, const QList<QMap<QByteArray, qint64>> &limits, const QList<QMap<QByteArray, qint64>> &usages); 0023 0024 QList<QByteArray> roots() const; 0025 QList<QMap<QByteArray, qint64>> limits() const; 0026 QList<QMap<QByteArray, qint64>> usages() const; 0027 0028 QByteArray type() const override; 0029 Attribute *clone() const override; 0030 QByteArray serialized() const override; 0031 void deserialize(const QByteArray &data) override; 0032 0033 private: 0034 QList<QByteArray> mRoots; 0035 QList<QMap<QByteArray, qint64>> mLimits; 0036 QList<QMap<QByteArray, qint64>> mUsages; 0037 }; 0038 }