KHealthCertificate

ktestcertificate.h
1 /*
2  * SPDX-FileCopyrightText: 2021 Volker Krause <[email protected]>
3  * SPDX-License-Identifier: LGPL-2.0-or-later
4  */
5 
6 #ifndef KTESTCERTIFICATE_H
7 #define KTESTCERTIFICATE_H
8 
9 #include "khealthcertificate_export.h"
10 #include "khealthcertificatetypes.h"
11 
12 #include <QDate>
13 #include <QUrl>
14 
15 class KTestCertificatePrivate;
16 
17 /** A test certificate. */
18 class KHEALTHCERTIFICATE_EXPORT KTestCertificate
19 {
20  KHEALTHCERTIFICATE_GADGET(Test)
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 type of test, such as PCR or antigen. */
26  KHEALTHCERTIFICATE_PROPERTY(QString, testType, setTestType)
27  /** The test manufacturer/product used. */
28  KHEALTHCERTIFICATE_PROPERTY(QString, testName, setTestName)
29  /** URL pointing to further information about the test product. */
30  KHEALTHCERTIFICATE_PROPERTY(QUrl, testUrl, setTestUrl)
31  KHEALTHCERTIFICATE_PROPERTY(QString, resultString, setResultString)
32  KHEALTHCERTIFICATE_PROPERTY(QString, testCenter, setTestCenter)
33  KHEALTHCERTIFICATE_PROPERTY(QString, country, setCountry)
34  /** The entity that issued this certificate. */
35  KHEALTHCERTIFICATE_PROPERTY(QString, certificateIssuer, setCertificateIssuer)
36  /** The unique identifier of this certificate. */
37  KHEALTHCERTIFICATE_PROPERTY(QString, certificateId, setCertificateId)
38  /** Date/time this certificate has been issued at. */
39  KHEALTHCERTIFICATE_PROPERTY(QDateTime, certificateIssueDate, setCertificateIssueDate)
40  /** Date/time this certificate expires. */
41  KHEALTHCERTIFICATE_PROPERTY(QDateTime, certificateExpiryDate, setCertificateExpiryDate)
42  /** Validation status of the cryptographic signature of this certificate. */
43  KHEALTHCERTIFICATE_PROPERTY(KHealthCertificate::SignatureValidation, signatureState, setSignatureState)
44 
45  Q_PROPERTY(KHealthCertificate::CertificateValidation validationState READ validationState)
46 
47  enum Result {
48  Unknown,
49  Negative,
50  Positive,
51  };
52  Q_ENUM(Result)
53  KHEALTHCERTIFICATE_PROPERTY(Result, result, setResult)
54 
55  /** Fully encoded data as represented in the barcode. */
56  KHEALTHCERTIFICATE_PROPERTY(QByteArray, rawData, setRawData)
57 public:
58  KHealthCertificate::CertificateValidation validationState() const;};
59 
60 Q_DECLARE_METATYPE(KTestCertificate)
61 
62 #endif // KTESTCERTIFICATE_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 test 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.