32 #include <cntdef.h> |
32 #include <cntdef.h> |
33 #include <TProfileToneSettings.h> |
33 #include <TProfileToneSettings.h> |
34 #include <MProfilePttSettings.h> |
34 #include <MProfilePttSettings.h> |
35 #include <featmgr.h> |
35 #include <featmgr.h> |
36 #include <bldvariant.hrh> |
36 #include <bldvariant.hrh> |
37 #include <RSSSettings.h> |
37 #include <rsssettings.h> |
38 #include <pathinfo.h> |
38 #include <pathinfo.h> |
39 #include <MProfilesLocalFeatures.h> |
39 #include <MProfilesLocalFeatures.h> |
40 #include <MProfileUtilitySingleton.h> |
40 #include <MProfileUtilitySingleton.h> |
41 #include <ProfilesVariant.hrh> |
41 #include <ProfilesVariant.hrh> |
42 #include <ProfileEngineDomainConstants.h> |
42 #include <ProfileEngineDomainConstants.h> |
|
43 #include "CProfileVibraSettingsImpl.h" |
43 |
44 |
44 // CONSTANTS |
45 // CONSTANTS |
45 // Max. number of Alert for groups: |
46 // Max. number of Alert for groups: |
46 const TInt KProfilesMaxAlertForGroups = 512; |
47 const TInt KProfilesMaxAlertForGroups = 512; |
47 const TInt KProfilesMaxFlagsLength = 4; |
48 const TInt KProfilesMaxFlagsLength = 4; |
75 iProfileExtraTones = CProfileExtraTonesImpl::NewL(); |
76 iProfileExtraTones = CProfileExtraTonesImpl::NewL(); |
76 iProfilePresence = CProfilePresenceImpl::NewL(); |
77 iProfilePresence = CProfilePresenceImpl::NewL(); |
77 // ProfileUtility must be released in destructor: |
78 // ProfileUtility must be released in destructor: |
78 iFeatures = &( ProfileUtilityInstanceL().ProfilesLocalFeatures() ); |
79 iFeatures = &( ProfileUtilityInstanceL().ProfilesLocalFeatures() ); |
79 iProfileExtraSettings = CProfileExtraSettingsImpl::NewL(); |
80 iProfileExtraSettings = CProfileExtraSettingsImpl::NewL(); |
|
81 iProfileVibraSettings = CProfileVibraSettingsImpl::NewL(); |
80 } |
82 } |
81 |
83 |
82 // ----------------------------------------------------------------------------- |
84 // ----------------------------------------------------------------------------- |
83 // CProfileImpl::ConstructL |
85 // CProfileImpl::ConstructL |
84 // Symbian 2nd phase constructor can leave. |
86 // Symbian 2nd phase constructor can leave. |
85 // ----------------------------------------------------------------------------- |
87 // ----------------------------------------------------------------------------- |
86 // |
88 // |
87 void CProfileImpl::ConstructL( |
89 void CProfileImpl::ConstructL( |
88 const MProfileExtended& aProfile, |
90 const MProfileExtended2& aProfile, |
89 TInt aId ) |
91 TInt aId ) |
90 { |
92 { |
91 iProfileName = CProfileNameImpl::NewLC( aId, KNullDesC ); |
93 iProfileName = CProfileNameImpl::NewLC( aId, KNullDesC ); |
92 CleanupStack::Pop(); // iProfileName |
94 CleanupStack::Pop(); // iProfileName |
93 CommonConstructL(); |
95 CommonConstructL(); |
94 iProfileTones = CProfileTonesImpl::NewL( aProfile.ProfileTones() ); |
96 iProfileTones = CProfileTonesImpl::NewL( aProfile.ProfileTones() ); |
95 iProfileExtraTones = CProfileExtraTonesImpl::NewL( |
97 iProfileExtraTones = CProfileExtraTonesImpl::NewL( |
96 aProfile.ProfileExtraTones() ); |
98 aProfile.ProfileExtraTones2() ); |
97 |
99 |
98 iFeatures = &( ProfileUtilityInstanceL().ProfilesLocalFeatures() ); |
100 iFeatures = &( ProfileUtilityInstanceL().ProfilesLocalFeatures() ); |
99 |
101 |
100 iProfileExtraSettings = CProfileExtraSettingsImpl::NewL(); |
102 iProfileExtraSettings = CProfileExtraSettingsImpl::NewL(); |
101 iProfilePresence = CProfilePresenceImpl::NewL( |
103 iProfilePresence = CProfilePresenceImpl::NewL( |
102 aProfile.ProfilePresence() ); |
104 aProfile.ProfilePresence() ); |
103 iVisibleFlags = aProfile.VisibleFlags(); |
105 iVisibleFlags = aProfile.VisibleFlags(); |
104 iModifiableFlags = aProfile.ModifiableFlags(); |
106 iModifiableFlags = aProfile.ModifiableFlags(); |
|
107 |
|
108 iProfileVibraSettings = CProfileVibraSettingsImpl::NewL(); |
|
109 |
105 } |
110 } |
106 |
111 |
107 // ----------------------------------------------------------------------------- |
112 // ----------------------------------------------------------------------------- |
108 // CProfileImpl::NewL |
113 // CProfileImpl::NewL |
109 // Two-phased constructor. |
114 // Two-phased constructor. |
139 // Two-phased constructor. |
144 // Two-phased constructor. |
140 // ----------------------------------------------------------------------------- |
145 // ----------------------------------------------------------------------------- |
141 // |
146 // |
142 CProfileImpl* CProfileImpl::NewLC( |
147 CProfileImpl* CProfileImpl::NewLC( |
143 RFs& aFs, |
148 RFs& aFs, |
144 const MProfileExtended& aProfile, |
149 const MProfileExtended2& aProfile, |
145 TInt aId ) |
150 TInt aId ) |
146 { |
151 { |
147 CProfileImpl* self = new( ELeave ) CProfileImpl( aFs ); |
152 CProfileImpl* self = new( ELeave ) CProfileImpl( aFs ); |
148 |
153 |
149 CleanupStack::PushL( self ); |
154 CleanupStack::PushL( self ); |
480 iProfileTones->InternalizeL( aCenRep, aProfileId ); |
487 iProfileTones->InternalizeL( aCenRep, aProfileId ); |
481 iProfileExtraTones->InternalizeL( aCenRep, aProfileId ); |
488 iProfileExtraTones->InternalizeL( aCenRep, aProfileId ); |
482 |
489 |
483 iProfilePresence->InternalizeL( aCenRep, aProfileId ); |
490 iProfilePresence->InternalizeL( aCenRep, aProfileId ); |
484 iProfileExtraSettings->InternalizeL( aCenRep, aProfileId ); |
491 iProfileExtraSettings->InternalizeL( aCenRep, aProfileId ); |
|
492 |
|
493 iProfileVibraSettings->InternalizeL( aCenRep, aProfileId ); |
485 } |
494 } |
486 |
495 |
487 void CProfileImpl::ExternalizeL( CRepository& aCenRep ) |
496 void CProfileImpl::ExternalizeL( CRepository& aCenRep ) |
488 { |
497 { |
489 TInt profileId = iProfileName->Id(); |
498 TInt profileId = iProfileName->Id(); |
516 // Tones and presence |
525 // Tones and presence |
517 iProfileTones->ExternalizeL( aCenRep, profileId ); |
526 iProfileTones->ExternalizeL( aCenRep, profileId ); |
518 iProfileExtraTones->ExternalizeL( aCenRep, profileId ); |
527 iProfileExtraTones->ExternalizeL( aCenRep, profileId ); |
519 iProfilePresence->ExternalizeL( aCenRep, profileId ); |
528 iProfilePresence->ExternalizeL( aCenRep, profileId ); |
520 iProfileExtraSettings->ExternalizeL( aCenRep, profileId ); |
529 iProfileExtraSettings->ExternalizeL( aCenRep, profileId ); |
|
530 |
|
531 iProfileVibraSettings->ExternalizeL( aCenRep, profileId ); |
521 } |
532 } |
522 |
533 |
523 // ----------------------------------------------------------------------------- |
534 // ----------------------------------------------------------------------------- |
524 // CProfileImpl::SetAlertForL |
535 // CProfileImpl::SetAlertForL |
525 // |
536 // |
563 iAlwaysOnLineEmail = FeatureManager::FeatureSupported( KFeatureIdAlwaysOnLineEmail ); |
574 iAlwaysOnLineEmail = FeatureManager::FeatureSupported( KFeatureIdAlwaysOnLineEmail ); |
564 iOmaPoc = FeatureManager::FeatureSupported( KFeatureIdOmaPoc ); |
575 iOmaPoc = FeatureManager::FeatureSupported( KFeatureIdOmaPoc ); |
565 FeatureManager::UnInitializeLib(); |
576 FeatureManager::UnInitializeLib(); |
566 } |
577 } |
567 |
578 |
|
579 |
|
580 // ----------------------------------------------------------------------------- |
|
581 // CProfileImpl::ProfileExtraTones2 |
|
582 // |
|
583 // (other items were commented in a header). |
|
584 // ----------------------------------------------------------------------------- |
|
585 // |
|
586 const MProfileExtraTones2& CProfileImpl::ProfileExtraTones2() const |
|
587 { |
|
588 return *iProfileExtraTones; |
|
589 } |
|
590 |
|
591 // ----------------------------------------------------------------------------- |
|
592 // CProfileImpl::ProfileSetExtraTones2 |
|
593 // |
|
594 // (other items were commented in a header). |
|
595 // ----------------------------------------------------------------------------- |
|
596 // |
|
597 MProfileSetExtraTones2& CProfileImpl::ProfileSetExtraTones2() |
|
598 { |
|
599 return *iProfileExtraTones; |
|
600 } |
|
601 |
|
602 // ----------------------------------------------------------------------------- |
|
603 // CProfileImpl::ProfileVibraSettings |
|
604 // |
|
605 // (other items were commented in a header). |
|
606 // ----------------------------------------------------------------------------- |
|
607 // |
|
608 const MProfileVibraSettings& CProfileImpl::ProfileVibraSettings() const |
|
609 { |
|
610 return *iProfileVibraSettings; |
|
611 } |
|
612 |
|
613 // ----------------------------------------------------------------------------- |
|
614 // CProfileImpl::ProfileSetVibraSettings |
|
615 // |
|
616 // (other items were commented in a header). |
|
617 // ----------------------------------------------------------------------------- |
|
618 // |
|
619 MProfileSetVibraSettings& CProfileImpl::ProfileSetVibraSettings() |
|
620 { |
|
621 return *iProfileVibraSettings; |
|
622 } |
|
623 |
568 // End of File |
624 // End of File |