File indexing completed on 2024-12-29 04:50:02

0001 /*
0002    SPDX-FileCopyrightText: 2017 Volker Krause <vkrause@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "kitinerary_export.h"
0010 #include "countrydb.h"
0011 #include "iatacode.h"
0012 #include "knowledgedb.h"
0013 
0014 class QString;
0015 class QTimeZone;
0016 
0017 namespace KItinerary {
0018 namespace KnowledgeDb {
0019 
0020 /** Airport information structure as used in the database.
0021  *  @internal
0022  */
0023 struct Airport {
0024     IataCode iataCode;
0025     CountryId country;
0026     Coordinate coordinate;
0027 };
0028 
0029 /** Returns the geographical coordinates the airport with IATA code @p iataCode is in. */
0030 KITINERARY_EXPORT Coordinate coordinateForAirport(IataCode iataCode);
0031 
0032 /** Returns the timezone the airport with IATA code @p iataCode is in. */
0033 KITINERARY_EXPORT QTimeZone timezoneForAirport(IataCode iataCode);
0034 
0035 /** Returns the country the airport with IATA code @p iataCode is in. */
0036 KITINERARY_EXPORT CountryId countryForAirport(IataCode iataCode);
0037 
0038 /** Returns all possible IATA code candidates for the given airport name. */
0039 KITINERARY_EXPORT std::vector<IataCode> iataCodesFromName(QStringView name);
0040 }
0041 
0042 }
0043