Commit a78b3da4 authored by Volker Krause's avatar Volker Krause
Browse files

Add support for updating pkpass files from their corresponding web service

parent 34590459
......@@ -314,6 +314,16 @@ QDateTime Pass::relevantDate() const
return QDateTime::fromString(d->passObj.value(QLatin1String("relevantDate")).toString(), Qt::ISODate);
}
QString Pass::authenticationToken() const
{
return d->passObj.value(QLatin1String("authenticationToken")).toString();
}
QString Pass::webServiceUrl() const
{
return d->passObj.value(QLatin1String("webServiceURL")).toString();
}
QVector<Barcode> Pass::barcodes() const
{
QVector<Barcode> codes;
......
......@@ -58,6 +58,9 @@ class KPKPASS_EXPORT Pass : public QObject
Q_PROPERTY(QString logoText READ logoText CONSTANT)
Q_PROPERTY(QDateTime relevantDate READ relevantDate CONSTANT)
Q_PROPERTY(QString authenticationToken READ authenticationToken CONSTANT)
Q_PROPERTY(QString webServiceUrl READ webServiceUrl CONSTANT)
// needs to be QVariantList just for QML (Grantlee would also work with QVector<Field>
Q_PROPERTY(QVariantList auxiliaryFields READ auxiliaryFieldsVariant CONSTANT)
Q_PROPERTY(QVariantList backFields READ backFieldsVariant CONSTANT)
......@@ -91,6 +94,9 @@ public:
QImage logo(unsigned int devicePixelRatio = 1) const;
QDateTime relevantDate() const;
QString authenticationToken() const;
QString webServiceUrl() const;
QVector<Field> auxiliaryFields() const;
QVector<Field> backFields() const;
QVector<Field> headerFields() const;
......
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