File indexing completed on 2024-11-24 04:44:41
0001 /* 0002 * SPDX-FileCopyrightText: 2021 Volker Krause <vkrause@kde.org> 0003 * SPDX-License-Identifier: LGPL-2.0-or-later 0004 */ 0005 0006 #ifndef KRECOVERYCERTIFICATE_H 0007 #define KRECOVERYCERTIFICATE_H 0008 0009 #include "khealthcertificate_export.h" 0010 #include "khealthcertificatetypes.h" 0011 0012 #include <QDate> 0013 0014 class KRecoveryCertificatePrivate; 0015 0016 /** A recovery certificate. */ 0017 class KHEALTHCERTIFICATE_EXPORT KRecoveryCertificate 0018 { 0019 KHEALTHCERTIFICATE_GADGET(Recovery) 0020 KHEALTHCERTIFICATE_PROPERTY(QString, name, setName) 0021 KHEALTHCERTIFICATE_PROPERTY(QDate, dateOfBirth, setDateOfBirth) 0022 KHEALTHCERTIFICATE_PROPERTY(QDate, dateOfPositiveTest, setDateOfPositiveTest) 0023 KHEALTHCERTIFICATE_PROPERTY(QDate, validFrom, setValidFrom) 0024 KHEALTHCERTIFICATE_PROPERTY(QDate, validUntil, setValidUntil) 0025 KHEALTHCERTIFICATE_PROPERTY(QString, disease, setDisease) 0026 /** The entity that issued this certificate. */ 0027 KHEALTHCERTIFICATE_PROPERTY(QString, certificateIssuer, setCertificateIssuer) 0028 /** The unique identifier of this certificate. */ 0029 KHEALTHCERTIFICATE_PROPERTY(QString, certificateId, setCertificateId) 0030 /** Date/time this certificate has been issued at. */ 0031 KHEALTHCERTIFICATE_PROPERTY(QDateTime, certificateIssueDate, setCertificateIssueDate) 0032 /** Date/time this certificate expires. */ 0033 KHEALTHCERTIFICATE_PROPERTY(QDateTime, certificateExpiryDate, setCertificateExpiryDate) 0034 /** Validation status of the cryptographic signature of this certificate. */ 0035 KHEALTHCERTIFICATE_PROPERTY(KHealthCertificate::SignatureValidation, signatureState, setSignatureState) 0036 0037 Q_PROPERTY(KHealthCertificate::CertificateValidation validationState READ validationState) 0038 0039 /** Fully encoded data as represented in the barcode. */ 0040 KHEALTHCERTIFICATE_PROPERTY(QByteArray, rawData, setRawData) 0041 public: 0042 KHealthCertificate::CertificateValidation validationState() const; 0043 }; 0044 0045 Q_DECLARE_METATYPE(KRecoveryCertificate) 0046 0047 #endif // KRECOVERYCERTIFICATE_H