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 <QList> 0010 #include <QMultiMap> 0011 0012 #include "ewsitembase.h" 0013 0014 class QXmlStreamReader; 0015 class QXmlStreamWriter; 0016 class EwsItemPrivate; 0017 0018 class EwsItem : public EwsItemBase 0019 { 0020 public: 0021 typedef QList<EwsItem> List; 0022 typedef QMultiMap<QString, QString> HeaderMap; 0023 0024 EwsItem(); 0025 explicit EwsItem(QXmlStreamReader &reader); 0026 EwsItem(const EwsItem &other); 0027 EwsItem(EwsItem &&other); 0028 ~EwsItem() override; 0029 0030 EwsItem &operator=(const EwsItem &other); 0031 EwsItem &operator=(EwsItem &&other); 0032 0033 EwsItemType type() const; 0034 void setType(EwsItemType type); 0035 EwsItemType internalType() const; 0036 0037 bool write(QXmlStreamWriter &writer) const; 0038 0039 bool operator==(const EwsItem &other) const; 0040 0041 protected: 0042 bool readBaseItemElement(QXmlStreamReader &reader); 0043 }; 0044 0045 Q_DECLARE_METATYPE(EwsItem) 0046 Q_DECLARE_METATYPE(EwsItem::List) 0047 Q_DECLARE_METATYPE(EwsItem::HeaderMap)