File indexing completed on 2024-11-17 04:45:11
0001 /* 0002 SPDX-FileCopyrightText: 2008 Omat Holding B.V. <info@omat.nl> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "uidvalidityattribute.h" 0008 0009 #include <QByteArray> 0010 0011 UidValidityAttribute::UidValidityAttribute(int uidvalidity) 0012 : mUidValidity(uidvalidity) 0013 { 0014 } 0015 0016 void UidValidityAttribute::setUidValidity(int uidvalidity) 0017 { 0018 mUidValidity = uidvalidity; 0019 } 0020 0021 int UidValidityAttribute::uidValidity() const 0022 { 0023 return mUidValidity; 0024 } 0025 0026 QByteArray UidValidityAttribute::type() const 0027 { 0028 static const QByteArray sType("uidvalidity"); 0029 return sType; 0030 } 0031 0032 Akonadi::Attribute *UidValidityAttribute::clone() const 0033 { 0034 return new UidValidityAttribute(mUidValidity); 0035 } 0036 0037 QByteArray UidValidityAttribute::serialized() const 0038 { 0039 return QByteArray::number(mUidValidity); 0040 } 0041 0042 void UidValidityAttribute::deserialize(const QByteArray &data) 0043 { 0044 mUidValidity = data.toInt(); 0045 }