Commit 46fe5a68 authored by Volker Krause's avatar Volker Krause
Browse files

Remove explicit UIC 918.3 and VDV parsing API from the JS interface

This has become obsolete now that those are always present in the extractor
document tree and thus no longer need to be created manually.
parent 0a9aecfe
Pipeline #75956 passed with stage
in 13 minutes and 16 seconds
......@@ -10,9 +10,6 @@
#include <pdf/pdfbarcodeutil_p.h>
#include <KItinerary/PdfDocument>
#include <KItinerary/Uic9183Parser>
#include <KItinerary/VdvTicket>
#include <KItinerary/VdvTicketParser>
#include <QImage>
......@@ -80,25 +77,6 @@ QString JsApi::Barcode::decodeBarcode(const QVariant &img, BarcodeDecoder::Barco
return {};
}
QVariant JsApi::Barcode::decodeUic9183(const QVariant &s) const
{
Uic9183Parser p;
p.parse(s.toByteArray());
if (!p.isValid()) {
return {};
}
return QVariant::fromValue(p);
}
QVariant JsApi::Barcode::decodeVdvTicket(const QVariant &s) const
{
VdvTicketParser p;
if (!p.parse(s.toByteArray())) {
return {};
}
return QVariant::fromValue(p.ticket());
}
QVariant JsApi::Barcode::decodeEraSsbTicket(const QVariant &s, int versionOverride) const
{
return SSBTicketReader::read(s.toByteArray(), versionOverride);
......
......@@ -50,16 +50,6 @@ public:
*/
Q_INVOKABLE QString decodeAnyBarcode(const QVariant &img) const;
/** Decode an UIC 918.3 message from a train ticket Aztec code.
* @param s A QByteArray containing the raw data from the barcode.
* @returns An instance of Uic9183Parser.
*/
Q_INVOKABLE QVariant decodeUic9183(const QVariant &s) const;
/** Decode an VDV ticket barcode.
* @param s A QByteArray containing the raw VDV barcode data.
* @returns An instance of VdvTicket.
*/
Q_INVOKABLE QVariant decodeVdvTicket(const QVariant &s) const;
/** Decode an ERA SSB ticket barcode.
* @param s A QByteArray containing the raw ERA SSB barcode data.
* @param versionOverride Override version auto-detection. Useful for tickets that are known to
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment