53 iReservedPhoneMemoryFs.Close(); |
74 iReservedPhoneMemoryFs.Close(); |
54 } |
75 } |
55 |
76 |
56 EXPORT_C TUid CSsmUiSpecific::StartupPSUid() |
77 EXPORT_C TUid CSsmUiSpecific::StartupPSUid() |
57 { |
78 { |
58 return KPSStartupUid; |
79 if (!IsTestPsKeyDefined()) |
|
80 { |
|
81 DEBUGPRINT1A("StartupPSUid :: Calling S60 plugins functions "); |
|
82 return KPSUidStartup; |
|
83 } |
|
84 else |
|
85 { |
|
86 DEBUGPRINT1A("StartupPSUid :: Calling Symbian(dummy) plugins functions "); |
|
87 return KPSStartupDefaultUid; |
|
88 } |
59 } |
89 } |
60 |
90 |
61 EXPORT_C TUid CSsmUiSpecific::SecurityPinNotifierUid() |
91 EXPORT_C TUid CSsmUiSpecific::SecurityPinNotifierUid() |
62 { |
92 { |
63 return KSecurityPinNotifierUid; |
93 if (!IsTestPsKeyDefined()) |
|
94 { |
|
95 DEBUGPRINT1A("SecurityPinNotifierUid :: Calling S60 plugins functions "); |
|
96 return KSecurityNotifierUid; |
|
97 } |
|
98 else |
|
99 { |
|
100 DEBUGPRINT1A("SecurityPinNotifierUid :: Calling Symbian(dummy) plugins functions "); |
|
101 return KSecurityPinNotifierUid; |
|
102 } |
|
103 |
64 } |
104 } |
65 |
105 |
66 EXPORT_C TUint CSsmUiSpecific::EmergencyCallPropertyKey() |
106 EXPORT_C TUint CSsmUiSpecific::EmergencyCallPropertyKey() |
67 { |
107 { |
68 return KEmergencyCallPropertyKey; |
108 if (!IsTestPsKeyDefined()) |
|
109 { |
|
110 DEBUGPRINT1A("EmergencyCallPropertyKey :: Calling S60 plugins functions "); |
|
111 return KCTsyCallState; |
|
112 } |
|
113 else |
|
114 { |
|
115 DEBUGPRINT1A("EmergencyCallPropertyKey :: Calling Symbian(dummy) plugins functions "); |
|
116 return KEmergencyCallPropertyKey; |
|
117 } |
|
118 |
69 } |
119 } |
70 |
120 |
71 EXPORT_C TUid CSsmUiSpecific::EmergencyCallPropertyCategory() |
121 EXPORT_C TUid CSsmUiSpecific::EmergencyCallPropertyCategory() |
72 { |
122 { |
73 return KEmergencyCallPropertyCategory; |
123 if (!IsTestPsKeyDefined()) |
|
124 { |
|
125 DEBUGPRINT1A("EmergencyCallPropertyCategory :: Calling S60 plugins functions "); |
|
126 return KPSUidCtsyCallInformation; |
|
127 } |
|
128 else |
|
129 { |
|
130 DEBUGPRINT1A("EmergencyCallPropertyCategory :: Calling Symbian(dummy) plugins functions "); |
|
131 return KEmergencyCallPropertyCategory; |
|
132 } |
|
133 |
74 } |
134 } |
75 |
135 |
76 EXPORT_C TBool CSsmUiSpecific::IsSimSupported() |
136 EXPORT_C TBool CSsmUiSpecific::IsSimSupported() |
77 { |
137 { |
78 return ETrue; |
138 if (!IsTestPsKeyDefined()) |
|
139 { |
|
140 DEBUGPRINT1A("IsSimSupported :: Calling S60 plugins functions "); |
|
141 return SsmMapperUtility::FeatureStatus( TUid::Uid( KFeatureIdSimCard ) ); |
|
142 } |
|
143 else |
|
144 { |
|
145 DEBUGPRINT1A("IsSimSupported :: Calling Symbian(dummy) plugins functions "); |
|
146 return ETrue; |
|
147 } |
|
148 |
79 } |
149 } |
80 |
150 |
81 EXPORT_C void CSsmUiSpecific::SetSecurityStatus(const TStrtSecurityStatus& aSecurityStatus) |
151 EXPORT_C void CSsmUiSpecific::SetSecurityStatus(const TStrtSecurityStatus& aSecurityStatus) |
82 { |
152 { |
83 iStrtSecurityStatus = aSecurityStatus; |
153 iStrtSecurityStatus = aSecurityStatus; |
84 } |
154 } |
85 |
155 |
86 EXPORT_C TStrtSecurityStatus CSsmUiSpecific::SecurityStatus() const |
156 EXPORT_C TStrtSecurityStatus CSsmUiSpecific::SecurityStatus() const |
87 { |
157 { |
88 return iStrtSecurityStatus; |
158 return iStrtSecurityStatus; |
89 } |
159 } |
90 |
160 |
91 EXPORT_C CSsmUiSpecific* CSsmUiSpecific::InstanceL() |
161 EXPORT_C CSsmUiSpecific* CSsmUiSpecific::InstanceL() |
92 { |
162 { |
125 } |
195 } |
126 } |
196 } |
127 |
197 |
128 EXPORT_C TUid CSsmUiSpecific::ScreenOutputChannelUid() |
198 EXPORT_C TUid CSsmUiSpecific::ScreenOutputChannelUid() |
129 { |
199 { |
130 return KScreenOutputChannel; |
200 if (!IsTestPsKeyDefined()) |
|
201 { |
|
202 DEBUGPRINT1A("ScreenOutputChannelUid :: Calling S60 plugins functions "); |
|
203 return KSecurityNotifierChannel; |
|
204 } |
|
205 else |
|
206 { |
|
207 DEBUGPRINT1A("ScreenOutputChannelUid :: Calling Symbian(dummy) plugins functions "); |
|
208 return KScreenOutputChannel; |
|
209 } |
|
210 |
131 } |
211 } |
132 |
212 |
133 EXPORT_C TUint CSsmUiSpecific::SimStatusPropertyKey() |
213 EXPORT_C TUint CSsmUiSpecific::SimStatusPropertyKey() |
134 { |
214 { |
135 return KSimStatusPropertyKey; |
215 if (!IsTestPsKeyDefined()) |
|
216 { |
|
217 DEBUGPRINT1A("SimStatusPropertyKey :: Calling S60 plugins functions "); |
|
218 return KPSSimStatus; |
|
219 } |
|
220 else |
|
221 { |
|
222 DEBUGPRINT1A("SimStatusPropertyKey :: Calling Symbian(dummy) plugins functions "); |
|
223 return KSimStatusPropertyKey; |
|
224 } |
136 } |
225 } |
137 |
226 |
138 EXPORT_C TBool CSsmUiSpecific::IsSimStateChangeAllowed() |
227 EXPORT_C TBool CSsmUiSpecific::IsSimStateChangeAllowed() |
139 { |
228 { |
140 return ETrue; |
229 if (!IsTestPsKeyDefined()) |
|
230 { |
|
231 DEBUGPRINT1A("IsSimStateChangeAllowed :: Calling S60 plugins functions "); |
|
232 TSsmState state; |
|
233 TInt err = SsmMapperUtility::GetCurrentState( state ); |
|
234 ERROR( err, "Failed to get current state" ); |
|
235 return ( err == KErrNone && |
|
236 ( state.MainState() == ESsmStartup && state.SubState() == ESsmStateSecurityCheck ) || |
|
237 ( state.MainState() == ESsmStartup && state.SubState() == ESsmStateNonCritical ) || |
|
238 state.MainState() == ESsmNormal ); |
|
239 } |
|
240 else |
|
241 { |
|
242 DEBUGPRINT1A("IsSimStateChangeAllowed :: Calling Symbian(dummy) plugins functions "); |
|
243 return ETrue; |
|
244 } |
|
245 |
141 } |
246 } |
142 |
247 |
143 EXPORT_C TBool CSsmUiSpecific::IsAmaStarterSupported() |
248 EXPORT_C TBool CSsmUiSpecific::IsAmaStarterSupported() |
144 { |
249 { |
145 return ETrue; |
250 if (!IsTestPsKeyDefined()) |
|
251 { |
|
252 DEBUGPRINT1A("IsAmaStarterSupported :: Calling S60 plugins functions "); |
|
253 return SsmMapperUtility::FeatureStatus( TUid::Uid( KFeatureIdExtendedStartup ) ); |
|
254 } |
|
255 else |
|
256 { |
|
257 DEBUGPRINT1A("IsAmaStarterSupported :: Calling Symbian(dummy) plugins functions "); |
|
258 return ETrue; |
|
259 } |
|
260 |
146 } |
261 } |
147 |
262 |
148 EXPORT_C HBufC* CSsmUiSpecific::GetTsyModuleNameL() |
263 EXPORT_C HBufC* CSsmUiSpecific::GetTsyModuleNameL() |
149 { |
264 { |
150 HBufC* tstModuleName = KTsyModuleName().AllocL(); |
265 DEBUGPRINT1A("GetTsyModuleNameL :: Calling S60 plugins functions "); |
151 return tstModuleName; |
266 /***************************************************** |
|
267 * Series 60 Customer / TSY |
|
268 * Needs customer TSY implementation |
|
269 *****************************************************/ |
|
270 |
|
271 HBufC* name = KMmTsyModuleName().AllocL(); |
|
272 INFO_1( "TSY name: %S", name ); |
|
273 return name; |
152 } |
274 } |
153 |
275 |
154 EXPORT_C TUid CSsmUiSpecific::StarterPSUid() |
276 EXPORT_C TUid CSsmUiSpecific::StarterPSUid() |
155 { |
277 { |
156 return KSecurityStatusPropertyCategory; |
278 if (!IsTestPsKeyDefined()) |
|
279 { |
|
280 DEBUGPRINT1A("StarterPSUid :: Calling S60 plugins functions "); |
|
281 return KPSStarterUid; |
|
282 } |
|
283 else |
|
284 { |
|
285 DEBUGPRINT1A("StartupPSUid :: Calling Symbian(dummy) plugins functions "); |
|
286 return KSecurityStatusPropertyCategory; |
|
287 } |
157 } |
288 } |
158 |
289 |
159 EXPORT_C HBufC* CSsmUiSpecific::PhoneTsyNameL() |
290 EXPORT_C HBufC* CSsmUiSpecific::PhoneTsyNameL() |
160 { |
291 { |
161 HBufC* tsyPhoneName = KTsyPhoneName().AllocL(); |
292 DEBUGPRINT1A("PhoneTsyNameL :: Calling S60 plugins functions "); |
162 return tsyPhoneName; |
293 /***************************************************** |
|
294 * Series 60 Customer / TSY |
|
295 * Needs customer TSY implementation |
|
296 *****************************************************/ |
|
297 |
|
298 HBufC* name = KMmTsyPhoneName().AllocL(); |
|
299 INFO_1( "Phone name: %S", name ); |
|
300 return name; |
163 } |
301 } |
164 |
302 |
165 EXPORT_C TBool CSsmUiSpecific::IsSimPresent() |
303 EXPORT_C TBool CSsmUiSpecific::IsSimPresent() |
166 { |
304 { |
167 return ETrue; |
305 if (!IsTestPsKeyDefined()) |
|
306 { |
|
307 DEBUGPRINT1A("IsSimPresent :: Calling S60 plugins functions "); |
|
308 TInt value( 0 ); |
|
309 TInt err = RProperty::Get( SsmMapperUtility::PsUid( KPSUidStartup ), KPSSimStatus, value ); |
|
310 ERROR( err, "Failed to get value of KPSUidStartup::KPSSimStatus" ); |
|
311 return ( err == KErrNone && |
|
312 ( value == ESimUsable || |
|
313 value == ESimReadable || |
|
314 value == ESimNotReady ) ); |
|
315 } |
|
316 else |
|
317 { |
|
318 DEBUGPRINT1A("IsSimPresent :: Calling Symbian(dummy) plugins functions "); |
|
319 return ETrue; |
|
320 } |
168 } |
321 } |
169 |
322 |
170 EXPORT_C TBool CSsmUiSpecific::IsSimlessOfflineSupported() |
323 EXPORT_C TBool CSsmUiSpecific::IsSimlessOfflineSupported() |
171 { |
324 { |
172 return ETrue; |
325 if (!IsTestPsKeyDefined()) |
|
326 { |
|
327 DEBUGPRINT1A("IsSimlessOfflineSupported :: Calling S60 plugins functions "); |
|
328 return SsmMapperUtility::FeatureStatus( |
|
329 TUid::Uid( KFeatureIdFfSimlessOfflineSupport ) ); |
|
330 } |
|
331 else |
|
332 { |
|
333 DEBUGPRINT1A("IsSimlessOfflineSupported :: Calling Symbian(dummy) plugins functions "); |
|
334 return ETrue; |
|
335 } |
173 } |
336 } |
174 |
337 |
175 EXPORT_C TBool CSsmUiSpecific::IsNormalBoot() |
338 EXPORT_C TBool CSsmUiSpecific::IsNormalBoot() |
176 { |
339 { |
177 return ETrue; |
340 if (!IsTestPsKeyDefined()) |
|
341 { |
|
342 DEBUGPRINT1A("IsNormalBoot :: Calling S60 plugins functions "); |
|
343 TInt value( 0 ); |
|
344 TInt errorCode = RProperty::Get( SsmMapperUtility::PsUid( KPSUidStartup ), KPSStartupReason, value ); |
|
345 ERROR( errorCode, "Failed to get value of KPSUidStartup::KPSStartupReason" ); |
|
346 |
|
347 TBool ret = ( errorCode == KErrNone && value == ENormalStartup ); |
|
348 INFO_1( "Is normal boot = %d", ret ); |
|
349 return ret; |
|
350 } |
|
351 else |
|
352 { |
|
353 DEBUGPRINT1A("IsNormalBoot :: Calling Symbian(dummy) plugins functions "); |
|
354 return ETrue; |
|
355 } |
178 } |
356 } |
179 |
357 |
180 EXPORT_C TBool CSsmUiSpecific::IsSimChangedReset() |
358 EXPORT_C TBool CSsmUiSpecific::IsSimChangedReset() |
181 { |
359 { |
182 return ETrue; |
360 if (!IsTestPsKeyDefined()) |
|
361 { |
|
362 DEBUGPRINT1A("IsSimChangedReset :: Calling S60 plugins functions "); |
|
363 TUid startupPsUid( SsmMapperUtility::PsUid( KPSUidStartup ) ); |
|
364 TInt value( 0 ); |
|
365 TInt errorCode = RProperty::Get( startupPsUid, KPSStartupReason, value ); |
|
366 ERROR( errorCode, "Failed to get value of KPSUidStartup::KPSStartupReason" ); |
|
367 |
|
368 TBool ret( EFalse ); |
|
369 if ( errorCode == KErrNone && value == ESIMStatusChangeReset ) |
|
370 { |
|
371 errorCode = RProperty::Get( startupPsUid, KPSSimChanged, value ); |
|
372 ret = ( errorCode == KErrNone && value == ESimChanged ); |
|
373 } |
|
374 |
|
375 INFO_1( "Is SIM changed reset = %d", ret ); |
|
376 return ret; |
|
377 } |
|
378 else |
|
379 { |
|
380 DEBUGPRINT1A("IsSimChangedReset :: Calling Symbian(dummy) plugins functions "); |
|
381 return ETrue; |
|
382 } |
183 } |
383 } |
184 |
384 |
185 EXPORT_C TUint CSsmUiSpecific::RFStatusPropertyKey() |
385 EXPORT_C TUint CSsmUiSpecific::RFStatusPropertyKey() |
186 { |
386 { |
187 return KRFStatusPropertyKey; |
387 if (!IsTestPsKeyDefined()) |
|
388 { |
|
389 DEBUGPRINT1A("RFStatusPropertyKey :: Calling S60 plugins functions "); |
|
390 return SWP_UID_SSM_RF_STATUS; |
|
391 } |
|
392 else |
|
393 { |
|
394 DEBUGPRINT1A("RFStatusPropertyKey :: Calling Symbian(dummy) plugins functions "); |
|
395 return KRFStatusPropertyKey; |
|
396 } |
188 } |
397 } |
189 |
398 |
190 EXPORT_C TUid CSsmUiSpecific::RFStatusPropertyCategory() |
399 EXPORT_C TUid CSsmUiSpecific::RFStatusPropertyCategory() |
191 { |
400 { |
192 return KRFStatusPropertyCategory; |
401 if (!IsTestPsKeyDefined()) |
193 } |
402 { |
|
403 DEBUGPRINT1A("RFStatusPropertyCategory :: Calling S60 plugins functions "); |
|
404 return TUid::Uid( SWP_UID_SSM_RF_STATUS ); |
|
405 } |
|
406 else |
|
407 { |
|
408 DEBUGPRINT1A("RFStatusPropertyCategory :: Calling Symbian(dummy) plugins functions "); |
|
409 return KRFStatusPropertyCategory; |
|
410 } |
|
411 } |
|
412 |
194 EXPORT_C TUint CSsmUiSpecific::ValidateRTCPropertyKey() |
413 EXPORT_C TUint CSsmUiSpecific::ValidateRTCPropertyKey() |
195 { |
414 { |
196 return KValidateRTCPropertyKey; |
415 if (!IsTestPsKeyDefined()) |
|
416 { |
|
417 DEBUGPRINT1A("ValidateRTCPropertyKey :: Calling S60 plugins functions "); |
|
418 return KRTCPropertyKey; |
|
419 } |
|
420 else |
|
421 { |
|
422 DEBUGPRINT1A("ValidateRTCPropertyKey :: Calling Symbian(dummy) plugins functions "); |
|
423 return KValidateRTCPropertyKey; |
|
424 } |
|
425 |
197 } |
426 } |
198 |
427 |
199 EXPORT_C TUid CSsmUiSpecific::ValidateRTCPropertyCategory() |
428 EXPORT_C TUid CSsmUiSpecific::ValidateRTCPropertyCategory() |
200 { |
429 { |
201 return KValidateRTCPropertyCategory; |
430 if (!IsTestPsKeyDefined()) |
|
431 { |
|
432 DEBUGPRINT1A("ValidateRTCPropertyCategory :: Calling S60 plugins functions "); |
|
433 return KPSStarterUid; |
|
434 } |
|
435 else |
|
436 { |
|
437 DEBUGPRINT1A("ValidateRTCPropertyCategory :: Calling Symbian(dummy) plugins functions "); |
|
438 return KValidateRTCPropertyCategory; |
|
439 } |
202 } |
440 } |
203 |
441 |
204 EXPORT_C TInt CSsmUiSpecific::PhoneMemoryRootDriveId() |
442 EXPORT_C TInt CSsmUiSpecific::PhoneMemoryRootDriveId() |
205 { |
443 { |
206 return EDriveC; |
444 if (!IsTestPsKeyDefined()) |
|
445 { |
|
446 DEBUGPRINT1A("PhoneMemoryRootDriveId :: Calling S60 plugins functions "); |
|
447 TInt driveId = EDriveC; |
|
448 TDriveId driveIdBuf = PathInfo::PhoneMemoryRootPath().Left( KDriveIdLength ); |
|
449 if ( driveIdBuf.Length() > 0 ) |
|
450 { |
|
451 TInt err = RFs::CharToDrive( driveIdBuf[0], driveId ) ; |
|
452 INFO_1( "PhoneMemoryRootDriveId - CharToDrive returns: %d", err ); |
|
453 } |
|
454 |
|
455 INFO_1( "Phone memory root path ID: %d", driveId ); |
|
456 return driveId; |
|
457 } |
|
458 else |
|
459 { |
|
460 DEBUGPRINT1A("PhoneMemoryRootDriveId :: Calling Symbian(dummy) plugins functions "); |
|
461 return EDriveC; |
|
462 } |
207 } |
463 } |
208 |
464 |
209 /** |
465 /** |
210 Leaving construction inside ConstructL |
466 Leaving construction inside ConstructL |
211 */ |
467 */ |
212 void CSsmUiSpecific::ConstructL() |
468 void CSsmUiSpecific::ConstructL() |
213 { |
469 { |
214 User::LeaveIfError( iReservedPhoneMemoryFs.Connect() ); |
470 User::LeaveIfError( iReservedPhoneMemoryFs.Connect() ); |
215 } |
471 } |
|
472 |
|
473 /** |
|
474 Helper function to check for P&S Key |
|
475 */ |
|
476 TBool CSsmUiSpecific::IsTestPsKeyDefined() |
|
477 { |
|
478 TBool testPsKeyDefined = EFalse; |
|
479 TInt result = RProperty::Get(KPropertyCategory, KMiscPluginPropertyKey, testPsKeyDefined); |
|
480 DEBUGPRINT3(_L("KMiscPluginPropertyKey %d Error %d"), testPsKeyDefined, result); |
|
481 if ((KErrNone != result) && (KErrNotFound != result)) |
|
482 { |
|
483 User::Leave(result); |
|
484 } |
|
485 return testPsKeyDefined; |
|
486 } |
216 |
487 |
217 /** |
488 /** |
218 Reserve two ClusterSize in Phone Memory Space on H/W |
489 Reserve two ClusterSize in Phone Memory Space on H/W |
219 and 512 bytes for __WINS__ |
490 and 512 bytes for __WINS__ |
220 @return KErrNone if successful or systemwide error |
491 @return KErrNone if successful or systemwide error |