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 EwsFindFolderRequest : public EwsRequest
0015 {
0016     Q_OBJECT
0017 public:
0018     explicit EwsFindFolderRequest(EwsClient &client, QObject *parent);
0019     ~EwsFindFolderRequest() override;
0020 
0021     void setParentFolderId(const EwsId &id);
0022     void setFolderShape(const EwsFolderShape &shape);
0023     void setTraversal(EwsTraversalType traversal)
0024     {
0025         mTraversal = traversal;
0026     }
0027 
0028     void start() override;
0029 
0030     const QList<EwsFolder> folders() const
0031     {
0032         return mFolders;
0033     }
0034 
0035 protected:
0036     bool parseResult(QXmlStreamReader &reader) override;
0037     bool parseFoldersResponse(QXmlStreamReader &reader);
0038 
0039 private:
0040     EwsId mParentId;
0041     EwsFolderShape mShape;
0042     EwsTraversalType mTraversal;
0043     QList<EwsFolder> mFolders;
0044 };