File indexing completed on 2024-04-28 04:42:43
0001 /* 0002 * SPDX-FileCopyrightText: 2021 Han Young <hanyoung@protonmail.com> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 #pragma once 0007 0008 #include "reply.h" 0009 0010 class QNetworkReply; 0011 0012 namespace KWeatherCore 0013 { 0014 class CAPAlertMessage; 0015 class PendingCAPPrivate; 0016 /** 0017 * @short The PendingAlerts class contains the reply to an asynchronous 0018 * CAP request. 0019 * 0020 * @see AlertEntry 0021 * 0022 * @author Han Young <hanyoung@protonmail.com> 0023 */ 0024 class KWEATHERCORE_EXPORT PendingCAP : public Reply 0025 { 0026 Q_OBJECT 0027 public: 0028 ~PendingCAP() override; 0029 0030 /** 0031 * value pointer to the shared alerts data 0032 * the pointer is nullptr until finished() raised 0033 * @return 0034 */ 0035 CAPAlertMessage value() const; 0036 0037 private: 0038 friend class AlertFeedEntry; 0039 explicit PendingCAP(QNetworkReply *reply, QObject *parent = nullptr); 0040 Q_DECLARE_PRIVATE(PendingCAP) 0041 }; 0042 }