KWeatherCore

capparser.h
1/*
2 * SPDX-FileCopyrightText: 2021 Anjani Kumar <anjanik012@gmail.com>
3 * SPDX-FileCopyrightText: 2021 Han Young <hanyoung@protonmail.com>
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7#pragma once
8
9#include <kweathercore/kweathercore_export.h>
10
11#include <QXmlStreamReader>
12
13namespace KWeatherCore
14{
15class CAPAlertInfo;
16class CAPAlertMessage;
17class CAPArea;
18class CAPNamedValue;
19class CAPReference;
20
21/**
22 * Parser for CAP Alert Messages
23 *
24 * @see https://docs.oasis-open.org/emergency/cap/v1.2/CAP-v1.2.html
25 */
26class KWEATHERCORE_EXPORT CAPParser
27{
28public:
29 explicit CAPParser(const QByteArray &data);
30 CAPAlertMessage parse();
31
32private:
33 CAPAlertInfo parseInfo();
34 CAPArea parseArea();
35 CAPNamedValue parseNamedValue();
36 std::vector<CAPReference> parseReferences(const QString &refsString);
37 QXmlStreamReader m_xml;
38};
39}
Represents a single CAP alert message info element.
Represents a single CAP Alert Message.
Affected area of a CAP alert message.
Definition caparea.h:53
CAP key/value pairs as found in area geo codes, alert event codes or alert parameters.
Parser for CAP Alert Messages.
Definition capparser.h:27
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:55:53 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.