KWeatherCore

pendingalerts.h
1/*
2 * SPDX-FileCopyrightText: 2021 Han Young <hanyoung@protonmail.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7#ifndef KWEATHERCORE_PENDINGALERTS_H
8#define KWEATHERCORE_PENDINGALERTS_H
9
10#include "feedparser.h"
11#include "reply.h"
12
13class QJsonDocument;
14class QNetworkReply;
15
16namespace KWeatherCore
17{
18class PendingAlertsPrivate;
19using AlertEntries = std::shared_ptr<std::vector<std::unique_ptr<AlertFeedEntry>>>;
20/**
21 * @short The PendingAlerts class contains the reply to an asynchronous
22 * CAP feed request.
23 *
24 * @see AlertFeedEntry
25 *
26 * @author Han Young <hanyoung@protonmail.com>
27 */
28class KWEATHERCORE_EXPORT PendingAlerts : public Reply
29{
30 Q_OBJECT
31public:
32 ~PendingAlerts() override;
33
34 /**
35 * value pointer to the shared alerts data
36 * the pointer is nullptr until finished() raised
37 * @return
38 */
39 AlertEntries value() const;
40
41private:
42 friend class AlertManager;
43 explicit PendingAlerts(const QJsonDocument &config, QNetworkReply *reply, QObject *parent = nullptr);
44 Q_DECLARE_PRIVATE(PendingAlerts)
45};
46}
47
48#endif
The AlertManager class is intened to get pending weather alerts about a location.
The PendingAlerts class contains the reply to an asynchronous CAP feed request.
Base class for all asynchronous jobs.
Definition reply.h:24
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:42 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.