KWeatherCore

pendingalerts.h
1 /*
2  * SPDX-FileCopyrightText: 2021 Han Young <[email protected]>
3  *
4  * SPDX-License-Identifier: LGPL-2.0-or-later
5  */
6 #include "feedparser.h"
7 #include "kweathercore/kweathercore_export.h"
8 #include <QJsonDocument>
9 #include <QObject>
10 class QNetworkReply;
11 namespace KWeatherCore
12 {
13 class PendingAlertsPrivate;
14 using AlertEntries = std::shared_ptr<std::vector<std::unique_ptr<AlertFeedEntry>>>;
15 /**
16  * @short The PendingAlerts class contains the reply to an asynchronous
17  * CAP feed request.
18  *
19  * @see AlertFeedEntry
20  *
21  * @author Han Young <[email protected]>
22  */
23 class KWEATHERCORE_EXPORT PendingAlerts : public QObject
24 {
25  Q_OBJECT
26 public:
27  /**
28  * value pointer to the shared alerts data
29  * the pointer is nullptr until finished() raised
30  * @return
31  */
32  AlertEntries value() const;
33  /**
34  * isFinished if the call has finished
35  * @return
36  */
37  bool isFinished() const;
38 Q_SIGNALS:
39  /**
40  * signals the call has finished
41  */
42  void finished();
43  /**
44  * indicate there is a network error
45  */
46  void networkError();
47 
48 protected:
49  friend class AlertManager;
50  explicit PendingAlerts(const QJsonDocument &config, QNetworkReply *reply = nullptr);
51 
52 private:
53  PendingAlertsPrivate *d = nullptr;
54 };
55 }
The AlertManager class is intened to get pending weather alerts about a location. ...
Definition: alertmanager.h:23
The PendingAlerts class contains the reply to an asynchronous CAP feed request.
Definition: pendingalerts.h:23
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Oct 21 2021 23:05:33 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.