KItinerary::File
Classes |
Public Types |
Public Member Functions |
Static Public Member Functions |
List of all members
KItinerary::File Class Reference
#include <file.h>
Classes | |
struct | PkPassIdentifier |
Public Types | |
enum | OpenMode { Read , Write } |
Public Member Functions | |
File (const File &)=delete | |
File (const QString &fileName) | |
File (File &&) noexcept | |
File (QIODevice *device) | |
void | addCustomData (QStringView scope, const QString &id, const QByteArray &data) |
void | addDocument (const QString &id, const QVariant &docInfo, const QByteArray &docData) |
void | addPass (const QString &passId, const QByteArray &rawData) |
void | addPass (KPkPass::Pass *pass, const QByteArray &rawData) |
void | addReservation (const QString &id, const QVariant &res) |
void | addReservation (const QVariant &res) |
void | close () |
QByteArray | customData (QStringView scope, const QString &id) const |
QByteArray | documentData (const QString &id) const |
QVariant | documentInfo (const QString &id) const |
QList< QString > | documents () const |
QString | errorString () const |
bool | hasCustomData (QStringView scope, const QString &id) const |
QList< QString > | listCustomData (QStringView scope) const |
bool | open (OpenMode mode) const |
File & | operator= (const File &)=delete |
File & | operator= (File &&) noexcept |
QByteArray | passData (const QString &passId) const |
QList< QString > | passes () const |
QVariant | reservation (const QString &resId) const |
QList< QString > | reservations () const |
void | setFileName (const QString &fileName) |
Static Public Member Functions | |
static PkPassIdentifier | decodePassId (QStringView) |
static QString | normalizeDocumentFileName (const QString &name) |
static QString | passId (const KPkPass::Pass *pass) |
static QString | passId (const QString &passTypeIdenfier, const QString &serialNumber) |
Detailed Description
A file containing a bundle of reservations and associated documents.
This is used to export or transfer a set of reservation-related documents while keeping the associations between them.
A KItinerary::File can contain the following elements:
- JSON-LD reservation objects (see KItinerary::Reservation). Each reservation has a UUID.
- PkPass files. Their identifier is determined by their pass type identifier and their serial number.
- JSON-LD document objects (see KItinerary::CreativeWork) and their associated file content. Each document has a UUID.
- Application-specific data in custom namespaces.
Member Enumeration Documentation
◆ OpenMode
Constructor & Destructor Documentation
◆ File() [1/3]
◆ File() [2/3]
|
explicit |
◆ File() [3/3]
|
explicit |
◆ ~File()
Member Function Documentation
◆ addCustomData()
void File::addCustomData | ( | QStringView | scope, |
const QString & | id, | ||
const QByteArray & | data ) |
◆ addDocument()
void File::addDocument | ( | const QString & | id, |
const QVariant & | docInfo, | ||
const QByteArray & | docData ) |
◆ addPass() [1/2]
void File::addPass | ( | const QString & | passId, |
const QByteArray & | rawData ) |
◆ addPass() [2/2]
void File::addPass | ( | KPkPass::Pass * | pass, |
const QByteArray & | rawData ) |
◆ addReservation() [1/2]
◆ addReservation() [2/2]
void File::addReservation | ( | const QVariant & | res | ) |
◆ close()
void File::close | ( | ) |
◆ customData()
|
nodiscard |
◆ decodePassId()
|
staticnodiscard |
◆ documentData()
|
nodiscard |
◆ documentInfo()
◆ documents()
◆ errorString()
|
nodiscard |
◆ hasCustomData()
|
nodiscard |
◆ listCustomData()
|
nodiscard |
◆ normalizeDocumentFileName()
◆ open()
|
nodiscard |
◆ passData()
|
nodiscard |
◆ passes()
◆ passId() [1/2]
|
staticnodiscard |
◆ passId() [2/2]
◆ reservation()
◆ reservations()
◆ setFileName()
void File::setFileName | ( | const QString & | fileName | ) |
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:52:37 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:52:37 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.