26
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
34
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
26
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
* Certificate information data structure for EAP QT
|
|
16 |
* configuration interface
|
|
17 |
*
|
|
18 |
*/
|
|
19 |
|
|
20 |
/*
|
34
|
21 |
* %version: 5 %
|
26
|
22 |
*/
|
|
23 |
|
|
24 |
#ifndef EAPQTCERTIFICATEINFO_H
|
|
25 |
#define EAPQTCERTIFICATEINFO_H
|
|
26 |
|
34
|
27 |
// System includes
|
26
|
28 |
#include <QMetaType>
|
|
29 |
#include <QVariant>
|
34
|
30 |
#include <eapqtconfigexport.h>
|
26
|
31 |
|
34
|
32 |
// User includes
|
|
33 |
|
|
34 |
// Forward declarations
|
26
|
35 |
class EapQtCertificateInfoPrivate;
|
|
36 |
|
34
|
37 |
// External data types
|
|
38 |
|
|
39 |
// Constants
|
|
40 |
|
|
41 |
// Class declaration
|
27
|
42 |
class EAP_QT_CONFIG_INTERFACE_EXPORT EapQtCertificateInfo
|
26
|
43 |
{
|
34
|
44 |
|
26
|
45 |
public:
|
|
46 |
|
34
|
47 |
// Data types
|
|
48 |
|
26
|
49 |
enum ItemId
|
|
50 |
{
|
|
51 |
/*! QString */
|
34
|
52 |
SubjectName = 0,
|
26
|
53 |
/*! QString */
|
|
54 |
IssuerName,
|
|
55 |
/*! QString */
|
|
56 |
SerialNumber,
|
|
57 |
/*! QByteArray */
|
|
58 |
SubjectKeyId,
|
|
59 |
/*! QString */
|
|
60 |
ThumbPrint,
|
|
61 |
/*! QString */
|
|
62 |
CertificateLabel,
|
34
|
63 |
/* marker for the last item */
|
26
|
64 |
ItemIdLast
|
|
65 |
};
|
|
66 |
|
34
|
67 |
// default constructor
|
26
|
68 |
EapQtCertificateInfo();
|
34
|
69 |
// destructor
|
26
|
70 |
~EapQtCertificateInfo();
|
|
71 |
|
34
|
72 |
// copy constuctor
|
|
73 |
EapQtCertificateInfo(const EapQtCertificateInfo& certInfo);
|
|
74 |
// assignment
|
|
75 |
EapQtCertificateInfo &operator=(const EapQtCertificateInfo& certInfo);
|
|
76 |
|
|
77 |
// gets the certificate field referred to by an id from ItemId
|
|
78 |
// returns QVariant::Invalid is the field has not been set
|
|
79 |
QVariant value(const ItemId id) const;
|
26
|
80 |
|
34
|
81 |
// sets the certificate field referred to by an id from ItemId
|
|
82 |
// does nothing if newValue >= ItemIdLast
|
|
83 |
void setValue(const ItemId id, const QVariant& newValue) const;
|
26
|
84 |
|
34
|
85 |
// resets the object i.e. any successive call to
|
|
86 |
// value() returns QVariant::Invalid
|
|
87 |
void clear() const;
|
|
88 |
|
|
89 |
private: // data
|
26
|
90 |
|
|
91 |
QScopedPointer<EapQtCertificateInfoPrivate> d_ptr;
|
34
|
92 |
|
26
|
93 |
};
|
|
94 |
|
|
95 |
// Make the class known to QMetaType to support using QVariant
|
|
96 |
Q_DECLARE_METATYPE(EapQtCertificateInfo)
|
|
97 |
|
34
|
98 |
#endif // EAPQTCERTIFICATEINFO_H
|