profilesservices/ProfileEngine/EngSrc/CProfileImpl.cpp
changeset 21 851e19007849
parent 18 e3554c9069b6
child 23 7e4c5a2ff1a2
--- a/profilesservices/ProfileEngine/EngSrc/CProfileImpl.cpp	Fri Apr 16 15:15:08 2010 +0300
+++ b/profilesservices/ProfileEngine/EngSrc/CProfileImpl.cpp	Mon May 03 12:46:45 2010 +0300
@@ -34,12 +34,13 @@
 #include <MProfilePttSettings.h>
 #include <featmgr.h>
 #include <bldvariant.hrh>
-#include <RSSSettings.h>
+#include <rsssettings.h>
 #include <pathinfo.h>
 #include <MProfilesLocalFeatures.h>
 #include <MProfileUtilitySingleton.h>
 #include <ProfilesVariant.hrh>
 #include <ProfileEngineDomainConstants.h>
+#include "CProfileVibraSettingsImpl.h"
 
 // CONSTANTS
 // Max. number of Alert for groups:
@@ -77,6 +78,7 @@
     // ProfileUtility must be released in destructor:
     iFeatures = &( ProfileUtilityInstanceL().ProfilesLocalFeatures() );
     iProfileExtraSettings = CProfileExtraSettingsImpl::NewL();
+    iProfileVibraSettings = CProfileVibraSettingsImpl::NewL();
     }
 
 // -----------------------------------------------------------------------------
@@ -85,7 +87,7 @@
 // -----------------------------------------------------------------------------
 //
 void CProfileImpl::ConstructL(
-    const MProfileExtended& aProfile,
+    const MProfileExtended2& aProfile,
     TInt aId )
     {
     iProfileName = CProfileNameImpl::NewLC( aId, KNullDesC );
@@ -93,7 +95,7 @@
     CommonConstructL();
     iProfileTones = CProfileTonesImpl::NewL( aProfile.ProfileTones() );
     iProfileExtraTones = CProfileExtraTonesImpl::NewL(
-        aProfile.ProfileExtraTones() );
+        aProfile.ProfileExtraTones2() );
 
     iFeatures = &( ProfileUtilityInstanceL().ProfilesLocalFeatures() );
 
@@ -102,6 +104,9 @@
         aProfile.ProfilePresence() );
     iVisibleFlags = aProfile.VisibleFlags();
     iModifiableFlags = aProfile.ModifiableFlags();
+    
+    iProfileVibraSettings = CProfileVibraSettingsImpl::NewL();
+    
     }
 
 // -----------------------------------------------------------------------------
@@ -141,7 +146,7 @@
 //
 CProfileImpl* CProfileImpl::NewLC(
     RFs& aFs,
-    const MProfileExtended& aProfile,
+    const MProfileExtended2& aProfile,
     TInt aId )
     {
     CProfileImpl* self = new( ELeave ) CProfileImpl( aFs );
@@ -169,6 +174,8 @@
     delete iProfileTones;
     delete iProfileExtraTones;
     delete iProfilePresence;
+    
+    delete iProfileVibraSettings;
     }
 
 // -----------------------------------------------------------------------------
@@ -482,6 +489,8 @@
 
     iProfilePresence->InternalizeL( aCenRep, aProfileId );
     iProfileExtraSettings->InternalizeL( aCenRep, aProfileId );
+    
+    iProfileVibraSettings->InternalizeL( aCenRep, aProfileId );
     }
 
 void CProfileImpl::ExternalizeL( CRepository& aCenRep )
@@ -518,6 +527,8 @@
     iProfileExtraTones->ExternalizeL( aCenRep, profileId );
     iProfilePresence->ExternalizeL( aCenRep, profileId );
     iProfileExtraSettings->ExternalizeL( aCenRep, profileId );
+    
+    iProfileVibraSettings->ExternalizeL(  aCenRep, profileId );
     }
 
 // -----------------------------------------------------------------------------
@@ -565,4 +576,49 @@
     FeatureManager::UnInitializeLib();
     }
 
+
+// -----------------------------------------------------------------------------
+// CProfileImpl::ProfileExtraTones2
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+const MProfileExtraTones2& CProfileImpl::ProfileExtraTones2() const 
+    {
+    return *iProfileExtraTones;
+    }
+
+// -----------------------------------------------------------------------------
+// CProfileImpl::ProfileSetExtraTones2
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+MProfileSetExtraTones2& CProfileImpl::ProfileSetExtraTones2() 
+    {
+    return *iProfileExtraTones;
+    }
+
+// -----------------------------------------------------------------------------
+// CProfileImpl::ProfileVibraSettings
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+const MProfileVibraSettings& CProfileImpl::ProfileVibraSettings() const
+    {
+    return  *iProfileVibraSettings;
+    }
+
+// -----------------------------------------------------------------------------
+// CProfileImpl::ProfileSetVibraSettings
+//
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+MProfileSetVibraSettings& CProfileImpl::ProfileSetVibraSettings()
+    {
+    return *iProfileVibraSettings;
+    }
+
 //  End of File