64 |
64 |
65 iMmSubTsy[ESubTsyIdxSIM] = CMmSIMTsy::NewL( this ); |
65 iMmSubTsy[ESubTsyIdxSIM] = CMmSIMTsy::NewL( this ); |
66 |
66 |
67 iMmSecurityTsy = CMmCustomSecurityTsy::NewL( this, aMmPhoneTsy ); |
67 iMmSecurityTsy = CMmCustomSecurityTsy::NewL( this, aMmPhoneTsy ); |
68 |
68 |
69 // Create custom vendor extension |
69 |
70 // Send request to the Domestic OS layer. |
|
71 iMmCustomVendorExt = (CMmCustomVendorExt*) NULL; |
|
72 CMmDataPackage package; |
|
73 |
|
74 package.PackData( &iMmCustomVendorExt ); // ptr to ptr |
|
75 Phone()->MessageManager()->HandleRequestL( |
|
76 EMmTsyGetCustomVendorExtPtrIPC, &package ); |
|
77 TFLOGSTRING2("TSY: CMmCustomTsy::ConstructL -- iMmCustomVendorExt=0x%x", TUint(iMmCustomVendorExt)); |
|
78 // The request above is 'completed' immediatedly (there is no need for |
|
79 // actual complete) |
|
80 |
|
81 // iMmCustomVendorExt should now hold ptr to custom vendor extension. |
|
82 // But if not, no problem, we just use the base class. |
|
83 if ( NULL == iMmCustomVendorExt ) |
|
84 { |
|
85 TFLOGSTRING("TSY: CMmCustomTsy::ConstructL -- no vendor IPC extensions"); |
|
86 iMmCustomVendorExt = new(ELeave)CMmCustomVendorExt(); |
|
87 } |
|
88 |
|
89 // initialize custom vendor extension |
|
90 iMmCustomVendorExt->InitializeL( *this ); |
|
91 |
70 |
92 #ifdef REQHANDLE_TIMER |
71 #ifdef REQHANDLE_TIMER |
93 // Create req handle store |
72 // Create req handle store |
94 iTsyReqHandleStore = CMmTsyReqHandleStore::NewL( this, iMmPhoneTsy, |
73 iTsyReqHandleStore = CMmTsyReqHandleStore::NewL( this, iMmPhoneTsy, |
95 ECustomTsyMaxNumOfRequests, iCustomReqHandles ); |
74 ECustomTsyMaxNumOfRequests, iCustomReqHandles ); |
160 } |
139 } |
161 |
140 |
162 CMmCustomTsy::~CMmCustomTsy() |
141 CMmCustomTsy::~CMmCustomTsy() |
163 { |
142 { |
164 TFLOGSTRING("TSY: CMmCustomTsy::~CMmCustomTsy"); |
143 TFLOGSTRING("TSY: CMmCustomTsy::~CMmCustomTsy"); |
165 |
144 iMmPhoneTsy->SetHomeZoneParamsChecked( EFalse ); |
166 iFeatureControl.Close(); |
145 iFeatureControl.Close(); |
167 |
146 |
168 // Delete subsystems |
147 // Delete subsystems |
169 for ( TInt i = 0; ESubTsyIdxMaxNum > i; i++ ) |
148 for ( TInt i = 0; ESubTsyIdxMaxNum > i; i++ ) |
170 { |
149 { |
171 delete iMmSubTsy[i]; |
150 delete iMmSubTsy[i]; |
172 } |
151 } |
173 |
152 |
174 if ( iMmCustomVendorExt ) |
|
175 { |
|
176 // delete vendor extension |
|
177 delete iMmCustomVendorExt; |
|
178 } |
|
179 |
|
180 if ( iMmSecurityTsy ) |
153 if ( iMmSecurityTsy ) |
181 { |
154 { |
182 // Delete SecurityTsy |
155 // Delete SecurityTsy |
183 delete iMmSecurityTsy; |
156 delete iMmSecurityTsy; |
184 } |
157 } |
193 { |
166 { |
194 // delete req handle store |
167 // delete req handle store |
195 delete iTsyReqHandleStore; |
168 delete iTsyReqHandleStore; |
196 } |
169 } |
197 |
170 |
198 iMmCustomVendorExt = NULL; |
|
199 iMmSecurityTsy = NULL; |
171 iMmSecurityTsy = NULL; |
200 iMmCustomExtInterface = NULL; |
172 iMmCustomExtInterface = NULL; |
201 iTsyReqHandleStore = NULL; |
173 iTsyReqHandleStore = NULL; |
202 iISVDialNumberCheckObject = NULL; |
174 iISVDialNumberCheckObject = NULL; |
203 iCFISCentRep = NULL; |
175 iCFISCentRep = NULL; |
291 |
263 |
292 ret = iMmSecurityTsy->DoExtFuncL( aTsyReqHandle, aIpc, aPackage ); |
264 ret = iMmSecurityTsy->DoExtFuncL( aTsyReqHandle, aIpc, aPackage ); |
293 |
265 |
294 if ( KErrNotSupported == ret ) |
266 if ( KErrNotSupported == ret ) |
295 { |
267 { |
296 // then check if this is vendor extension IPC |
268 |
297 // these IPCs are handled by VendorExt class in licensee tsy. |
269 // then check all the Custom extension modules |
298 if ( iMmCustomVendorExt->SupportingIPC(aIpc) ) |
270 ret = CMmTsyBase::DoBaseExtFuncL( aTsyReqHandle, aIpc, aPackage ); |
299 { |
|
300 ret = iMmCustomVendorExt->DoExtFuncL( aTsyReqHandle, aIpc, |
|
301 aPackage ); |
|
302 } |
|
303 else |
|
304 { |
|
305 // then check all the Custom extension modules |
|
306 ret = CMmTsyBase::DoBaseExtFuncL( aTsyReqHandle, aIpc, aPackage ); |
|
307 } |
|
308 |
271 |
309 // if extension modules did not serve this request |
272 // if extension modules did not serve this request |
310 if ( KErrNotSupported == ret ) |
273 if ( KErrNotSupported == ret ) |
311 { |
274 { |
312 // reset last tsy request type |
275 // reset last tsy request type |
839 case ECustomNotifyCellInfoChangeIPC: |
781 case ECustomNotifyCellInfoChangeIPC: |
840 case ECustomNotifyRemoteAlertingToneStatusChangeIPC: |
782 case ECustomNotifyRemoteAlertingToneStatusChangeIPC: |
841 break; |
783 break; |
842 |
784 |
843 default: |
785 default: |
844 if ( iMmCustomVendorExt->SupportingIPC( aIpc ) ) |
786 numberOfSlots = CMmTsyBase:: NumberOfSlotsL( aIpc ); |
845 { |
|
846 numberOfSlots = iMmCustomVendorExt->NumberOfSlotsL( aIpc ); |
|
847 } |
|
848 else |
|
849 { |
|
850 numberOfSlots = CMmTsyBase:: NumberOfSlotsL( aIpc ); |
|
851 } |
|
852 break; |
787 break; |
853 } |
788 } |
854 |
789 |
855 return numberOfSlots; |
790 return numberOfSlots; |
856 } |
791 } |
1059 case EWriteViagHomeZoneUHZIUESettingsIPC: |
994 case EWriteViagHomeZoneUHZIUESettingsIPC: |
1060 TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=WriteDeviceData"); |
995 TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=WriteDeviceData"); |
1061 policy = TSecurityPolicy( ECapabilityWriteDeviceData ); |
996 policy = TSecurityPolicy( ECapabilityWriteDeviceData ); |
1062 break; |
997 break; |
1063 default: |
998 default: |
1064 if ( iMmCustomVendorExt->SupportingIPC(ipc) ) |
999 // if none of the above then we end up here, |
1065 { |
1000 // as a default we already have caps as alwaysfail. |
1066 policy = iMmCustomVendorExt->GetRequiredPlatSecCaps(ipc); |
|
1067 } |
|
1068 else |
|
1069 { |
|
1070 // if none of the above then we end up here, |
|
1071 // as a default we already have caps as alwaysfail. |
|
1072 TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=AlwaysFail"); |
1001 TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=AlwaysFail"); |
1073 } |
|
1074 break; |
1002 break; |
1075 } |
1003 } |
1076 |
1004 |
1077 return policy; |
1005 return policy; |
1078 } |
1006 } |
1237 if ( iMmSecurityTsy->SupportingIPC( aIpc ) ) |
1165 if ( iMmSecurityTsy->SupportingIPC( aIpc ) ) |
1238 { |
1166 { |
1239 ret = iMmSecurityTsy->CancelService ( aIpc, |
1167 ret = iMmSecurityTsy->CancelService ( aIpc, |
1240 aTsyReqHandle ); |
1168 aTsyReqHandle ); |
1241 } |
1169 } |
1242 else if ( iMmCustomVendorExt->SupportingIPC( aIpc ) ) |
|
1243 { |
|
1244 ret = iMmCustomVendorExt->CancelService ( aIpc, |
|
1245 aTsyReqHandle ); |
|
1246 } |
|
1247 else |
1170 else |
1248 { |
1171 { |
1249 ret = CMmTsyBase::CancelService ( aIpc, aTsyReqHandle ); |
1172 ret = CMmTsyBase::CancelService ( aIpc, aTsyReqHandle ); |
1250 } |
1173 } |
1251 break; |
1174 break; |
5451 { |
5374 { |
5452 // call DOS |
5375 // call DOS |
5453 // packed parameter: TSetDriveMode (mode status) |
5376 // packed parameter: TSetDriveMode (mode status) |
5454 CMmDataPackage dataPackage; |
5377 CMmDataPackage dataPackage; |
5455 dataPackage.PackData( aModeStatus ); |
5378 dataPackage.PackData( aModeStatus ); |
|
5379 // allow for ECustomSetDriveModeIPC immediate completion |
|
5380 #ifdef REQHANDLE_TIMER |
|
5381 // set timer for the request |
|
5382 SetTypeOfResponse ( ECustomTsySetDriveMode, aTsyReqHandle ); |
|
5383 #else |
|
5384 iTsyReqHandleStore->SetTsyReqHandle( ECustomTsySetDriveMode, |
|
5385 aTsyReqHandle ); |
|
5386 #endif // REQHANDLE_TIMER |
5456 TInt ret = iMmPhoneTsy->MessageManager()->HandleRequestL( |
5387 TInt ret = iMmPhoneTsy->MessageManager()->HandleRequestL( |
5457 ECustomSetDriveModeIPC, &dataPackage ); |
5388 ECustomSetDriveModeIPC, &dataPackage ); |
5458 |
5389 |
5459 // check success |
5390 // check success |
5460 if ( KErrNone != ret ) |
5391 if ( (KErrNone != ret) && (iTsyReqHandleStore->ResetTsyReqHandle(ECustomTsySetDriveMode)) ) |
5461 { |
5392 { |
5462 ReqCompleted ( aTsyReqHandle, ret ); |
5393 ReqCompleted ( aTsyReqHandle, ret ); |
5463 } |
|
5464 else |
|
5465 { |
|
5466 // Store the request handle |
|
5467 iReqHandleType = ECustomTsySetDriveMode; |
|
5468 } |
5394 } |
5469 } |
5395 } |
5470 } |
5396 } |
5471 else |
5397 else |
5472 { |
5398 { |