# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1271250975 -10800 # Node ID a4df7952b70645c0bdbee7558ec082f5b3de3a56 # Parent 63c33341dc192aedc7854b9a509ac893d4db39a3 Revision: 201013 Kit: 201015 diff -r 63c33341dc19 -r a4df7952b706 hapticsservices_pub/tactile_feedback_client_api/inc/touchlogicalfeedback.h --- a/hapticsservices_pub/tactile_feedback_client_api/inc/touchlogicalfeedback.h Wed Mar 31 22:03:28 2010 +0300 +++ b/hapticsservices_pub/tactile_feedback_client_api/inc/touchlogicalfeedback.h Wed Apr 14 16:16:15 2010 +0300 @@ -88,6 +88,12 @@ ETouchFeedbackCheckbox, ETouchFeedbackSensitiveInput, ETouchFeedbackCharacterInputButton, + ETouchFeedbackOptionsMenuOpened, + ETouchFeedbackOptionsMenuClosed, + ETouchFeedbackSubMenuOpened, + ETouchFeedbackSubMenuClosed, + ETouchFeedbackLongTap, + ETouchFeedbackDynamicSlider, ETouchFeedbackMultiTouchRecognized }; diff -r 63c33341dc19 -r a4df7952b706 tactilefeedback/tactilearearegistry/src/tactilearearegistry.cpp --- a/tactilefeedback/tactilearearegistry/src/tactilearearegistry.cpp Wed Mar 31 22:03:28 2010 +0300 +++ b/tactilefeedback/tactilearearegistry/src/tactilearearegistry.cpp Wed Apr 14 16:16:15 2010 +0300 @@ -158,6 +158,8 @@ const TTactileFeedbackDisconnectData& aData ) { // #1 + iTactileSemaphore.Wait(); + for ( TInt i=0; i < iChunkArray.Count(); i++ ) { if ( iChunkArray[i].iWindowGroupId == aData.iWindowGroupId ) @@ -170,6 +172,7 @@ break; } } + iTactileSemaphore.Signal(); } diff -r 63c33341dc19 -r a4df7952b706 tactilefeedback/tactilefeedbackclient/cenrep/2000B494.txt Binary file tactilefeedback/tactilefeedbackclient/cenrep/2000B494.txt has changed diff -r 63c33341dc19 -r a4df7952b706 tactilefeedback/tactilefeedbackclient/conf/tactilefeedback.confml Binary file tactilefeedback/tactilefeedbackclient/conf/tactilefeedback.confml has changed diff -r 63c33341dc19 -r a4df7952b706 tactilefeedback/tactilefeedbackclient/conf/tactilefeedback_2000B494.crml Binary file tactilefeedback/tactilefeedbackclient/conf/tactilefeedback_2000B494.crml has changed diff -r 63c33341dc19 -r a4df7952b706 tactilefeedback/tactilefeedbackresolver/data/9.2_TactileFeedbackLevel1_A.ivt Binary file tactilefeedback/tactilefeedbackresolver/data/9.2_TactileFeedbackLevel1_A.ivt has changed diff -r 63c33341dc19 -r a4df7952b706 tactilefeedback/tactilefeedbackresolver/data/9.2_TactileFeedbackLevel2_A.ivt Binary file tactilefeedback/tactilefeedbackresolver/data/9.2_TactileFeedbackLevel2_A.ivt has changed diff -r 63c33341dc19 -r a4df7952b706 tactilefeedback/tactilefeedbackresolver/data/9.2_TactileFeedbackLevel3_A.ivt Binary file tactilefeedback/tactilefeedbackresolver/data/9.2_TactileFeedbackLevel3_A.ivt has changed diff -r 63c33341dc19 -r a4df7952b706 tactilefeedback/tactilefeedbackresolver/data/tactilefeedbackeffects.ivt Binary file tactilefeedback/tactilefeedbackresolver/data/tactilefeedbackeffects.ivt has changed diff -r 63c33341dc19 -r a4df7952b706 tactilefeedback/tactilefeedbackresolver/group/bld.inf --- a/tactilefeedback/tactilefeedbackresolver/group/bld.inf Wed Mar 31 22:03:28 2010 +0300 +++ b/tactilefeedback/tactilefeedbackresolver/group/bld.inf Wed Apr 14 16:16:15 2010 +0300 @@ -24,8 +24,13 @@ DEFAULT PRJ_EXPORTS -../data/tactilefeedbackeffects.ivt /epoc32/data/z/private/10003B20/TactileFeedbackEffects.ivt -../data/tactilefeedbackeffects.ivt /epoc32/release/winscw/udeb/Z/private/10003B20/TactileFeedbackEffects.ivt +// Tactile feedback effects files +../data/9.2_TactileFeedbackLevel1_A.ivt /epoc32/data/z/private/10003B20/9.2_TactileFeedbackLevel1_A.ivt +../data/9.2_TactileFeedbackLevel1_A.ivt /epoc32/release/winscw/udeb/Z/private/10003B20/9.2_TactileFeedbackLevel1_A.ivt +../data/9.2_TactileFeedbackLevel2_A.ivt /epoc32/data/z/private/10003B20/9.2_TactileFeedbackLevel2_A.ivt +../data/9.2_TactileFeedbackLevel2_A.ivt /epoc32/release/winscw/udeb/Z/private/10003B20/9.2_TactileFeedbackLevel2_A.ivt +../data/9.2_TactileFeedbackLevel3_A.ivt /epoc32/data/z/private/10003B20/9.2_TactileFeedbackLevel3_A.ivt +../data/9.2_TactileFeedbackLevel3_A.ivt /epoc32/release/winscw/udeb/Z/private/10003B20/9.2_TactileFeedbackLevel3_A.ivt // IBY file ../rom/tactilefeedbackresolver.iby CORE_IBY_EXPORT_PATH(mw, tactilefeedbackresolver.iby) diff -r 63c33341dc19 -r a4df7952b706 tactilefeedback/tactilefeedbackresolver/inc/tactilefeedbackdomaincrkeys.h --- a/tactilefeedback/tactilefeedbackresolver/inc/tactilefeedbackdomaincrkeys.h Wed Mar 31 22:03:28 2010 +0300 +++ b/tactilefeedback/tactilefeedbackresolver/inc/tactilefeedbackdomaincrkeys.h Wed Apr 14 16:16:15 2010 +0300 @@ -58,9 +58,11 @@ * Possible values are: * Valid path to IVT file. * -* Default value: "z:\\private\\10003B20\\tactilefeedbackeffects.ivt" +* Default value: "z:\\private\\10003B20\\9.2_TactileFeedbackLevel*_A.ivt" **/ -const TUint32 KTactileHapticsIVTFile = 0x00000015; +const TUint32 KTactileHapticsLevel1IVTFile = 0x00000015; +const TUint32 KTactileHapticsLevel2IVTFile = 0x00000016; +const TUint32 KTactileHapticsLevel3IVTFile = 0x00000017; /** * Number of steps used to adjust vibra feedback strength @@ -70,7 +72,7 @@ * * Default value: 10 **/ -const TUint32 KTactileFeedbackVibraLevels = 0x00000016; +const TUint32 KTactileFeedbackVibraLevels = 0x00000018; /** * Number of steps used to adjust audio feedback volume @@ -80,7 +82,7 @@ * * Default value: 3 **/ -const TUint32 KTactileFeedbackAudioLevels = 0x00000017; +const TUint32 KTactileFeedbackAudioLevels = 0x00000019; #endif // TACTILEFEEDBACKDOMAINCRKEYS_H diff -r 63c33341dc19 -r a4df7952b706 tactilefeedback/tactilefeedbackresolver/plugins/tactileaudioplugin/src/tactileaudioplayer.cpp --- a/tactilefeedback/tactilefeedbackresolver/plugins/tactileaudioplugin/src/tactileaudioplayer.cpp Wed Mar 31 22:03:28 2010 +0300 +++ b/tactilefeedback/tactilefeedbackresolver/plugins/tactileaudioplugin/src/tactileaudioplayer.cpp Wed Apr 14 16:16:15 2010 +0300 @@ -150,6 +150,12 @@ case ETouchFeedbackFlick: // flow through case ETouchFeedbackCheckbox: // flow through case ETouchFeedbackCharacterInputButton: + case ETouchFeedbackOptionsMenuOpened: + case ETouchFeedbackOptionsMenuClosed: + case ETouchFeedbackSubMenuOpened: + case ETouchFeedbackSubMenuClosed: + case ETouchFeedbackLongTap: + case ETouchFeedbackDynamicSlider: case ETouchFeedbackMultiTouchRecognized: volumeIndex = 0; break; diff -r 63c33341dc19 -r a4df7952b706 tactilefeedback/tactilefeedbackresolver/plugins/tactilehapticsplugin/inc/tactilehapticsplayer.h --- a/tactilefeedback/tactilefeedbackresolver/plugins/tactilehapticsplugin/inc/tactilehapticsplayer.h Wed Mar 31 22:03:28 2010 +0300 +++ b/tactilefeedback/tactilefeedbackresolver/plugins/tactilehapticsplugin/inc/tactilehapticsplayer.h Wed Apr 14 16:16:15 2010 +0300 @@ -118,6 +118,11 @@ void DoPlayFeedbackL( TTouchLogicalFeedback aFeedback ); /** + * Get IVT file Id via vibra level. + */ + TUint32 IVTFileId(); + + /** * Reads IVT data from file to buffer. * */ @@ -204,6 +209,11 @@ * Own. */ CProfileChangeNotifyHandler* iProfileHandler; + + /** + * Current vibra level. + */ + TInt iVibraLevel; }; diff -r 63c33341dc19 -r a4df7952b706 tactilefeedback/tactilefeedbackresolver/plugins/tactilehapticsplugin/src/tactilehapticsplayer.cpp --- a/tactilefeedback/tactilefeedbackresolver/plugins/tactilehapticsplugin/src/tactilehapticsplayer.cpp Wed Mar 31 22:03:28 2010 +0300 +++ b/tactilefeedback/tactilefeedbackresolver/plugins/tactilehapticsplugin/src/tactilehapticsplayer.cpp Wed Apr 14 16:16:15 2010 +0300 @@ -63,6 +63,12 @@ _LIT8( KTFCheckbox, "TFCheckbox"); _LIT8( KTFSensitiveInput, "TFSensitiveInput"); _LIT8( KTFCharacterInputButton, "TFCharacterInputButton"); +_LIT8( KTFOptionsMenuOpened, "TFOptionsMenuOpened"); +_LIT8( KTFOptionsMenuClosed, "TFOptionsMenuClosed"); +_LIT8( KTFSubMenuOpened, "TFSubMenuOpened"); +_LIT8( KTFSubMenuClosed, "TFSubMenuClosed"); +_LIT8( KTFLongTap, "TFLongTap"); +_LIT8( KTFDynamicSlider, "TFDynamicSlider"); _LIT8( KTFMultiTouchRecognized, "TFMultiTouchRecognized"); // Continuous feedback's names @@ -114,12 +120,26 @@ // As a temporary fix to EAKH-7LKANT, the strength is (over)read from // profiles engine InitializeProfilesEngineL(); + + if ( iVibraLevel > EProfileAudioFeedbackLevel3 ) + { + User::Leave( KErrGeneral ); + } User::LeaveIfError( iHaptics->SetDeviceProperty( CHWRMHaptics::EHWRMHapticsStrength, iStrength ) ); TFileName ivtFile; - iRepository.Get( KTactileHapticsIVTFile, ivtFile ); + if ( iVibraLevel != EProfileTactileFeedbackOff ) + { + iRepository.Get( IVTFileId(), ivtFile ); + } + else + { + // Load KTactileHapticsLevel1IVTFile as default IVT file + // to start up if vibra level is EProfileTactileFeedbackOff. + iRepository.Get( KTactileHapticsLevel1IVTFile, ivtFile ); + } HBufC8* ivtBuf = IVTBufAllocL( ivtFile ); CleanupStack::PushL( ivtBuf ); @@ -189,8 +209,9 @@ // void CTactileHapticsPlayer::DoPlayFeedbackL( TTouchLogicalFeedback aFeedback ) { - // Check if hapticts strength is set to zero. - if ( !iStrength ) + // Check if hapticts strength is set to zero or + // vibra level is EProfileTactileFeedbackOff. + if ( !iStrength || iVibraLevel == EProfileTactileFeedbackOff) { User::Leave(KErrNotReady); } @@ -262,6 +283,24 @@ case ETouchFeedbackCharacterInputButton: name = KTFCharacterInputButton; break; + case ETouchFeedbackOptionsMenuOpened: + name = KTFOptionsMenuOpened; + break; + case ETouchFeedbackOptionsMenuClosed: + name = KTFOptionsMenuClosed; + break; + case ETouchFeedbackSubMenuOpened: + name = KTFSubMenuOpened; + break; + case ETouchFeedbackSubMenuClosed: + name = KTFSubMenuClosed; + break; + case ETouchFeedbackLongTap: + name = KTFLongTap; + break; + case ETouchFeedbackDynamicSlider: + name = KTFDynamicSlider; + break; case ETouchFeedbackMultiTouchRecognized: name = KTFMultiTouchRecognized; break; @@ -282,6 +321,28 @@ } // --------------------------------------------------------------------------- +// Get IVT file Id via vibra level. +// --------------------------------------------------------------------------- +// +TUint32 CTactileHapticsPlayer::IVTFileId() + { + TUint32 fileId = 0; + switch ( iVibraLevel ) + { + case EProfileTactileFeedbackLevel1: + fileId = KTactileHapticsLevel1IVTFile; + break; + case EProfileTactileFeedbackLevel2: + fileId = KTactileHapticsLevel2IVTFile; + break; + case EProfileTactileFeedbackLevel3: + fileId = KTactileHapticsLevel3IVTFile; + break; + } + return fileId; + } + +// --------------------------------------------------------------------------- // Load IVT file. // --------------------------------------------------------------------------- // @@ -376,9 +437,9 @@ periodicDef ); // Effect's magnitude value in IVT file is used as max value for - // continuous effects. - iMultiplier = periodicDef.iMagnitude / 100; - periodicDef.iMagnitude = aIntensity * iMultiplier; + // continuous effects and Attack level is used as minimum value + iMultiplier = ( periodicDef.iMagnitude - periodicDef.iAttackLevel ) / 100; + periodicDef.iMagnitude = aIntensity * iMultiplier + periodicDef.iAttackLevel; if ( ret == KErrNone ) { @@ -395,10 +456,10 @@ iEffectIndex, magSweepDef ); - // Effect's magnitude value in IVT file is used as max value for - // continuous effects. - iMultiplier = magSweepDef.iMagnitude / 100; - magSweepDef.iMagnitude = aIntensity * iMultiplier; + // Effect's magnitude value in IVT file is used as max value for + // continuous effects and Attack level is used as minimum value + iMultiplier = ( magSweepDef.iMagnitude - magSweepDef.iAttackLevel ) / 100; + magSweepDef.iMagnitude = aIntensity * iMultiplier + magSweepDef.iAttackLevel; if ( ret == KErrNone ) { @@ -452,7 +513,7 @@ iEffectIndex, periodicDef ); - periodicDef.iMagnitude = intensity; + periodicDef.iMagnitude = intensity + periodicDef.iAttackLevel; iHaptics->ModifyPlayingPeriodicEffect( iEffectHandle, periodicDef ); @@ -466,7 +527,7 @@ iEffectIndex, magSweepDef ); - magSweepDef.iMagnitude = intensity; + magSweepDef.iMagnitude = intensity + magSweepDef.iAttackLevel; iHaptics->ModifyPlayingMagSweepEffect( iEffectHandle, magSweepDef ); @@ -517,10 +578,12 @@ iStrength ); } break; - case KTactileHapticsIVTFile: + case KTactileHapticsLevel1IVTFile: + case KTactileHapticsLevel2IVTFile: + case KTactileHapticsLevel3IVTFile: { TFileName ivtFile; - iRepository.Get( KTactileHapticsIVTFile, ivtFile ); + iRepository.Get( aId, ivtFile ); HBufC8* ivtBuf = IVTBufAllocL( ivtFile ); if ( ivtBuf ) @@ -616,8 +679,14 @@ TProfileEvent /*aProfileEvent*/, TInt /*aProfileId*/ ) { + TInt oldVibraLevel = iVibraLevel; InitializeProfilesEngineL(); - iHaptics->SetDeviceProperty( CHWRMHaptics::EHWRMHapticsStrength, iStrength ); + iHaptics->SetDeviceProperty( CHWRMHaptics::EHWRMHapticsStrength, iStrength ); + if ( iVibraLevel != oldVibraLevel && + iVibraLevel != EProfileTactileFeedbackOff ) + { + HandleNotifyGeneric( IVTFileId() ); + } } // --------------------------------------------------------------------------- @@ -640,10 +709,8 @@ const MProfileFeedbackSettings& feedbackSettings = extraSettings.ProfileFeedbackSettings(); - TProfileTactileFeedback strength = feedbackSettings.TactileFeedback(); - iStrength = 100 * ( EProfileTactileFeedbackLevel3 == strength ? 100 : - EProfileTactileFeedbackLevel2 == strength ? 60 : - EProfileTactileFeedbackLevel1 == strength ? 30 : 0 ); + iVibraLevel = feedbackSettings.TactileFeedback(); + iStrength = 100 * ( EProfileTactileFeedbackOff != iVibraLevel ? 100 : 0 ); activeProfile->Release(); diff -r 63c33341dc19 -r a4df7952b706 tactilefeedback/tactilefeedbackresolver/plugins/tactiletoneplugin/src/tactiletoneplayer.cpp --- a/tactilefeedback/tactilefeedbackresolver/plugins/tactiletoneplugin/src/tactiletoneplayer.cpp Wed Mar 31 22:03:28 2010 +0300 +++ b/tactilefeedback/tactilefeedbackresolver/plugins/tactiletoneplugin/src/tactiletoneplayer.cpp Wed Apr 14 16:16:15 2010 +0300 @@ -155,6 +155,12 @@ case ETouchFeedbackFlick: // flow through case ETouchFeedbackCheckbox: // flow through case ETouchFeedbackCharacterInputButton: + case ETouchFeedbackOptionsMenuOpened: + case ETouchFeedbackOptionsMenuClosed: + case ETouchFeedbackSubMenuOpened: + case ETouchFeedbackSubMenuClosed: + case ETouchFeedbackLongTap: + case ETouchFeedbackDynamicSlider: case ETouchFeedbackMultiTouchRecognized: effectIndex = 0; break; diff -r 63c33341dc19 -r a4df7952b706 tactilefeedback/tactilefeedbackresolver/plugins/tactilevibraplugin/src/tactilevibraplayer.cpp --- a/tactilefeedback/tactilefeedbackresolver/plugins/tactilevibraplugin/src/tactilevibraplayer.cpp Wed Mar 31 22:03:28 2010 +0300 +++ b/tactilefeedback/tactilefeedbackresolver/plugins/tactilevibraplugin/src/tactilevibraplayer.cpp Wed Apr 14 16:16:15 2010 +0300 @@ -130,6 +130,12 @@ case ETouchFeedbackFlick: // flow through case ETouchFeedbackCheckbox: // flow through case ETouchFeedbackCharacterInputButton: + case ETouchFeedbackOptionsMenuOpened: + case ETouchFeedbackOptionsMenuClosed: + case ETouchFeedbackSubMenuOpened: + case ETouchFeedbackSubMenuClosed: + case ETouchFeedbackLongTap: + case ETouchFeedbackDynamicSlider: case ETouchFeedbackMultiTouchRecognized: effectIndex = 0; break; diff -r 63c33341dc19 -r a4df7952b706 tactilefeedback/tactilefeedbackresolver/rom/tactilefeedbackresolver.iby --- a/tactilefeedback/tactilefeedbackresolver/rom/tactilefeedbackresolver.iby Wed Mar 31 22:03:28 2010 +0300 +++ b/tactilefeedback/tactilefeedbackresolver/rom/tactilefeedbackresolver.iby Wed Apr 14 16:16:15 2010 +0300 @@ -27,6 +27,8 @@ file=ABI_DIR\BUILD_DIR\tactilefeedbackresolver.dll SHARED_LIB_DIR\tactilefeedbackresolver.dll // audio file(s) used for wav feed back -data=ZPRIVATE\10003B20\TactileFeedbackEffects.ivt private\10003B20\TactileFeedbackEffects.ivt +data=ZPRIVATE\10003B20\9.2_TactileFeedbackLevel1_A.ivt private\10003B20\9.2_TactileFeedbackLevel1_A.ivt +data=ZPRIVATE\10003B20\9.2_TactileFeedbackLevel2_A.ivt private\10003B20\9.2_TactileFeedbackLevel2_A.ivt +data=ZPRIVATE\10003B20\9.2_TactileFeedbackLevel3_A.ivt private\10003B20\9.2_TactileFeedbackLevel3_A.ivt #endif // TACTILEFEEDBACKRESOLVER_IBY diff -r 63c33341dc19 -r a4df7952b706 tactilefeedback/tactilefeedbackresolver/src/tactilefeedbackresolver.cpp --- a/tactilefeedback/tactilefeedbackresolver/src/tactilefeedbackresolver.cpp Wed Mar 31 22:03:28 2010 +0300 +++ b/tactilefeedback/tactilefeedbackresolver/src/tactilefeedbackresolver.cpp Wed Apr 14 16:16:15 2010 +0300 @@ -114,8 +114,14 @@ { return ( aFeedback == ETouchFeedbackPopUp || aFeedback == ETouchFeedbackIncreasingPopUp || - aFeedback == ETouchFeedbackDecreasingPopUp ) && + aFeedback == ETouchFeedbackDecreasingPopUp || + aFeedback == ETouchFeedbackBoundaryList || + aFeedback == ETouchFeedbackOptionsMenuOpened || + aFeedback == ETouchFeedbackOptionsMenuClosed || + aFeedback == ETouchFeedbackSubMenuOpened || + aFeedback == ETouchFeedbackSubMenuClosed ) && ( iLastFeedback == ETouchFeedbackBasicButton || + iLastFeedback == ETouchFeedbackSensitiveList || iLastFeedback == ETouchFeedbackList ); }