KPublicTransport

backend.h
1/*
2 SPDX-FileCopyrightText: 2019 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef KPUBLICTRANSPORT_BACKEND_H
8#define KPUBLICTRANSPORT_BACKEND_H
9
10#include "kpublictransport_export.h"
11#include "coveragearea.h"
12#include "datatypes.h"
13
14namespace KPublicTransport {
15
16class BackendPrivate;
17
18/** Information about a backend service queried for location/departure/journey data.
19 * This is used to let the user (API user or end user) determine which backends to query.
20 */
21class KPUBLICTRANSPORT_EXPORT Backend
22{
23 KPUBLICTRANSPORT_GADGET(Backend)
24 /** Internal identifier of this backend.
25 * Not intended for display, use for storing per-backend settings for example.
26 */
27 Q_PROPERTY(QString identifier READ identifier)
28 /** Short, humand readable name of the backend. Typically the company providing the service */
29 Q_PROPERTY(QString name READ name)
30 /** Humand readable description of this backend. */
31 Q_PROPERTY(QString description READ description)
32 /** Supports secrure network access.
33 * Yes, even in 2019 that is unfortunately not guaranteed.
34 */
35 Q_PROPERTY(bool isSecure READ isSecure)
36
37public:
38 QString identifier() const;
39 QString name() const;
40 QString description() const;
41 bool isSecure() const;
42
43 Q_INVOKABLE KPublicTransport::CoverageArea coverageArea(KPublicTransport::CoverageArea::Type coverageType) const;
44};
45
46}
47
48Q_DECLARE_METATYPE(KPublicTransport::Backend)
49
50#endif // KPUBLICTRANSPORT_BACKEND_H
Information about a backend service queried for location/departure/journey data.
Definition backend.h:22
Describes the area a specific KPublicTransport::Backend can provide information for.
Query operations and data types for accessing realtime public transport information from online servi...
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:57:19 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.