KItinerary
ticket-barcode-dump.cpp
59 std::cout << indent << prop.name() << ": " << prop.enumerator().valueToKey(value.toInt()) << std::endl;
67 } else if (value.canConvert<QVariantList>() && value.userType() != QMetaType::QString && value.userType() != QMetaType::QByteArray) {
94 if (std::strncmp(prop.name(), "type", 4) == 0 && std::strncmp(prop.name(), typePrefix.constData(), 5) != 0) {
103 std::cout << "Issuing day: " << qPrintable(ticket.issueDate().toString(Qt::ISODate)) << std::endl;
106 std::cout << "Departure day: " << qPrintable(ticket.type1DepartureDay().toString(Qt::ISODate)) << std::endl;
109 std::cout << "Valid from: " << qPrintable(ticket.type2ValidFrom().toString(Qt::ISODate)) << std::endl;
110 std::cout << "Valid until: " << qPrintable(ticket.type2ValidUntil().toString(Qt::ISODate)) << std::endl;
129 std::cout << "First day of validitiy: " << qPrintable(ticket.firstDayOfValidity().toString(Qt::ISODate)) << std::endl;
130 std::cout << "Departure time: " << qPrintable(ticket.departureTime().toString(Qt::ISODate)) << std::endl;
136 std::cout << " Departure date: " << qPrintable(segment.departureDate().toString(Qt::ISODate)) << std::endl;
150 std::cout << "Emission date: " << qPrintable(ticket.emissionDate().toString(Qt::ISODate)) << std::endl;
151 std::cout << "Valid from: " << qPrintable(ticket.validFromDate().toString(Qt::ISODate)) << std::endl;
152 std::cout << "Valid until: " << qPrintable(ticket.validUntilDate().toString(Qt::ISODate)) << std::endl;
227 std::cout << " payload: (hex) " << QByteArray((const char*)&ticket->validityArea + sizeof(VdvTicketValidityAreaData), ticket->validityAreaDataSize - sizeof(VdvTicketValidityAreaData)).toHex().constData() << std::endl;
250 std::cout << " Tag: 0x" << std::hex << block.type() << std::dec << " size: " << block.size() << std::endl;
259 std::cout << " name: " << qPrintable(QString::fromUtf8(traveler->name(), traveler->nameSize(block.contentSize()))) << std::endl;
271 std::cout << " payload: (hex) " << QByteArray((const char*)block.contentData() + sizeof(VdvTicketValidityAreaDataType31), block.contentSize() - sizeof(VdvTicketValidityAreaDataType31)).toHex().constData() << std::endl;
276 std::cout << " payload: (hex) " << QByteArray((const char*)block.contentData() + sizeof(VdvTicketValidityAreaData), block.contentSize() - sizeof(VdvTicketValidityAreaData)).toHex().constData() << std::endl;
282 std::cout << " (hex) " << QByteArray((const char*)block.contentData(), block.contentSize()).toHex().constData() << std::endl;
288 std::cout << " Product-specific transaction data (" << ticket.productSpecificTransactionData().contentSize() << " bytes):" << std::endl;
289 for (auto block = ticket.productSpecificTransactionData().first(); block.isValid(); block = block.next()) {
293 std::cout << " (hex) " << QByteArray((const char*)block.contentData(), block.contentSize()).toHex().constData() << std::endl;
328 std::cout << " Date of flight: " << qPrintable(rms.dateOfFlight(issueDate.isValid() ? QDateTime(issueDate, {}) : contextDate).toString(Qt::ISODate)) << std::endl;
350 QCommandLineOption contextDateOpt(QStringLiteral("context-date"), QStringLiteral("Context to resolve incomplete dates."), QStringLiteral("yyyy-MM-dd"));
352 parser.addPositionalArgument(QStringLiteral("input"), QStringLiteral("File to read data from, omit for using stdin."));
Top-level type for the ERA FCB ticket structure.
Definition fcbticket.h:1005
static bool maybeIataBcbp(const QByteArray &data)
Fast checks whether this might be an IATA BCBP.
Definition iatabcbp.cpp:146
static bool maybeSSB(const QByteArray &data)
Returns true if data might be an ERA SSB ticket.
Definition ssbv1ticket.cpp:39
static bool maybeSSB(const QByteArray &data)
Returns true if data might be an ERA SSB ticket.
Definition ssbv2ticket.cpp:47
static bool maybeSSB(const QByteArray &data)
Returns true if data might be an ERA SSB ticket.
Definition ssbv3ticket.cpp:50
bool isNull() const
Checks if the block is valid or empty/default constructed.
Definition uic9183block.cpp:91
Parser for UIC 918.3 and 918.3* train tickets.
Definition uic9183parser.h:38
static bool maybeUic9183(const QByteArray &data)
Quickly checks if might be UIC 918.3 content.
Definition uic9183parser.cpp:697
Uic9183Header header() const
Header found before the compressed payload.
Definition uic9183parser.cpp:687
Parser for a U_TLAY block in a UIC 918-3 ticket container, such as a ERA TLB ticket.
Definition uic9183ticketlayout.h:64
Product specific data - basic information.
Definition vdvticketcontent.h:46
bool parse(const QByteArray &data)
Tries to parse the ticket in data.
Definition vdvticketparser.cpp:23
static bool maybeVdvTicket(const QByteArray &data)
Fast check if data might contain a VDV ticket.
Definition vdvticketparser.cpp:81
Product specific data - traveler information.
Definition vdvticketcontent.h:66
Ticket validity area data block.
Definition vdvticketcontent.h:87
UIC 918.3 0080VU vendor data block (DB local public transport extensions).
Definition vendor0080block.h:105
Classes for reservation/travel data models, data extraction and data augmentation.
Definition berelement.h:17
const char * constData() const const
QByteArray number(double n, char format, int precision)
QByteArray toHex(char separator) const const
QCommandLineOption addHelpOption()
bool addOption(const QCommandLineOption &option)
void addPositionalArgument(const QString &name, const QString &description, const QString &syntax)
QCommandLineOption addVersionOption()
bool isSet(const QCommandLineOption &option) const const
QStringList positionalArguments() const const
void process(const QCoreApplication &app)
void setApplicationDescription(const QString &description)
QString value(const QCommandLineOption &option) const const
void setApplicationName(const QString &application)
void setApplicationVersion(const QString &version)
void setOrganizationDomain(const QString &orgDomain)
void setOrganizationName(const QString &orgName)
QDate currentDate()
QDate fromString(QStringView string, QStringView format, QCalendar cal)
QString toString(QStringView format, QCalendar cal) const const
bool open(FILE *fh, OpenMode mode, FileHandleFlags handleFlags)
void setFileName(const QString &name)
QString errorString() const const
QByteArray readAll()
ReadOnly
const_reference at(qsizetype i) const const
bool isEmpty() const const
QMetaProperty property(int index) const const
int propertyCount() const const
QVariant readOnGadget(const void *gadget) const const
QString
const QMetaObject * metaObject() const const
QString fromUtf8(QByteArrayView str)
ISODate
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:28:48 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:28:48 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.