File indexing completed on 2024-11-24 04:45:11

0001 /*
0002     SPDX-FileCopyrightText: 2018 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 
0011 #include <QDateTime>
0012 #include <QList>
0013 
0014 #include <memory>
0015 
0016 class QString;
0017 class QVariant;
0018 
0019 namespace KItinerary {
0020 
0021 class IataBcbp;
0022 
0023 /**
0024  *  Parser for IATA Bar Coded Boarding Pass messages.
0025  *  @see https://www.iata.org/whatwedo/stb/Documents/BCBP-Implementation-Guide-5th-Edition-June-2016.pdf
0026  */
0027 namespace IataBcbpParser
0028 {
0029 /** Parses the bar coded boarding pass message @p message into
0030  *  a list of FlightReservation instances.
0031  *  @param message The message.
0032  *  @param externalIssueDate The date the boarding pass was issued (or a sufficiently close approximation).
0033  *  This is necessary as by default the BCBP data only contains day and month of the flight, not the year.
0034  */
0035 QList<QVariant> parse(const QString &message,
0036                       const QDateTime &externalIssueDateTime = QDateTime());
0037 KITINERARY_EXPORT QList<QVariant> parse(const IataBcbp &bcbp,
0038                                         const QDateTime &contextDate);
0039 }
0040 
0041 }
0042