1 /* 2 SPDX-FileCopyrightText: 2015-2017 Krzysztof Nowicki <krissn@op.pl> 3 4 SPDX-License-Identifier: LGPL-2.0-or-later 5 */ 6 7 #pragma once 8 9 #include <QSharedDataPointer> 10 #include <QXmlStreamReader> 11 12 #include "ewsitembase.h" 13 14 class EwsMailboxPrivate; 15 16 namespace KMime 17 { 18 namespace Types 19 { 20 class Mailbox; 21 } 22 } 23 24 class EwsMailbox 25 { 26 public: 27 typedef QVector<EwsMailbox> List; 28 29 EwsMailbox(); 30 explicit EwsMailbox(QXmlStreamReader &reader); 31 EwsMailbox(const EwsMailbox &other); 32 EwsMailbox(EwsMailbox &&other); 33 virtual ~EwsMailbox(); 34 35 EwsMailbox &operator=(const EwsMailbox &other); 36 EwsMailbox &operator=(EwsMailbox &&other); 37 38 bool isValid() const; 39 QString name() const; 40 QString email() const; 41 QString emailWithName() const; 42 operator KMime::Types::Mailbox() const; 43 44 protected: 45 QSharedDataPointer<EwsMailboxPrivate> d; 46 }; 47 48 Q_DECLARE_METATYPE(EwsMailbox) 49 Q_DECLARE_METATYPE(EwsMailbox::List) 50 51