38 #include "ctsyprivatecrpkeys.h" |
38 #include "ctsyprivatecrpkeys.h" |
39 #include <featureuids.h> |
39 #include <featureuids.h> |
40 |
40 |
41 // ======== MEMBER FUNCTIONS ======== |
41 // ======== MEMBER FUNCTIONS ======== |
42 |
42 |
43 CMmCustomTsy::CMmCustomTsy() |
43 CMmCustomTsy::CMmCustomTsy(): |
|
44 iReqHandleType(ECustomTsyReqHandleUnknown) |
44 { |
45 { |
45 iMmPhoneTsy = NULL; |
46 iMmPhoneTsy = NULL; |
46 iMmCustomExtInterface = NULL; |
47 iMmCustomExtInterface = NULL; |
47 Mem::FillZ( iMmSubTsy, sizeof( iMmSubTsy ) ); |
48 Mem::FillZ( iMmSubTsy, sizeof( iMmSubTsy ) ); |
48 |
49 |
139 } |
140 } |
140 |
141 |
141 CMmCustomTsy::~CMmCustomTsy() |
142 CMmCustomTsy::~CMmCustomTsy() |
142 { |
143 { |
143 TFLOGSTRING("TSY: CMmCustomTsy::~CMmCustomTsy"); |
144 TFLOGSTRING("TSY: CMmCustomTsy::~CMmCustomTsy"); |
144 iMmPhoneTsy->SetHomeZoneParamsChecked( EFalse ); |
145 |
145 iFeatureControl.Close(); |
146 iFeatureControl.Close(); |
146 |
147 |
147 // Delete subsystems |
148 // Delete subsystems |
148 for ( TInt i = 0; ESubTsyIdxMaxNum > i; i++ ) |
149 for ( TInt i = 0; ESubTsyIdxMaxNum > i; i++ ) |
149 { |
150 { |
150 delete iMmSubTsy[i]; |
151 delete iMmSubTsy[i]; |
151 } |
152 } |
152 |
153 |
153 if ( iMmSecurityTsy ) |
154 // Delete SecurityTsy |
154 { |
155 delete iMmSecurityTsy; |
155 // Delete SecurityTsy |
156 |
156 delete iMmSecurityTsy; |
157 // Delete GSM extensions |
157 } |
158 delete iMmCustomExtInterface; |
158 |
159 |
159 if ( iMmCustomExtInterface ) |
160 // delete req handle store |
160 { |
161 delete iTsyReqHandleStore; |
161 // Delete GSM extensions |
|
162 delete iMmCustomExtInterface; |
|
163 } |
|
164 |
|
165 if ( iTsyReqHandleStore ) |
|
166 { |
|
167 // delete req handle store |
|
168 delete iTsyReqHandleStore; |
|
169 } |
|
170 |
|
171 iMmSecurityTsy = NULL; |
|
172 iMmCustomExtInterface = NULL; |
|
173 iTsyReqHandleStore = NULL; |
|
174 iISVDialNumberCheckObject = NULL; |
|
175 iCFISCentRep = NULL; |
|
176 |
162 |
177 if ( iMmPhoneTsy ) |
163 if ( iMmPhoneTsy ) |
178 { |
164 { |
|
165 iMmPhoneTsy->SetHomeZoneParamsChecked( EFalse ); |
179 iMmPhoneTsy->SetCustomTsy( NULL ); |
166 iMmPhoneTsy->SetCustomTsy( NULL ); |
180 |
|
181 // unregister custom tsy in the message manager |
167 // unregister custom tsy in the message manager |
182 iMmPhoneTsy->MessageManager()->DeregisterTsyObject(this); |
168 iMmPhoneTsy->MessageManager()->DeregisterTsyObject(this); |
183 } |
169 } |
184 } |
170 } |
185 |
171 |
209 const TInt aIpc, |
195 const TInt aIpc, |
210 const TDataPackage& aPackage ) |
196 const TDataPackage& aPackage ) |
211 { |
197 { |
212 TInt ret = KErrNone; |
198 TInt ret = KErrNone; |
213 TInt trapError = KErrNone; |
199 TInt trapError = KErrNone; |
214 iReqHandleType = ECustomTsyReqHandleUnknown; |
200 |
|
201 // Ensure the ReqHandleType is unset. |
|
202 // This will detect cases where this method indirectly calls itself |
|
203 // (e.g. servicing a client call that causes a self-reposting notification to complete and thus repost). |
|
204 // Such cases are not supported because iReqHandleType is in the context of this class instance, |
|
205 // not this request, and we don't want the values set by the inner request and the outer request |
|
206 // interfering with each other. |
|
207 __ASSERT_DEBUG(iReqHandleType==ECustomTsyReqHandleUnknown, User::Invariant()); |
215 |
208 |
216 // before processing further the request, check if offline mode status |
209 // before processing further the request, check if offline mode status |
217 // is enabled and if the given request can be perfomed in that case. |
210 // is enabled and if the given request can be perfomed in that case. |
218 if ( ERfsStateInfoInactive == iMmPhoneTsy->GetRfStateInfo() && |
211 if ( ERfsStateInfoInactive == iMmPhoneTsy->GetRfStateInfo() && |
219 !IsRequestPossibleInOffline( aIpc ) ) |
212 !IsRequestPossibleInOffline( aIpc ) ) |
270 ret = CMmTsyBase::DoBaseExtFuncL( aTsyReqHandle, aIpc, aPackage ); |
263 ret = CMmTsyBase::DoBaseExtFuncL( aTsyReqHandle, aIpc, aPackage ); |
271 |
264 |
272 // if extension modules did not serve this request |
265 // if extension modules did not serve this request |
273 if ( KErrNotSupported == ret ) |
266 if ( KErrNotSupported == ret ) |
274 { |
267 { |
275 // reset last tsy request type |
268 // Ensure the ReqHandleType is unset. |
276 iReqHandleType = ECustomTsyReqHandleUnknown; |
269 // This will detect cases where this method indirectly calls itself |
277 |
270 // (e.g. servicing a client call that causes a self-reposting notification to complete and thus repost). |
|
271 // Such cases are not supported because iReqHandleType is in the context of this class instance, |
|
272 // not this request, and we don't want the values set by the inner request and the outer request |
|
273 // interfering with each other. |
|
274 __ASSERT_DEBUG(iReqHandleType==ECustomTsyReqHandleUnknown, User::Invariant()); |
|
275 |
278 switch ( aIpc ) |
276 switch ( aIpc ) |
279 { |
277 { |
280 // Perform IMS Authentication |
278 // Perform IMS Authentication |
281 case EMobilePhoneIMSAuthenticate: |
279 case EMobilePhoneIMSAuthenticate: |
282 ret = ImsAuthenticationL( aTsyReqHandle, |
280 ret = ImsAuthenticationL( aTsyReqHandle, |
558 SetTypeOfResponse ( iReqHandleType, aTsyReqHandle ); |
556 SetTypeOfResponse ( iReqHandleType, aTsyReqHandle ); |
559 #else |
557 #else |
560 iTsyReqHandleStore->SetTsyReqHandle( iReqHandleType, |
558 iTsyReqHandleStore->SetTsyReqHandle( iReqHandleType, |
561 aTsyReqHandle ); |
559 aTsyReqHandle ); |
562 #endif // REQHANDLE_TIMER |
560 #endif // REQHANDLE_TIMER |
|
561 // We've finished with this value now. Clear it so it doesn't leak |
|
562 // up to any other instances of this method down the call stack |
|
563 iReqHandleType = ECustomTsyReqHandleUnknown; |
563 } |
564 } |
564 } |
565 } |
565 } |
566 } |
566 |
567 |
567 return ret; |
568 return ret; |