KWeatherCore

alertmanager.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 "kweathercore/kweathercore_export.h"
8 #include <QList>
9 #include <QObject>
10 #include <memory>
12 namespace KWeatherCore
13 {
14 class PendingAlerts;
15 /**
16  * @short The AlertManager class is intened to get pending weather
17  * alerts about a location
18  *
19  * @see Pendingalerts
20  *
21  * @author Nikunj Goyal <[email protected]>
22  */
23 class KWEATHERCORE_EXPORT AlertManager
24 {
25 public:
26  /** inst
27  * return a pointer to the global instance
28  * @return
29  */
30  static AlertManager *inst();
31  ~AlertManager();
32  AlertManager(const AlertManager &other);
33  /** availableCountries
34  * @return names of all available countries supported
35  */
36  QList<QString> availableCountries() const;
37  /** getAlerts
38  * @param country country for which alerts have to be received
39  * @return it is the client's responsibility to delete the
40  * PendingAlerts afterhand to avoid memory leak
41  */
42  PendingAlerts *getAlerts(const QString &country) const;
43  AlertManager &operator=(const AlertManager &other);
44  AlertManager &operator=(AlertManager &&other);
45 
46 private:
47  AlertManager();
48  class AlertManagerPrivate;
49  std::unique_ptr<AlertManagerPrivate> d;
50  void loadConfigs();
51 };
52 }
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.