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

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 <QSharedPointer>
0010 #include <QTimer>
0011 
0012 #include "ewseventrequestbase.h"
0013 #include "ewsid.h"
0014 #include "ewstypes.h"
0015 
0016 class EwsGetStreamingEventsRequest : public EwsEventRequestBase
0017 {
0018     Q_OBJECT
0019 public:
0020     EwsGetStreamingEventsRequest(EwsClient &client, QObject *parent);
0021     ~EwsGetStreamingEventsRequest() override;
0022 
0023     void setTimeout(uint timeout)
0024     {
0025         mTimeout = timeout;
0026     }
0027 
0028     void start() override;
0029 public Q_SLOTS:
0030     void eventsProcessed(const EwsEventRequestBase::Response &response);
0031 Q_SIGNALS:
0032     void eventsReceived(KJob *job);
0033 protected Q_SLOTS:
0034     void requestData(KIO::Job *job, const QByteArray &data) override;
0035     void requestDataTimeout();
0036 
0037 protected:
0038     uint mTimeout;
0039     QTimer mRespTimer;
0040 };