|
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 * EAP method configuration QT interface. |
|
16 */ |
|
17 |
|
18 #ifndef EAPQTCONFIGINTERFACE_H |
|
19 #define EAPQTCONFIGINTERFACE_H |
|
20 |
|
21 #include <qglobal.h> |
|
22 #include <QStringList> |
|
23 #include <eapqtexpandedeaptype.h> |
|
24 #include <eapqtpluginhandle.h> |
|
25 #include "eapqtconfig.h" |
|
26 #include "eapqtpacstoreconfig.h" |
|
27 #include "eapqtcertificateinfo.h" |
|
28 #include "eapqtvalidator.h" |
|
29 |
|
30 class EapQtConfigInterfaceContext; |
|
31 /*! |
|
32 * @addtogroup group_eap_config_api |
|
33 * @{ |
|
34 */ |
|
35 |
|
36 /*! |
|
37 */ |
|
38 class EapQtConfigInterface |
|
39 { |
|
40 public: |
|
41 |
|
42 enum EapBearerType |
|
43 { |
|
44 // EAP configuration interface for WLAN |
|
45 EapBearerTypeWlan = 0, |
|
46 // EAP configuration interface for VPN |
|
47 EapBearerTypeVpn, |
|
48 }; |
|
49 |
|
50 static const int IapIdUndefined = -1; |
|
51 |
|
52 public: |
|
53 EapQtConfigInterface(const EapBearerType bearerType, const int iapId); |
|
54 ~EapQtConfigInterface(); |
|
55 |
|
56 EapQtValidator *validatorEap(const EapQtExpandedEapType &type, const EapQtConfig::SettingsId id); |
|
57 EapQtValidator *validatorPacStore(const EapQtPacStoreConfig::PacStoreSettings id); |
|
58 |
|
59 bool setConfigurationReference(const int iapId); |
|
60 QList<EapQtCertificateInfo> certificateAuthorityCertificates(); |
|
61 QList<EapQtCertificateInfo> userCertificates(); |
|
62 |
|
63 bool updateCertificates(); |
|
64 |
|
65 bool isSupportedOuterType(const EapQtPluginHandle& handle); |
|
66 bool isSupportedInnerType(const EapQtPluginHandle& outerHandle, |
|
67 const EapQtPluginHandle& innerHandle); |
|
68 |
|
69 bool setSelectedOuterTypes(const QList<EapQtPluginHandle>& outerHandles); |
|
70 bool saveConfiguration(const EapQtPluginHandle& pluginHandle, const EapQtConfig &config); |
|
71 bool deleteConfiguration(); |
|
72 |
|
73 bool readPacStoreConfiguration(EapQtPacStoreConfig &config); |
|
74 bool savePacStoreConfiguration(EapQtPacStoreConfig &config); |
|
75 |
|
76 |
|
77 private: |
|
78 Q_DISABLE_COPY(EapQtConfigInterface) |
|
79 QStringList mCalledMethods; |
|
80 |
|
81 // setConfigurationReference |
|
82 int mIapId; |
|
83 bool mReturnSetConfigurationReference; |
|
84 |
|
85 // certificateAuthorityCertificates |
|
86 QList<EapQtCertificateInfo> mCertsCa; |
|
87 |
|
88 // userCertificates |
|
89 QList<EapQtCertificateInfo> mCertsUser; |
|
90 |
|
91 // isSupportedOuterType |
|
92 QList<EapQtPluginHandle> mSupportedOuterTypes; |
|
93 |
|
94 // isSupportedInnerType |
|
95 QList<EapQtPluginHandle> mSupportedInnerTypes; |
|
96 int mSupportedInnerTypesOuterHandle; |
|
97 |
|
98 // setSelectedOuterTypes |
|
99 QList<EapQtPluginHandle> mSetSelectectedOuterTypes; |
|
100 bool mReturnSetSelectedOuterTypes; |
|
101 |
|
102 // saveConfiguration |
|
103 EapQtPluginHandle::Plugin mOuterPlugin; |
|
104 EapQtConfig mSaveConfigurationsOuter; |
|
105 bool mReturnSaveConfigurationOuter; |
|
106 EapQtPluginHandle::Plugin mInnerPlugin; |
|
107 EapQtConfig mSaveConfigurationsInner; |
|
108 bool mReturnSaveConfigurationInner; |
|
109 |
|
110 // validatorEap |
|
111 QHash<EapQtExpandedEapType::Type, QHash<EapQtConfig::SettingsId, EapQtValidator *> > mValidator; |
|
112 |
|
113 // readPacStoreConfiguration |
|
114 EapQtPacStoreConfig mReadPacStoreConfiguration; |
|
115 bool mReadPacStoreConfigurationReturn; |
|
116 |
|
117 // savePacStoreConfiguration |
|
118 EapQtPacStoreConfig mSavePacStoreConfiguration; |
|
119 bool mSavePacStoreConfigurationReturn; |
|
120 |
|
121 // validatorPacStore, key: EapQtPacStoreConfig::PacStoreSettings |
|
122 QHash<int ,EapQtValidator* > mValidatorPacStore; |
|
123 |
|
124 friend class EapQtConfigInterfaceContext; |
|
125 }; |
|
126 |
|
127 /*! @} */ |
|
128 |
|
129 #endif |
|
130 |
|
131 |