File indexing completed on 2025-02-16 04:50:17
0001 /* 0002 * SPDX-FileCopyrightText: 2013 Daniel Vrátil <dvratil@redhat.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 * 0006 */ 0007 0008 #include "highestmodseqattribute.h" 0009 0010 #include <QByteArray> 0011 0012 HighestModSeqAttribute::HighestModSeqAttribute(qint64 highestModSequence) 0013 : Akonadi::Attribute() 0014 , m_highestModSeq(highestModSequence) 0015 { 0016 } 0017 0018 void HighestModSeqAttribute::setHighestModSeq(qint64 highestModSequence) 0019 { 0020 m_highestModSeq = highestModSequence; 0021 } 0022 0023 qint64 HighestModSeqAttribute::highestModSequence() const 0024 { 0025 return m_highestModSeq; 0026 } 0027 0028 Akonadi::Attribute *HighestModSeqAttribute::clone() const 0029 { 0030 return new HighestModSeqAttribute(m_highestModSeq); 0031 } 0032 0033 QByteArray HighestModSeqAttribute::type() const 0034 { 0035 static const QByteArray sType("highestmodseq"); 0036 return sType; 0037 } 0038 0039 void HighestModSeqAttribute::deserialize(const QByteArray &data) 0040 { 0041 m_highestModSeq = data.toLongLong(); 0042 } 0043 0044 QByteArray HighestModSeqAttribute::serialized() const 0045 { 0046 return QByteArray::number(m_highestModSeq); 0047 }