File indexing completed on 2024-04-28 04:41:40

0001 /*
0002     SPDX-FileCopyrightText: 2018 Volker Krause <vkrause@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef KPUBLICTRANSPORT_REPLY_P_H
0008 #define KPUBLICTRANSPORT_REPLY_P_H
0009 
0010 #include "reply.h"
0011 
0012 #include <KPublicTransport/Attribution>
0013 
0014 #include <QString>
0015 
0016 #include <vector>
0017 
0018 namespace KPublicTransport {
0019 
0020 class ReplyPrivate
0021 {
0022 public:
0023     ReplyPrivate() = default;
0024     ReplyPrivate(const ReplyPrivate&) = delete;
0025     virtual ~ReplyPrivate() = default;
0026     ReplyPrivate& operator=(const ReplyPrivate&) = delete;
0027 
0028     virtual void finalizeResult() = 0;
0029     virtual bool needToWaitForAssets() const;
0030 
0031     void emitUpdated(Reply *q);
0032     void emitFinishedIfDone(Reply *q);
0033 
0034     std::vector<Attribution> attributions;
0035     QString errorMsg;
0036     Reply::Error error = Reply::NoError;
0037     int pendingOps = -1;
0038     bool shouldClearError = false; // if we got valid results from one backend, we ignore errors from others
0039 };
0040 
0041 }
0042 
0043 #endif // KPUBLICTRANSPORT_REPLY_P_H
0044