|
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 |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
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 * Stub for eapwizard testing. |
|
16 */ |
|
17 |
|
18 #ifndef EAPQTCONFIG_H |
|
19 #define EAPQTCONFIG_H |
|
20 |
|
21 // System includes |
|
22 #include <QList> |
|
23 #include <QVariant> |
|
24 |
|
25 // User includes |
|
26 |
|
27 // Forward declarations |
|
28 |
|
29 // External data types |
|
30 |
|
31 // Constants |
|
32 |
|
33 // Class declaration |
|
34 |
|
35 class EapQtConfig |
|
36 { |
|
37 public: |
|
38 |
|
39 // Data types |
|
40 |
|
41 enum CipherSuite |
|
42 { |
|
43 /* from RFC4346, listing only suites supported by EAP server */ |
|
44 TLS_NULL_WITH_NULL_NULL = 0x0000, |
|
45 TLS_RSA_WITH_RC4_128_MD5 = 0x0004, |
|
46 TLS_RSA_WITH_RC4_128_SHA = 0x0005, |
|
47 TLS_RSA_WITH_3DES_EDE_CBC_SHA = 0x000a, |
|
48 TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 0x0013, |
|
49 TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 0x0016, |
|
50 TLS_RSA_WITH_AES_128_CBC_SHA = 0x002f, |
|
51 TLS_DHE_DSS_WITH_AES_128_CBC_SHA = 0x0032, |
|
52 TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 0x0033, |
|
53 TLS_DH_anon_WITH_AES_128_CBC_SHA = 0x0034, |
|
54 }; |
|
55 |
|
56 enum SettingsId |
|
57 { |
|
58 // see also EapSettings.h |
|
59 |
|
60 /*! bool */ |
|
61 UsernameAutomatic = 0, |
|
62 /*! QString */ |
|
63 Username, |
|
64 /*! bool */ |
|
65 PasswordPrompt, |
|
66 /*! write-only: QString */ |
|
67 Password, |
|
68 /*! bool |
|
69 * in read: defines if password already exists in settings database |
|
70 * in write: when true, defines that password is not included in the provided |
|
71 * configuration since it already exists in settings database, i.e. earlier |
|
72 * set password remains unchanged */ |
|
73 PasswordStored, |
|
74 /*! write-only: bool |
|
75 * true: clears the password from database |
|
76 * false: does nothing |
|
77 */ |
|
78 PasswordClear, |
|
79 /*! bool */ |
|
80 RealmAutomatic, |
|
81 /*! QString */ |
|
82 Realm, |
|
83 /*! bool */ |
|
84 UsePseudonyms, |
|
85 /*! bool */ |
|
86 VerifyServerRealm, |
|
87 /*! bool */ |
|
88 ClientAuthenticationRequired, |
|
89 /*! uint */ |
|
90 SessionValidityTime, |
|
91 /*! QList<uint>, values from EapQtConfig::CipherSuite */ |
|
92 CipherSuites, |
|
93 /*! bool */ |
|
94 PeapVersion0Allowed, |
|
95 /*! bool */ |
|
96 PeapVersion1Allowed, |
|
97 /*! bool */ |
|
98 PeapVersion2Allowed, |
|
99 /*! bool */ |
|
100 AuthorityCertificateAutomatic, |
|
101 /*! QList< QVariant(EapQtCertificateInfo) > */ |
|
102 AuthorityCertificate, |
|
103 /*! QList< QVariant(EapQtCertificateInfo) > */ |
|
104 UserCertificate, |
|
105 /*! QList< QVariant(EapQtPluginHandle) > */ |
|
106 InnerType, |
|
107 /*! EapQtPluginHandle */ |
|
108 OuterType, |
|
109 /*! bool */ |
|
110 ProvisioningModeAuthenticated, |
|
111 /*! bool */ |
|
112 ProvisioningModeUnauthenticated, |
|
113 /*! QString */ |
|
114 PACGroupReference, |
|
115 /*! bool */ |
|
116 WarnADHPNoPAC, |
|
117 /*! bool */ |
|
118 WarnADHPNoMatchingPAC, |
|
119 /*! bool */ |
|
120 WarnNotDefaultServer, |
|
121 /*! bool */ |
|
122 UseIdentityPrivacy, |
|
123 /* marker for the last entry */ |
|
124 SettingsIdLast |
|
125 }; |
|
126 |
|
127 public: |
|
128 EapQtConfig(); |
|
129 EapQtConfig(const EapQtConfig& other); |
|
130 ~EapQtConfig(); |
|
131 |
|
132 QVariant value(const SettingsId id) const; |
|
133 void setValue(const SettingsId id, const QVariant &newValue); |
|
134 void clear(); |
|
135 |
|
136 public: // FOR TESTING PURPOSE |
|
137 bool operator==(const EapQtConfig & rhs ) const; |
|
138 |
|
139 private: |
|
140 QHash<int, QVariant> mSettings; |
|
141 }; |
|
142 |
|
143 #endif |