File indexing completed on 2024-12-22 04:57:02

0001 /*
0002     SPDX-FileCopyrightText: 2015-2017 Krzysztof Nowicki <krissn@op.pl>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QDateTime>
0010 #include <QMetaType>
0011 #include <QSharedDataPointer>
0012 
0013 #include "ewstypes.h"
0014 
0015 class EwsOccurrencePrivate;
0016 class EwsId;
0017 class QXmlStreamReader;
0018 
0019 class EwsOccurrence
0020 {
0021 public:
0022     typedef QList<EwsOccurrence> List;
0023 
0024     EwsOccurrence();
0025     explicit EwsOccurrence(QXmlStreamReader &reader);
0026     EwsOccurrence(const EwsOccurrence &other);
0027     EwsOccurrence(EwsOccurrence &&other);
0028     virtual ~EwsOccurrence();
0029 
0030     EwsOccurrence &operator=(const EwsOccurrence &other);
0031     EwsOccurrence &operator=(EwsOccurrence &&other);
0032 
0033     bool isValid() const;
0034     const EwsId &itemId() const;
0035     QDateTime start() const;
0036     QDateTime end() const;
0037     QDateTime originalStart() const;
0038 
0039 protected:
0040     QSharedDataPointer<EwsOccurrencePrivate> d;
0041 };
0042 
0043 Q_DECLARE_METATYPE(EwsOccurrence)
0044 Q_DECLARE_METATYPE(EwsOccurrence::List)