KWeatherCore

alertmanager.h
1/*
2 * SPDX-FileCopyrightText: 2021 Han Young <hanyoung@protonmail.com>
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>
12namespace KWeatherCore
13{
14class 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 <nikunjgoyal31@gmail.com>
22 */
23class KWEATHERCORE_EXPORT AlertManager
24{
25public:
26 /** inst
27 * return a pointer to the global instance
28 * @return
29 */
30 static AlertManager *inst();
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
46private:
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.
The PendingAlerts class contains the reply to an asynchronous CAP feed request.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 24 2024 12:02:06 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.