|
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: EAP and WLAN authentication protocols. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef _EAPSIMISAINTERFACE_H_ |
|
20 #define _EAPSIMISAINTERFACE_H_ |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include "eap_tools.h" |
|
25 #include "eap_am_type_gsmsim_symbian.h" |
|
26 #include "isaapi.h" |
|
27 |
|
28 // CLASS DECLARATION |
|
29 /** |
|
30 * Class (active object) that handles the communications with the SIM. |
|
31 */ |
|
32 class CEapSimIsaInterface |
|
33 : public CActive |
|
34 { |
|
35 public: |
|
36 /** |
|
37 * Initialisation function. |
|
38 * @param aTools Tools class pointer. |
|
39 * @param aParent Pointer to the parent class. |
|
40 */ |
|
41 static CEapSimIsaInterface* NewL( |
|
42 abs_eap_am_tools_c* const aTools, |
|
43 eap_am_type_gsmsim_symbian_c* const aParent); |
|
44 |
|
45 /** |
|
46 * Destructor |
|
47 */ |
|
48 virtual ~CEapSimIsaInterface(); |
|
49 |
|
50 /** |
|
51 * This function queries the IMSI from SIM. After the request has been completed |
|
52 * complete_SIM_imsi is called in the parent. |
|
53 */ |
|
54 void QueryIMSIL(); |
|
55 |
|
56 /** |
|
57 * This function queries Kc and SRES from SIM. After the request has been completed |
|
58 * complete_SIM_kc_and_sres is called in the parent. |
|
59 * @param aRand Random value |
|
60 */ |
|
61 void QueryKcAndSRESL(const TDesC8& aRand); |
|
62 |
|
63 /** |
|
64 * Checks whether the device is in GSM online mode. Leaves with KErrNotSupported if |
|
65 * the device is in pda or flight mode. |
|
66 */ |
|
67 void CheckSystemModeL(); |
|
68 |
|
69 protected: |
|
70 |
|
71 CEapSimIsaInterface(abs_eap_am_tools_c* const aTools, eap_am_type_gsmsim_symbian_c* const aParent); |
|
72 |
|
73 void ConstructL(); |
|
74 |
|
75 void RunL(); |
|
76 |
|
77 void DoCancel(); |
|
78 |
|
79 private: |
|
80 |
|
81 eap_am_type_gsmsim_symbian_c * const iParent; |
|
82 |
|
83 abs_eap_am_tools_c * const m_am_tools; |
|
84 |
|
85 /// ISA API handle |
|
86 RIsaApi iIsaApi; |
|
87 |
|
88 /// Buffer for received ISA API messages |
|
89 CPnMsg *iMsgReceiveBuffer; |
|
90 |
|
91 /// Buffer for sent ISA API messages |
|
92 CPnMsg *iMsgSendBuffer; |
|
93 |
|
94 TPnReceiveAllocationLengthPckg iMsgReceiveBufferLength; |
|
95 |
|
96 /// Stores the last queried IMSI |
|
97 eap_variable_data_c iLastIMSI; |
|
98 }; |
|
99 |
|
100 #endif // _EAPSIMISAINTERFACE_H_ |
|
101 |
|
102 // End of file |