1 /* |
|
2 * Copyright (c) 2009 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 */ |
|
16 |
|
17 #ifndef EAPQTCONFIGINTERFACE_CONTEXT_H |
|
18 #define EAPQTCONFIGINTERFACE_CONTEXT_H |
|
19 |
|
20 #include "eapqtconfiginterface.h" |
|
21 #include "eapqtpacstoreconfig.h" |
|
22 |
|
23 class EapQtConfigInterfaceContext |
|
24 { |
|
25 public: |
|
26 EapQtConfigInterfaceContext(); |
|
27 ~EapQtConfigInterfaceContext(); |
|
28 |
|
29 void setObject(EapQtConfigInterface *eapQtConfig); |
|
30 |
|
31 public: // Helpper methods to create simple valid configurations |
|
32 void createEapAkaSim(int pluginHandleEnum); |
|
33 |
|
34 void createLeap(const QString& username, const QString& passwd); |
|
35 |
|
36 void createEapIdentifyValidators(EapQtPluginHandle::Plugin outerType); |
|
37 |
|
38 void createEapTtlsPeap( |
|
39 EapQtPluginHandle::Plugin type, |
|
40 bool automaticCert, |
|
41 bool usernameAutomatic, |
|
42 const QString &username, |
|
43 bool realmAutomatic, |
|
44 const QString &realm, |
|
45 EapQtPluginHandle::Plugin innerType); |
|
46 |
|
47 void createEapTls( |
|
48 QList<EapQtCertificateInfo> &caCerts, |
|
49 int indexForCaCert, |
|
50 QList<EapQtCertificateInfo> &userCerts, |
|
51 int indexForUserCert); |
|
52 |
|
53 void createInner( |
|
54 EapQtPluginHandle::Plugin outerType, |
|
55 EapQtPluginHandle::Plugin innerType, |
|
56 const QString &username, |
|
57 const QString &password); |
|
58 |
|
59 void createInnerTypeValidators(EapQtPluginHandle::Plugin innerType); |
|
60 |
|
61 void createEapFast(int pacState, const QString &password = QString()); |
|
62 |
|
63 public: // Methods to set the exact behavior of the interface |
|
64 QStringList calledMethods(); |
|
65 void setConfigurationReference(int iapId, bool retValue); |
|
66 void setConfigurationReferenceReturn(bool retValue); |
|
67 void setCertsCa(QList<EapQtCertificateInfo> &certs); |
|
68 void setCertsUser(QList<EapQtCertificateInfo> &certs); |
|
69 void setSupportedOuterTypes(QList<EapQtPluginHandle> &outerTypes); |
|
70 void setSupportedInnerTypes(EapQtPluginHandle outerHandle, QList<EapQtPluginHandle> &innerTypes); |
|
71 void setSelectectedOuterTypes(QList<EapQtPluginHandle> &types, bool retValue); |
|
72 void setSelectectedOuterTypesReturn(bool retValue); |
|
73 void setOuterConfig(EapQtPluginHandle::Plugin handle, EapQtConfig &config, bool retValue); |
|
74 void setOuterConfigReturn(bool retValue); |
|
75 void setInnerConfig(EapQtPluginHandle::Plugin handle, EapQtConfig &config, bool retValue); |
|
76 void setInnerConfigReturn(bool retValue); |
|
77 // Moved ownership to context |
|
78 void setValidator( |
|
79 EapQtExpandedEapType::Type eapType, |
|
80 EapQtConfig::SettingsId, |
|
81 EapQtValidator *validator); |
|
82 |
|
83 EapQtValidator *validator( |
|
84 EapQtExpandedEapType::Type eapType, |
|
85 EapQtConfig::SettingsId id); |
|
86 |
|
87 void setPacStoreConfigRead(EapQtPacStoreConfig &config, bool retValue); |
|
88 void setPacStoreConfigReadReturn(bool retValue); |
|
89 void setPacStoreConfigSave(EapQtPacStoreConfig &config, bool retValue); |
|
90 void setPacStoreConfigSaveReturn(bool retValue); |
|
91 void setValidatorPacStore(int id, EapQtValidator * validator); |
|
92 |
|
93 EapQtValidator *validatorPacStore(int id); |
|
94 |
|
95 |
|
96 private: |
|
97 EapQtConfigInterface* mEapQtConfig; |
|
98 }; |
|
99 |
|
100 #endif /* EAPQTCONFIGINTERFACE_CONTEXT_H */ |
|
101 |
|
102 // End of File |
|