File indexing completed on 2024-12-22 04:57:01
0001 /* 0002 SPDX-FileCopyrightText: 2015-2016 Krzysztof Nowicki <krissn@op.pl> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "ewsfolder.h" 0010 #include "ewsfoldershape.h" 0011 #include "ewsrequest.h" 0012 #include "ewstypes.h" 0013 0014 class EwsGetFolderRequest : public EwsRequest 0015 { 0016 Q_OBJECT 0017 public: 0018 class Response : public EwsRequest::Response 0019 { 0020 public: 0021 explicit Response(QXmlStreamReader &reader); 0022 bool parseFolders(QXmlStreamReader &reader); 0023 0024 const EwsFolder &folder() const 0025 { 0026 return mFolder; 0027 } 0028 0029 private: 0030 EwsFolder mFolder; 0031 }; 0032 0033 EwsGetFolderRequest(EwsClient &client, QObject *parent); 0034 ~EwsGetFolderRequest() override; 0035 0036 void setFolderIds(const EwsId::List &ids); 0037 void setFolderShape(const EwsFolderShape &shape); 0038 0039 void start() override; 0040 0041 const QList<Response> &responses() const 0042 { 0043 return mResponses; 0044 } 0045 0046 protected: 0047 bool parseResult(QXmlStreamReader &reader) override; 0048 bool parseFoldersResponse(QXmlStreamReader &reader); 0049 0050 private: 0051 EwsId::List mIds; 0052 EwsFolderShape mShape; 0053 QList<Response> mResponses; 0054 };