|
1 /* |
|
2 * Copyright (c) 2002-2005 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: Class for doing Initilization of protocol handler operation. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_COMASUPLINITILIZEREQUESTOR_H |
|
21 #define C_COMASUPLINITILIZEREQUESTOR_H |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <epos_csuplsettings.h> |
|
25 |
|
26 #include "epos_comasuplinitilizeobserver.h" |
|
27 |
|
28 class COMASuplPosHandlerBase; |
|
29 class COMASuplSettings; |
|
30 |
|
31 /** |
|
32 * Class for doing initilization of protocol handler. |
|
33 * |
|
34 * @lib eposomasuplprotocolhandler.lib |
|
35 * @since S60 v3.1u |
|
36 */ |
|
37 |
|
38 class COMASuplInitilizeRequestor : public CActive |
|
39 { |
|
40 |
|
41 public : // Constructor |
|
42 |
|
43 /** |
|
44 * NewL Method. |
|
45 * @since Series 60 3.1u |
|
46 * @param MEventCompletionObserver |
|
47 * @return Instance of COMASuplInitilizeRequestor |
|
48 */ |
|
49 static COMASuplInitilizeRequestor* NewL(COMASuplPosHandlerBase *aPosHandler,MCompleteInitilization& aObserver, COMASuplSettings* aOMASuplSettings); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 ~COMASuplInitilizeRequestor(); |
|
55 |
|
56 public : |
|
57 /** |
|
58 * DoInitilization Method, starts initilzation |
|
59 * @since Series 60 3.1u |
|
60 * @param None |
|
61 * @return None |
|
62 */ |
|
63 void DoInitilizationL(); |
|
64 |
|
65 /** |
|
66 * GetIMSI Method, Retrieves IMSI from SIM |
|
67 * @since Series 60 3.1u |
|
68 * @param aIMSI, TDes |
|
69 * @return TInt, error code |
|
70 */ |
|
71 TInt GetIMSI(TDes& aIMSI); |
|
72 |
|
73 private : |
|
74 |
|
75 /** |
|
76 * CompleteSelf Method, request for self completion |
|
77 * @since Series 60 3.1u |
|
78 * @param None |
|
79 * @return None |
|
80 */ |
|
81 void CompleteSelf(); |
|
82 |
|
83 /** |
|
84 * Constuctor |
|
85 * @since Series 60 3.1u |
|
86 * @param aObserver, MCompleteInitilization |
|
87 * @return None |
|
88 */ |
|
89 COMASuplInitilizeRequestor(COMASuplPosHandlerBase *aPosHandler,MCompleteInitilization& aObserver,COMASuplSettings* aOMASuplSettings); |
|
90 |
|
91 /** |
|
92 * By default Symbian 2nd phase constructor is private. |
|
93 */ |
|
94 void ConstructL(); |
|
95 |
|
96 /** |
|
97 * Checks for IMSI variance |
|
98 */ |
|
99 void SetVariant(); |
|
100 |
|
101 protected : // Functions from CActive |
|
102 |
|
103 /** |
|
104 * From CActive |
|
105 * To handle request completion |
|
106 */ |
|
107 void RunL(); |
|
108 |
|
109 /** |
|
110 * From CActive |
|
111 * To cancel the asynchronous requests |
|
112 */ |
|
113 void DoCancel(); |
|
114 |
|
115 private : //Data |
|
116 |
|
117 enum TInitializeRequestorState |
|
118 { |
|
119 ENotInitialized = 0, |
|
120 EInitializePosHandler, |
|
121 EInitializeSuplSettings, |
|
122 EInitializationComplete |
|
123 }; |
|
124 |
|
125 //POS Handler |
|
126 COMASuplPosHandlerBase* iPosHandler; |
|
127 |
|
128 //Observer for initilization |
|
129 MCompleteInitilization& iObserver; |
|
130 |
|
131 //Tracing utility |
|
132 COMASuplTrace* iTrace; |
|
133 |
|
134 TInitializeRequestorState iState; |
|
135 |
|
136 CSuplSettings* iSuplSettings; |
|
137 |
|
138 TBool iVariantEnabled; |
|
139 COMASuplSettings* iOMASuplSettings; |
|
140 }; |
|
141 |
|
142 #endif //C_COMASUPLINITILIZEREQUESTOR_H |