KWeatherCore

pendingcap.h
1 /*
2  * SPDX-FileCopyrightText: 2021 Han Young <[email protected]>
3  *
4  * SPDX-License-Identifier: LGPL-2.0-or-later
5  */
6 #pragma once
7 #include "alertentry.h"
8 #include "kweathercore/kweathercore_export.h"
9 #include <QObject>
10 #include <memory>
11 class QNetworkReply;
12 namespace KWeatherCore
13 {
14 class PendingCAPPrivate;
15 /**
16  * @short The PendingAlerts class contains the reply to an asynchronous
17  * CAP request.
18  *
19  * @see AlertEntry
20  *
21  * @author Han Young <[email protected]>
22  */
23 class KWEATHERCORE_EXPORT PendingCAP : 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  std::unique_ptr<AlertEntry> 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 AlertFeedEntry;
50  explicit PendingCAP(QNetworkReply *reply = nullptr);
51 
52 private:
53  PendingCAPPrivate *d = nullptr;
54 };
55 }
The PendingAlerts class contains the reply to an asynchronous CAP request.
Definition: pendingcap.h:23
Class represents single CAP.
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.