|
1 /* |
|
2 * Copyright (c) 2002 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: Implementation of the CProfileImpl. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "CProfileImpl.h" |
|
22 #include <e32svr.h> |
|
23 #include <cntitem.h> |
|
24 #include <CPbkContactEngine.h> |
|
25 #include <cntdb.h> |
|
26 #include <cntdef.h> |
|
27 #include <TProfileToneSettings.h> |
|
28 #include <MProfilePttSettings.h> |
|
29 #include <featmgr.h> |
|
30 #include <bldvariant.hrh> |
|
31 #include <RSSSettings.h> |
|
32 #include <pathinfo.h> |
|
33 #include "CProfileNameImpl.h" |
|
34 #include "CProfileTonesImpl.h" |
|
35 #include "CProfileExtraTonesImpl.h" |
|
36 #include "CProfileExtraSettingsImpl.h" |
|
37 #include "CProfilePresenceImpl.h" |
|
38 #include "MProfilesLocalFeatures.h" |
|
39 #include "MProfileUtilitySingleton.h" |
|
40 #include "ProfilesVariant.hrh" |
|
41 #include "ProfileEngUtils.h" |
|
42 #include "ProfileEnginePrivateCRKeys.h" |
|
43 #include <ProfileEngineDomainConstants.h> |
|
44 |
|
45 // CONSTANTS |
|
46 // Max. number of Alert for groups: |
|
47 const TInt KProfilesMaxAlertForGroups = 512; |
|
48 const TInt KProfilesMaxFlagsLength = 4; |
|
49 |
|
50 // FORWARD DECLARATIONS |
|
51 class CRepository; |
|
52 |
|
53 // ============================ MEMBER FUNCTIONS =============================== |
|
54 |
|
55 // ----------------------------------------------------------------------------- |
|
56 // CProfileImpl::CProfileImpl |
|
57 // C++ default constructor can NOT contain any code, that |
|
58 // might leave. |
|
59 // ----------------------------------------------------------------------------- |
|
60 // |
|
61 CProfileImpl::CProfileImpl( RFs& aFs ) |
|
62 : iFs( aFs ) |
|
63 { |
|
64 } |
|
65 |
|
66 // ----------------------------------------------------------------------------- |
|
67 // CProfileImpl::ConstructL |
|
68 // Symbian 2nd phase constructor can leave. |
|
69 // ----------------------------------------------------------------------------- |
|
70 // |
|
71 void CProfileImpl::ConstructL() |
|
72 { |
|
73 CommonConstructL(); |
|
74 iProfileName = CProfileNameImpl::NewL(); |
|
75 iProfileTones = CProfileTonesImpl::NewL(); |
|
76 iProfileExtraTones = CProfileExtraTonesImpl::NewL(); |
|
77 iProfilePresence = CProfilePresenceImpl::NewL(); |
|
78 // ProfileUtility must be released in destructor: |
|
79 iFeatures = &( ProfileUtilityInstanceL().ProfilesLocalFeatures() ); |
|
80 iProfileExtraSettings = CProfileExtraSettingsImpl::NewL(); |
|
81 } |
|
82 |
|
83 // ----------------------------------------------------------------------------- |
|
84 // CProfileImpl::ConstructL |
|
85 // Symbian 2nd phase constructor can leave. |
|
86 // ----------------------------------------------------------------------------- |
|
87 // |
|
88 void CProfileImpl::ConstructL( |
|
89 const MProfileExtended& aProfile, |
|
90 TInt aId ) |
|
91 { |
|
92 iProfileName = CProfileNameImpl::NewLC( aId, KNullDesC ); |
|
93 CleanupStack::Pop(); // iProfileName |
|
94 CommonConstructL(); |
|
95 iProfileTones = CProfileTonesImpl::NewL( aProfile.ProfileTones() ); |
|
96 iProfileExtraTones = CProfileExtraTonesImpl::NewL( |
|
97 aProfile.ProfileExtraTones() ); |
|
98 |
|
99 iFeatures = &( ProfileUtilityInstanceL().ProfilesLocalFeatures() ); |
|
100 |
|
101 iProfileExtraSettings = CProfileExtraSettingsImpl::NewL(); |
|
102 iProfilePresence = CProfilePresenceImpl::NewL( |
|
103 aProfile.ProfilePresence() ); |
|
104 iVisibleFlags = aProfile.VisibleFlags(); |
|
105 iModifiableFlags = aProfile.ModifiableFlags(); |
|
106 } |
|
107 |
|
108 // ----------------------------------------------------------------------------- |
|
109 // CProfileImpl::NewL |
|
110 // Two-phased constructor. |
|
111 // ----------------------------------------------------------------------------- |
|
112 // |
|
113 CProfileImpl* CProfileImpl::NewL( |
|
114 RFs& aFs ) |
|
115 { |
|
116 CProfileImpl* self = NewLC( aFs ); |
|
117 CleanupStack::Pop(); |
|
118 |
|
119 return self; |
|
120 } |
|
121 |
|
122 // ----------------------------------------------------------------------------- |
|
123 // CProfileImpl::NewLC |
|
124 // Two-phased constructor. |
|
125 // ----------------------------------------------------------------------------- |
|
126 // |
|
127 CProfileImpl* CProfileImpl::NewLC( |
|
128 RFs& aFs ) |
|
129 { |
|
130 CProfileImpl* self = new( ELeave ) CProfileImpl( aFs ); |
|
131 |
|
132 CleanupStack::PushL( self ); |
|
133 self->ConstructL(); |
|
134 |
|
135 return self; |
|
136 } |
|
137 |
|
138 // ----------------------------------------------------------------------------- |
|
139 // CProfileImpl::NewLC |
|
140 // Two-phased constructor. |
|
141 // ----------------------------------------------------------------------------- |
|
142 // |
|
143 CProfileImpl* CProfileImpl::NewLC( |
|
144 RFs& aFs, |
|
145 const MProfileExtended& aProfile, |
|
146 TInt aId ) |
|
147 { |
|
148 CProfileImpl* self = new( ELeave ) CProfileImpl( aFs ); |
|
149 |
|
150 CleanupStack::PushL( self ); |
|
151 self->ConstructL( aProfile, aId ); |
|
152 |
|
153 return self; |
|
154 } |
|
155 |
|
156 // Destructor |
|
157 CProfileImpl::~CProfileImpl() |
|
158 { |
|
159 delete iSilentTone; |
|
160 iAlertFor.Close(); |
|
161 |
|
162 delete iProfileExtraSettings; |
|
163 |
|
164 if ( iFeatures ) |
|
165 { |
|
166 ReleaseProfileUtility(); |
|
167 } |
|
168 |
|
169 delete iProfileName; |
|
170 delete iProfileTones; |
|
171 delete iProfileExtraTones; |
|
172 delete iProfilePresence; |
|
173 } |
|
174 |
|
175 // ----------------------------------------------------------------------------- |
|
176 // CProfileImpl::IsProfileNameChanged |
|
177 // |
|
178 // (other items were commented in a header). |
|
179 // ----------------------------------------------------------------------------- |
|
180 // |
|
181 TBool CProfileImpl::IsProfileNameChanged() const |
|
182 { |
|
183 return iProfileName->IsProfileNameChanged(); |
|
184 } |
|
185 |
|
186 // ----------------------------------------------------------------------------- |
|
187 // CProfileImpl::SetLocalizedProfileNameL |
|
188 // |
|
189 // (other items were commented in a header). |
|
190 // ----------------------------------------------------------------------------- |
|
191 // |
|
192 void CProfileImpl::SetLocalizedProfileNameL( |
|
193 const MProfilesNamesArray& aNameArray ) |
|
194 { |
|
195 iProfileName->SetLocalizedProfileNameL( aNameArray ); |
|
196 } |
|
197 |
|
198 // ----------------------------------------------------------------------------- |
|
199 // CProfileImpl::SetLocalizedProfileNameL |
|
200 // |
|
201 // (other items were commented in a header). |
|
202 // ----------------------------------------------------------------------------- |
|
203 // |
|
204 void CProfileImpl::SetLocalizedProfileNameL( const CProfileNameImpl& aNameImpl, |
|
205 const TDesC& aUniquePart ) |
|
206 { |
|
207 iProfileName->SetLocalizedProfileNameL( aNameImpl, aUniquePart ); |
|
208 } |
|
209 |
|
210 // ----------------------------------------------------------------------------- |
|
211 // CProfileImpl::AlertForL |
|
212 // |
|
213 // (other items were commented in a header). |
|
214 // ----------------------------------------------------------------------------- |
|
215 // |
|
216 const TArray<TContactItemId> CProfileImpl::AlertForL() |
|
217 { |
|
218 TInt contactIdListCount( iAlertFor.Count() ); |
|
219 if( contactIdListCount > 0 ) |
|
220 { |
|
221 // create CPbkContactEngine |
|
222 CPbkContactEngine* contactEngine = CPbkContactEngine::NewL( &iFs ); |
|
223 CleanupStack::PushL( contactEngine ); |
|
224 CContactIdArray* groupIds = contactEngine->Database().GetGroupIdListL(); |
|
225 |
|
226 if( !groupIds ) |
|
227 { // There are no groups in Contacts db -> clear the alert for IDs: |
|
228 iAlertFor.Reset(); |
|
229 } |
|
230 else |
|
231 { |
|
232 CleanupStack::PushL( groupIds ); |
|
233 TInt err; |
|
234 for( TInt i( 0 ) ; i < contactIdListCount ; ++i ) |
|
235 { |
|
236 err = groupIds->Find( iAlertFor[i] ); |
|
237 |
|
238 if( err == KErrNotFound ) |
|
239 { |
|
240 // remove this |
|
241 iAlertFor.Remove( i ); |
|
242 --contactIdListCount; |
|
243 --i; |
|
244 err = KErrNone; |
|
245 } |
|
246 User::LeaveIfError( err ); |
|
247 } |
|
248 CleanupStack::PopAndDestroy(); // groupIds |
|
249 } |
|
250 CleanupStack::PopAndDestroy(); // contactEngine |
|
251 } |
|
252 |
|
253 return iAlertFor.Array(); |
|
254 } |
|
255 |
|
256 // ----------------------------------------------------------------------------- |
|
257 // CProfileImpl::IsSilent |
|
258 // |
|
259 // (other items were commented in a header). |
|
260 // ----------------------------------------------------------------------------- |
|
261 // |
|
262 TBool CProfileImpl::IsSilent() const |
|
263 { |
|
264 TProfileRingingType ringType( iProfileTones->ToneSettings().iRingingType ); |
|
265 if ( ringType == EProfileRingingTypeSilent ) |
|
266 { |
|
267 // If ringing type is silent, the whole profile is considered as silent: |
|
268 return ETrue; |
|
269 } |
|
270 |
|
271 if ( ringType == EProfileRingingTypeBeepOnce ) |
|
272 { |
|
273 // If ringing type is beep once, the profile can not be silent: |
|
274 return EFalse; |
|
275 } |
|
276 |
|
277 TBool isSilent( EFalse ); |
|
278 TInt als( ESSSettingsAlsNotSupported ); |
|
279 ProfileEngUtils::GetAlternateLineService( als ); |
|
280 |
|
281 switch( als ) |
|
282 { |
|
283 case ESSSettingsAlsAlternate: |
|
284 { |
|
285 const TDesC& ringingTone2 = iProfileTones->RingingTone2(); |
|
286 isSilent = ( ( ringingTone2.CompareF( KNullDesC ) == 0 ) || |
|
287 ( ringingTone2.CompareF( *iSilentTone ) == 0 ) ); |
|
288 |
|
289 break; |
|
290 } |
|
291 case ESSSettingsAlsPrimary: // Fall through |
|
292 default: // = ESSSettingsAlsNotSupported |
|
293 { |
|
294 const TDesC& ringingTone1 = iProfileTones->RingingTone1(); |
|
295 isSilent = ( ( ringingTone1.CompareF( KNullDesC ) == 0 ) || |
|
296 ( ringingTone1.CompareF( *iSilentTone ) == 0 ) ); |
|
297 |
|
298 break; |
|
299 } |
|
300 } |
|
301 |
|
302 isSilent &= ( iProfileTones->MessageAlertTone().CompareF |
|
303 ( *iSilentTone ) == 0 ); |
|
304 |
|
305 if( iAlwaysOnLineEmail ) |
|
306 { |
|
307 // Email is supported |
|
308 const TDesC& emailTone = iProfileExtraTones->EmailAlertTone(); |
|
309 isSilent &= ( ( emailTone.CompareF( KNullDesC ) == 0 ) || |
|
310 ( emailTone.CompareF( *iSilentTone ) == 0 ) ); |
|
311 } |
|
312 if( iFeatures->IsFeatureSupported( KProEngFeatureIdVTRingingTone ) ) |
|
313 { |
|
314 // VT ringing tone is supported |
|
315 const TDesC& vtTone = iProfileExtraTones->VideoCallRingingTone(); |
|
316 isSilent &= ( ( vtTone.CompareF( KNullDesC ) == 0 ) || |
|
317 ( vtTone.CompareF( *iSilentTone ) == 0 ) ); |
|
318 } |
|
319 if( iOmaPoc ) |
|
320 { |
|
321 // POC ringing tone is supported |
|
322 const TDesC& pocTone = iProfileExtraSettings->ProfilePttSettings() |
|
323 .PttRingingTone(); |
|
324 isSilent &= ( ( pocTone.CompareF( KNullDesC ) == 0 ) || |
|
325 ( pocTone.CompareF( *iSilentTone ) == 0 ) ); |
|
326 } |
|
327 return isSilent; |
|
328 } |
|
329 |
|
330 // ----------------------------------------------------------------------------- |
|
331 // CProfileImpl::ProfileSetName |
|
332 // |
|
333 // (other items were commented in a header). |
|
334 // ----------------------------------------------------------------------------- |
|
335 // |
|
336 MProfileSetName& CProfileImpl::ProfileSetName() const |
|
337 { |
|
338 return *iProfileName; |
|
339 } |
|
340 |
|
341 // ----------------------------------------------------------------------------- |
|
342 // CProfileImpl::ProfileSetTones |
|
343 // |
|
344 // (other items were commented in a header). |
|
345 // ----------------------------------------------------------------------------- |
|
346 // |
|
347 MProfileSetTones& CProfileImpl::ProfileSetTones() const |
|
348 { |
|
349 return *iProfileTones; |
|
350 } |
|
351 |
|
352 // ----------------------------------------------------------------------------- |
|
353 // CProfileImpl::ProfilePresence |
|
354 // |
|
355 // (other items were commented in a header). |
|
356 // ----------------------------------------------------------------------------- |
|
357 // |
|
358 const MProfilePresence& CProfileImpl::ProfilePresence() const |
|
359 { |
|
360 return *iProfilePresence; |
|
361 } |
|
362 |
|
363 // ----------------------------------------------------------------------------- |
|
364 // CProfileImpl::ProfileSetPresence |
|
365 // |
|
366 // (other items were commented in a header). |
|
367 // ----------------------------------------------------------------------------- |
|
368 // |
|
369 MProfileSetPresence& CProfileImpl::ProfileSetPresence() const |
|
370 { |
|
371 return *iProfilePresence; |
|
372 } |
|
373 |
|
374 // ----------------------------------------------------------------------------- |
|
375 // CProfileImpl::ProfileSetExtraTones |
|
376 // |
|
377 // (other items were commented in a header). |
|
378 // ----------------------------------------------------------------------------- |
|
379 // |
|
380 MProfileSetExtraTones& CProfileImpl::ProfileSetExtraTones() const |
|
381 { |
|
382 return *iProfileExtraTones; |
|
383 } |
|
384 |
|
385 // ----------------------------------------------------------------------------- |
|
386 // CProfileImpl::ProfileSetExtraSettings |
|
387 // |
|
388 // (other items were commented in a header). |
|
389 // ----------------------------------------------------------------------------- |
|
390 // |
|
391 MProfileSetExtraSettings& CProfileImpl::ProfileSetExtraSettings() const |
|
392 { |
|
393 return *iProfileExtraSettings; |
|
394 } |
|
395 |
|
396 // ----------------------------------------------------------------------------- |
|
397 // CProfileImpl::ProfileName |
|
398 // |
|
399 // (other items were commented in a header). |
|
400 // ----------------------------------------------------------------------------- |
|
401 // |
|
402 const MProfileName& CProfileImpl::ProfileName() const |
|
403 { |
|
404 return *iProfileName; |
|
405 } |
|
406 |
|
407 // ----------------------------------------------------------------------------- |
|
408 // CProfileImpl::ProfileTones |
|
409 // |
|
410 // (other items were commented in a header). |
|
411 // ----------------------------------------------------------------------------- |
|
412 // |
|
413 const MProfileTones& CProfileImpl::ProfileTones() const |
|
414 { |
|
415 return *iProfileTones; |
|
416 } |
|
417 |
|
418 // ----------------------------------------------------------------------------- |
|
419 // CProfileImpl::ProfileExtraTones |
|
420 // |
|
421 // (other items were commented in a header). |
|
422 // ----------------------------------------------------------------------------- |
|
423 // |
|
424 const MProfileExtraTones& CProfileImpl::ProfileExtraTones() const |
|
425 { |
|
426 return *iProfileExtraTones; |
|
427 } |
|
428 |
|
429 // ----------------------------------------------------------------------------- |
|
430 // CProfileImpl::ProfileExtraSettings |
|
431 // |
|
432 // (other items were commented in a header). |
|
433 // ----------------------------------------------------------------------------- |
|
434 // |
|
435 const MProfileExtraSettings& CProfileImpl::ProfileExtraSettings() const |
|
436 { |
|
437 return *iProfileExtraSettings; |
|
438 } |
|
439 |
|
440 // ----------------------------------------------------------------------------- |
|
441 // CProfileImpl::Release |
|
442 // |
|
443 // (other items were commented in a header). |
|
444 // ----------------------------------------------------------------------------- |
|
445 // |
|
446 void CProfileImpl::Release() |
|
447 { |
|
448 delete this; |
|
449 } |
|
450 |
|
451 // ----------------------------------------------------------------------------- |
|
452 // CProfileImpl::ModifiableFlags |
|
453 // |
|
454 // (other items were commented in a header). |
|
455 // ----------------------------------------------------------------------------- |
|
456 // |
|
457 TUint32 CProfileImpl::ModifiableFlags() const |
|
458 { |
|
459 return iModifiableFlags; |
|
460 } |
|
461 |
|
462 // ----------------------------------------------------------------------------- |
|
463 // CProfileImpl::VisibleFlags |
|
464 // |
|
465 // (other items were commented in a header). |
|
466 // ----------------------------------------------------------------------------- |
|
467 // |
|
468 TUint32 CProfileImpl::VisibleFlags() const |
|
469 { |
|
470 return iVisibleFlags; |
|
471 } |
|
472 |
|
473 void CProfileImpl::InternalizeL( CRepository& aCenRep, TInt aProfileId ) |
|
474 { |
|
475 TBuf8< KProfilesMaxFlagsLength > flags; |
|
476 // Flags |
|
477 User::LeaveIfError( |
|
478 aCenRep.Get( ProfileEngUtils::ResolveKey( KProEngModifiableFlags, |
|
479 aProfileId ), flags ) ); |
|
480 ProfileEngUtils::GetUint32Presentation( iModifiableFlags, flags, 0 ); |
|
481 |
|
482 flags.Zero(); |
|
483 User::LeaveIfError( |
|
484 aCenRep.Get( ProfileEngUtils::ResolveKey( |
|
485 KProEngVisibleFlags, aProfileId ), flags ) ); |
|
486 ProfileEngUtils::GetUint32Presentation( iVisibleFlags, flags, 0 ); |
|
487 |
|
488 // Profile name and id |
|
489 iProfileName->InternalizeL( aCenRep, aProfileId ); |
|
490 |
|
491 // Alert for |
|
492 ProfileEngUtils::GetBinarySettingL( aCenRep, ProfileEngUtils::ResolveKey( |
|
493 KProEngAlertForGroups, aProfileId ), iAlertForBuf ); |
|
494 |
|
495 TInt count( iAlertForBuf.Length() ); |
|
496 const TInt KProEngContactIdLength( 4 ); |
|
497 const TInt KProEngThreeByteShift( 24 ); |
|
498 const TInt KProEngTwoByteShift( 16 ); |
|
499 const TInt KProEngOneByteShift( 8 ); |
|
500 |
|
501 for( TInt i( 0 ); i < count ; i+=KProEngContactIdLength ) |
|
502 { |
|
503 TUint32 id( ( iAlertForBuf[i] << KProEngThreeByteShift ) | |
|
504 ( iAlertForBuf[i+1] << KProEngTwoByteShift ) | |
|
505 ( iAlertForBuf[i+2] << KProEngOneByteShift ) | |
|
506 ( iAlertForBuf[i+3] ) ); |
|
507 User::LeaveIfError( iAlertFor.Append( TContactItemId( id ) ) ); |
|
508 } |
|
509 iAlertFor.Compress(); |
|
510 iAlertForBuf.Zero(); |
|
511 |
|
512 // Profile tones and presence |
|
513 iProfileTones->InternalizeL( aCenRep, aProfileId ); |
|
514 iProfileExtraTones->InternalizeL( aCenRep, aProfileId ); |
|
515 |
|
516 iProfilePresence->InternalizeL( aCenRep, aProfileId ); |
|
517 iProfileExtraSettings->InternalizeL( aCenRep, aProfileId ); |
|
518 } |
|
519 |
|
520 void CProfileImpl::ExternalizeL( CRepository& aCenRep ) |
|
521 { |
|
522 TInt profileId = iProfileName->Id(); |
|
523 |
|
524 // Flags aren't externalized because they should not be modified in runtime |
|
525 |
|
526 // Profile name and id |
|
527 iProfileName->ExternalizeL( aCenRep ); |
|
528 |
|
529 // Alert for |
|
530 iAlertForBuf.Zero(); |
|
531 TInt count( iAlertFor.Count() ); |
|
532 for( TInt i( 0 ) ; i < count ; ++i ) |
|
533 { |
|
534 TContactItemId id( iAlertFor[i] ); |
|
535 TUint8 pieceOfId( ( iAlertFor[i] >> 24 ) & 0x000000FF ); |
|
536 iAlertForBuf.Append( pieceOfId ); |
|
537 pieceOfId = ( iAlertFor[i] >> 16 & 0x000000FF ); |
|
538 iAlertForBuf.Append( pieceOfId ); |
|
539 pieceOfId = ( iAlertFor[i] >> 8 & 0x000000FF ); |
|
540 iAlertForBuf.Append( pieceOfId ); |
|
541 pieceOfId = ( iAlertFor[i] & 0x000000FF ); |
|
542 iAlertForBuf.Append( pieceOfId ); |
|
543 } |
|
544 User::LeaveIfError( |
|
545 aCenRep.Set( ProfileEngUtils::ResolveKey( KProEngAlertForGroups, |
|
546 profileId ), iAlertForBuf ) ); |
|
547 iAlertForBuf.Zero(); |
|
548 |
|
549 // Tones and presence |
|
550 iProfileTones->ExternalizeL( aCenRep, profileId ); |
|
551 iProfileExtraTones->ExternalizeL( aCenRep, profileId ); |
|
552 iProfilePresence->ExternalizeL( aCenRep, profileId ); |
|
553 iProfileExtraSettings->ExternalizeL( aCenRep, profileId ); |
|
554 } |
|
555 |
|
556 // ----------------------------------------------------------------------------- |
|
557 // CProfileImpl::SetAlertForL |
|
558 // |
|
559 // (other items were commented in a header). |
|
560 // ----------------------------------------------------------------------------- |
|
561 // |
|
562 void CProfileImpl::SetAlertForL( const TArray<TContactItemId>& aAlertFor ) |
|
563 { |
|
564 TInt count( aAlertFor.Count() ); |
|
565 if( count > KProfilesMaxAlertForGroups ) |
|
566 { |
|
567 User::Leave( KErrArgument ); |
|
568 } |
|
569 |
|
570 iAlertFor.Reset(); |
|
571 |
|
572 for( TInt i( 0 ) ; i < count ; ++i ) |
|
573 { |
|
574 User::LeaveIfError( iAlertFor.Append( aAlertFor[i] ) ); |
|
575 } |
|
576 } |
|
577 |
|
578 // ----------------------------------------------------------------------------- |
|
579 // CProfileImpl::CommonConstructL |
|
580 // |
|
581 // (other items were commented in a header). |
|
582 // ----------------------------------------------------------------------------- |
|
583 // |
|
584 void CProfileImpl::CommonConstructL() |
|
585 { |
|
586 RBuf toneBuf; |
|
587 toneBuf.CreateL( KMaxFileName ); |
|
588 CleanupClosePushL( toneBuf ); |
|
589 toneBuf.Copy( TParsePtrC( PathInfo::RomRootPath() ).Drive() ); |
|
590 toneBuf.Append( KProfileNoSoundPath ); |
|
591 |
|
592 iSilentTone = toneBuf.AllocL(); |
|
593 CleanupStack::PopAndDestroy(); // toneBuf |
|
594 |
|
595 FeatureManager::InitializeLibL(); |
|
596 iAlwaysOnLineEmail = FeatureManager::FeatureSupported( KFeatureIdAlwaysOnLineEmail ); |
|
597 iOmaPoc = FeatureManager::FeatureSupported( KFeatureIdOmaPoc ); |
|
598 FeatureManager::UnInitializeLib(); |
|
599 } |
|
600 |
|
601 // End of File |