KHealthCertificate

kvaccinationcertificate.h
1 /*
2  * SPDX-FileCopyrightText: 2021 Volker Krause <[email protected]>
3  * SPDX-License-Identifier: LGPL-2.0-or-later
4  */
5 
6 #ifndef KVACCINATIONCERTIFICATE_H
7 #define KVACCINATIONCERTIFICATE_H
8 
9 #include "khealthcertificate_export.h"
10 #include "khealthcertificatetypes.h"
11 
12 #include <QDateTime>
13 #include <QUrl>
14 
15 class KVaccinationCertificatePrivate;
16 
17 /** A vaccination certificate. */
18 class KHEALTHCERTIFICATE_EXPORT KVaccinationCertificate
19 {
20  KHEALTHCERTIFICATE_GADGET(Vaccination)
21  KHEALTHCERTIFICATE_PROPERTY(QString, name, setName)
22  KHEALTHCERTIFICATE_PROPERTY(QDate, dateOfBirth, setDateOfBirth)
23  KHEALTHCERTIFICATE_PROPERTY(QDate, date, setDate)
24  KHEALTHCERTIFICATE_PROPERTY(QString, disease, setDisease)
25  /** The vaccine type, such as mRNA or vector. */
26  KHEALTHCERTIFICATE_PROPERTY(QString, vaccineType, setVaccineType)
27  /** The name of the vaccine as given by the manufacturer. */
28  KHEALTHCERTIFICATE_PROPERTY(QString, vaccine, setVaccine)
29  /** URL to further details on the vaccine. */
30  KHEALTHCERTIFICATE_PROPERTY(QUrl, vaccineUrl, setVaccineUrl)
31  /** Name of the manufacturer of the vaccine. */
32  KHEALTHCERTIFICATE_PROPERTY(QString, manufacturer, setManufacturer)
33  KHEALTHCERTIFICATE_PROPERTY(int, dose, setDose)
34  KHEALTHCERTIFICATE_PROPERTY(int, totalDoses, setTotalDoses)
35  KHEALTHCERTIFICATE_PROPERTY(QString, country, setCountry)
36  /** The entity that issued this certificate. */
37  KHEALTHCERTIFICATE_PROPERTY(QString, certificateIssuer, setCertificateIssuer)
38  /** The unique identifier of this certificate. */
39  KHEALTHCERTIFICATE_PROPERTY(QString, certificateId, setCertificateId)
40  /** Date/time this certificate has been issued at. */
41  KHEALTHCERTIFICATE_PROPERTY(QDateTime, certificateIssueDate, setCertificateIssueDate)
42  /** Date/time this certificate expires. */
43  KHEALTHCERTIFICATE_PROPERTY(QDateTime, certificateExpiryDate, setCertificateExpiryDate)
44  /** Validation status of the cryptographic signature of this certificate. */
45  KHEALTHCERTIFICATE_PROPERTY(KHealthCertificate::SignatureValidation, signatureState, setSignatureState)
46 
47  Q_PROPERTY(KHealthCertificate::CertificateValidation validationState READ validationState)
48 
49  /** Fully encoded data as represented in the barcode. */
50  KHEALTHCERTIFICATE_PROPERTY(QByteArray, rawData, setRawData)
51 public:
52  KHealthCertificate::CertificateValidation validationState() const;
53 };
54 
55 Q_DECLARE_METATYPE(KVaccinationCertificate)
56 
57 #endif // KVACCINATIONCERTIFICATE_H
Dummy RTTI for QML, which doesn&#39;t support instanceof on Q_GADGETs...
SignatureValidation
Result of attempting to verify the cryptographic signature of a certificate.
A vaccination certificate.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Oct 18 2021 23:21:56 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.