Build with clang.
[kdepim.git] / mailcommon / imapaclattribute.h
blobf6341be90e3c30aa116e5713830b41915595f912
1 /*
2 Copyright (C) 2009 Kevin Ottens <ervin@kde.org>
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
20 #ifndef MAILCOMMON_IMAPACLATTRIBUTE_H
21 #define MAILCOMMON_IMAPACLATTRIBUTE_H
23 #include "mailcommon_export.h"
25 #include <akonadi/attribute.h>
27 #include <QtCore/QMap>
29 #include <kimap/acl.h>
31 namespace MailCommon {
33 class MAILCOMMON_EXPORT ImapAclAttribute : public Akonadi::Attribute
35 public:
36 ImapAclAttribute();
37 ImapAclAttribute( const QMap<QByteArray, KIMAP::Acl::Rights> &rights,
38 const QMap<QByteArray, KIMAP::Acl::Rights> &oldRights );
39 void setRights( const QMap<QByteArray, KIMAP::Acl::Rights> &rights );
40 QMap<QByteArray, KIMAP::Acl::Rights> rights() const;
41 QMap<QByteArray, KIMAP::Acl::Rights> oldRights() const;
42 virtual QByteArray type() const;
43 virtual Attribute *clone() const;
44 virtual QByteArray serialized() const;
45 virtual void deserialize( const QByteArray &data );
47 private:
48 QMap<QByteArray, KIMAP::Acl::Rights> mRights;
49 QMap<QByteArray, KIMAP::Acl::Rights> mOldRights;
54 #endif