KPublicTransport

backend.h
1 /*
2  SPDX-FileCopyrightText: 2019 Volker Krause <[email protected]>
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 
14 namespace KPublicTransport {
15 
16 class 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  */
21 class 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 
37 public:
38  QString identifier() const;
39  QString name() const;
40  QString description() const;
41  bool isSecure() const;
42 
43  CoverageArea coverageArea(CoverageArea::Type coverageType) const;
44 };
45 
46 }
47 
48 Q_DECLARE_METATYPE(KPublicTransport::Backend)
49 
50 #endif // KPUBLICTRANSPORT_BACKEND_H
Describes the area a specific KPublicTransport::Backend can provide information for.
Definition: coveragearea.h:22
Information about a backend service queried for location/departure/journey data.
Definition: backend.h:21
Query operations and data types for accessing realtime public transport information from online servi...
Definition: attribution.cpp:16
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Oct 23 2021 23:05:20 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.