26
|
1 |
/*
|
|
2 |
* Copyright (c) 2001-2006 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 the License "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: This is implementation of CEapGeneralSettings interface.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
/*
|
49
|
19 |
* %version: 29 %
|
26
|
20 |
*/
|
|
21 |
|
|
22 |
#ifndef _EAP_GENERAL_SETTINGS_IMPL_H_
|
|
23 |
#define _EAP_GENERAL_SETTINGS_IMPL_H_
|
|
24 |
|
|
25 |
// INCLUDES
|
|
26 |
#include <EapType.h>
|
|
27 |
#include <EapGeneralSettings.h>
|
49
|
28 |
#include "eap_am_export.h"
|
|
29 |
// Start: added by script change_export_macros.sh.
|
|
30 |
#if defined(EAP_NO_EXPORT_EAPGENERALSETTINGSIMPL_H)
|
|
31 |
#define EAP_CLASS_VISIBILITY_EAPGENERALSETTINGSIMPL_H EAP_NONSHARABLE
|
|
32 |
#define EAP_FUNC_VISIBILITY_EAPGENERALSETTINGSIMPL_H
|
|
33 |
#define EAP_C_FUNC_VISIBILITY_EAPGENERALSETTINGSIMPL_H
|
|
34 |
#define EAP_FUNC_EXPORT_EAPGENERALSETTINGSIMPL_H
|
|
35 |
#define EAP_C_FUNC_EXPORT_EAPGENERALSETTINGSIMPL_H
|
|
36 |
#elif defined(EAP_EXPORT_EAPGENERALSETTINGSIMPL_H)
|
|
37 |
#define EAP_CLASS_VISIBILITY_EAPGENERALSETTINGSIMPL_H EAP_EXPORT
|
|
38 |
#define EAP_FUNC_VISIBILITY_EAPGENERALSETTINGSIMPL_H EAP_FUNC_EXPORT
|
|
39 |
#define EAP_C_FUNC_VISIBILITY_EAPGENERALSETTINGSIMPL_H EAP_C_FUNC_EXPORT
|
|
40 |
#define EAP_FUNC_EXPORT_EAPGENERALSETTINGSIMPL_H EAP_FUNC_EXPORT
|
|
41 |
#define EAP_C_FUNC_EXPORT_EAPGENERALSETTINGSIMPL_H EAP_C_FUNC_EXPORT
|
|
42 |
#else
|
|
43 |
#define EAP_CLASS_VISIBILITY_EAPGENERALSETTINGSIMPL_H EAP_IMPORT
|
|
44 |
#define EAP_FUNC_VISIBILITY_EAPGENERALSETTINGSIMPL_H EAP_FUNC_IMPORT
|
|
45 |
#define EAP_C_FUNC_VISIBILITY_EAPGENERALSETTINGSIMPL_H EAP_C_FUNC_IMPORT
|
|
46 |
#define EAP_FUNC_EXPORT_EAPGENERALSETTINGSIMPL_H
|
|
47 |
#define EAP_C_FUNC_EXPORT_EAPGENERALSETTINGSIMPL_H
|
|
48 |
#endif
|
|
49 |
// End: added by script change_export_macros.sh.
|
26
|
50 |
#include "eap_header.h"
|
|
51 |
#include "eap_array.h"
|
|
52 |
#include "abs_eap_general_settings_message.h"
|
|
53 |
#include "eap_configuration_field.h"
|
|
54 |
#include "EapExpandedType.h"
|
|
55 |
#include "EapClientIf.h"
|
|
56 |
|
|
57 |
// FORWARD DECLARATIONS
|
|
58 |
class eap_am_network_id_c;
|
|
59 |
class eap_method_settings_c;
|
|
60 |
class abs_eap_am_tools_c;
|
|
61 |
class eap_general_settings_message_c;
|
|
62 |
|
|
63 |
|
|
64 |
enum eap_general_settings_wait_state_e
|
|
65 |
{
|
|
66 |
eap_general_settings_wait_state_none,
|
|
67 |
eap_general_settings_wait_state_complete_set_eap_methods,
|
|
68 |
eap_general_settings_wait_state_complete_get_eap_methods,
|
|
69 |
eap_general_settings_wait_state_complete_get_certificate_lists,
|
|
70 |
eap_general_settings_wait_state_complete_delete_all_eap_settings,
|
|
71 |
eap_general_settings_wait_state_complete_copy_all_eap_settings,
|
|
72 |
};
|
|
73 |
|
|
74 |
|
|
75 |
// CLASS DECLARATION
|
|
76 |
/**
|
|
77 |
* This is implementation of CEapGeneralSettings interface.
|
|
78 |
*/
|
49
|
79 |
class EAP_CLASS_VISIBILITY_EAPGENERALSETTINGSIMPL_H CEapGeneralSettingsImpl
|
26
|
80 |
: public CEapGeneralSettings
|
|
81 |
, public abs_eap_general_settings_message_c
|
|
82 |
, public EapClientIf
|
|
83 |
{
|
|
84 |
public:
|
|
85 |
|
|
86 |
/**
|
|
87 |
* Construction function. Called by ECom after the EAP generic plugin has been loaded.
|
|
88 |
* @param aIapInfo Pointer to the class that contains information about bearer type and unique index.
|
|
89 |
* @return Pointer to the instance.
|
|
90 |
*/
|
|
91 |
static CEapGeneralSettingsImpl* NewL(SIapInfo* aIapInfo);
|
|
92 |
|
|
93 |
/**
|
|
94 |
* Destructor does nothing.
|
|
95 |
*/
|
|
96 |
virtual ~CEapGeneralSettingsImpl();
|
|
97 |
|
|
98 |
/**
|
|
99 |
* Returns the version of the interface that the EAP type implements.
|
|
100 |
* The client-side of the interface must always check the version with this function
|
|
101 |
* and not call the functions that are not implemented. New functions must be
|
|
102 |
* added to the end of the interface so that the order of the old functions
|
|
103 |
* does not change.
|
|
104 |
* @return Integer indicating the version.
|
|
105 |
*/
|
|
106 |
TUint GetInterfaceVersion();
|
|
107 |
|
|
108 |
TInt SetEapMethods(
|
|
109 |
const RArray<TEapExpandedType> & aActiveEapMethods,
|
|
110 |
const RArray<TEapExpandedType> & aDisabledEapMethods);
|
|
111 |
|
|
112 |
TInt GetEapMethods(
|
|
113 |
RArray<TEapExpandedType> & aActiveEapMethods,
|
|
114 |
RArray<TEapExpandedType> & aDisabledEapMethods);
|
|
115 |
|
|
116 |
TInt GetCertificateLists(
|
|
117 |
RPointerArray<EapCertificateEntry> & aUserCerts,
|
|
118 |
RPointerArray<EapCertificateEntry> & aCACerts);
|
|
119 |
|
|
120 |
TInt DeleteAllEapSettings();
|
|
121 |
|
|
122 |
TInt CopyAllEapSettings(
|
|
123 |
const TIndexType aDestinationIndexType,
|
|
124 |
const TInt aDestinationIndex);
|
|
125 |
|
|
126 |
eap_status_e complete_get_eap_methods(
|
|
127 |
const eap_method_settings_c * const internal_settings);
|
|
128 |
|
|
129 |
eap_status_e complete_set_eap_methods(
|
|
130 |
const eap_status_e completion_status);
|
|
131 |
|
|
132 |
eap_status_e complete_get_certificate_lists(
|
|
133 |
const eap_method_settings_c * const internal_settings);
|
|
134 |
|
|
135 |
eap_status_e complete_delete_all_eap_settings(
|
|
136 |
const eap_status_e completion_status);
|
|
137 |
|
|
138 |
eap_status_e complete_copy_all_eap_settings(
|
|
139 |
const eap_status_e completion_status);
|
|
140 |
|
|
141 |
protected:
|
|
142 |
|
|
143 |
/**
|
|
144 |
* Constructor initialises member variables.
|
|
145 |
*/
|
|
146 |
CEapGeneralSettingsImpl(const TIndexType aIndexType, const TInt aIndex);
|
|
147 |
|
|
148 |
void ConstructL();
|
|
149 |
|
|
150 |
private:
|
|
151 |
|
|
152 |
void Activate();
|
|
153 |
|
|
154 |
void Complete();
|
|
155 |
|
|
156 |
void WaitCompletion();
|
|
157 |
|
|
158 |
void SetCompletionStatusIfStillOk(const eap_status_e status);
|
|
159 |
|
|
160 |
/// This is pointer to the tools class.
|
|
161 |
abs_eap_am_tools_c * const m_am_tools;
|
|
162 |
|
|
163 |
eap_general_settings_message_c * const m_server;
|
|
164 |
|
|
165 |
CActiveSchedulerWait iWait;
|
|
166 |
|
|
167 |
// Bearer type
|
|
168 |
TIndexType iIndexType;
|
|
169 |
|
|
170 |
// Unique index in the bearer space.
|
|
171 |
TInt iIndex;
|
|
172 |
|
|
173 |
RArray<TEapExpandedType> * iActiveEapMethods;
|
|
174 |
RArray<TEapExpandedType> * iDisabledEapMethods;
|
|
175 |
|
|
176 |
RPointerArray<EapCertificateEntry> * iUserCerts;
|
|
177 |
RPointerArray<EapCertificateEntry> * iCACerts;
|
|
178 |
|
|
179 |
eap_general_settings_wait_state_e iWaitState;
|
|
180 |
|
|
181 |
eap_status_e iCompletionStatus;
|
|
182 |
|
|
183 |
TRequestStatus iAsyncronousStatus;
|
|
184 |
};
|
|
185 |
|
|
186 |
#endif // _EAP_GENERAL_SETTINGS_IMPL_H_
|
|
187 |
|
|
188 |
// End of file
|