File indexing completed on 2024-05-12 04:42:46
0001 /* 0002 SPDX-FileCopyrightText: 2020 Volker Krause <vkrause@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef KPUBLICTRANSPORT_GBFSBACKEND_H 0008 #define KPUBLICTRANSPORT_GBFSBACKEND_H 0009 0010 #include <backends/abstractbackend.h> 0011 0012 namespace KPublicTransport { 0013 0014 /** Generic GBFS backend. 0015 * This only supports "location" searches, which is the way to find docks and floating vehicles. 0016 */ 0017 class GBFSBackend : public AbstractBackend 0018 { 0019 Q_GADGET 0020 public: 0021 explicit GBFSBackend(); 0022 ~GBFSBackend() override; 0023 0024 static inline constexpr const char* type() { return "gbfs"; } 0025 Capabilities capabilities() const override; 0026 bool queryLocation(const LocationRequest &req, LocationReply *reply, QNetworkAccessManager *nam) const override; 0027 0028 private: 0029 }; 0030 0031 } 0032 0033 #endif // KPUBLICTRANSPORT_GBFSBACKEND_H