File indexing completed on 2024-11-17 04:44:59
0001 /* 0002 SPDX-FileCopyrightText: 2020 Krzysztof Nowicki <krissn@op.pl> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "ewssyncstateattribute.h" 0008 0009 EwsSyncStateAttribute::EwsSyncStateAttribute(const QString &syncState) 0010 : mSyncState(syncState) 0011 { 0012 } 0013 0014 void EwsSyncStateAttribute::setSyncState(const QString &syncState) 0015 { 0016 mSyncState = syncState; 0017 } 0018 0019 const QString &EwsSyncStateAttribute::syncState() const 0020 { 0021 return mSyncState; 0022 } 0023 0024 QByteArray EwsSyncStateAttribute::type() const 0025 { 0026 static const QByteArray attrType("ewssyncstate"); 0027 return attrType; 0028 } 0029 0030 Akonadi::Attribute *EwsSyncStateAttribute::clone() const 0031 { 0032 return new EwsSyncStateAttribute(mSyncState); 0033 } 0034 0035 QByteArray EwsSyncStateAttribute::serialized() const 0036 { 0037 return mSyncState.toUtf8(); 0038 } 0039 0040 void EwsSyncStateAttribute::deserialize(const QByteArray &data) 0041 { 0042 mSyncState = QString::fromUtf8(data); 0043 }