112 |
112 |
113 switch ( aFeedback ) |
113 switch ( aFeedback ) |
114 { |
114 { |
115 case ETouchFeedbackBasic: // flow through |
115 case ETouchFeedbackBasic: // flow through |
116 case ETouchFeedbackBasicButton: // flow through |
116 case ETouchFeedbackBasicButton: // flow through |
117 case ETouchFeedbackList: // flow through |
117 case ETouchFeedbackBasicItem: // flow through |
118 case ETouchFeedbackBoundaryList: // flow through |
118 case ETouchFeedbackBounceEffect: // flow through |
119 case ETouchFeedbackSlider: // flow through |
119 case ETouchFeedbackBasicSlider: // flow through |
120 case ETouchFeedbackEdit: // flow through |
120 case ETouchFeedbackEditor: // flow through |
121 case ETouchFeedbackLineSelection: // flow through |
121 case ETouchFeedbackLineSelection: // flow through |
122 case ETouchFeedbackBlankSelection: // flow through |
122 case ETouchFeedbackBlankSelection: // flow through |
123 case ETouchFeedbackTextSelection: // flow through |
123 case ETouchFeedbackTextSelection: // flow through |
124 case ETouchFeedbackEmptyLineSelection: // flow through |
124 case ETouchFeedbackEmptyLineSelection: // flow through |
125 case ETouchFeedbackTab: // flow through |
|
126 case ETouchFeedbackPopUp: // flow through |
125 case ETouchFeedbackPopUp: // flow through |
127 case ETouchFeedbackIncreasingPopUp: // flow through |
126 case ETouchFeedbackPopupOpen: // flow through |
128 case ETouchFeedbackDecreasingPopUp: // flow through |
127 case ETouchFeedbackPopupClose: // flow through |
129 case ETouchFeedbackFlick: // flow through |
128 case ETouchFeedbackItemScroll: // flow through |
130 case ETouchFeedbackCheckbox: // flow through |
129 case ETouchFeedbackCheckbox: // flow through |
131 case ETouchFeedbackCharacterInputButton: |
130 case ETouchFeedbackMultitouchActivate: |
132 case ETouchFeedbackOptionsMenuOpened: |
131 case ETouchFeedbackBasicKeypad: |
133 case ETouchFeedbackOptionsMenuClosed: |
132 case ETouchFeedbackFlick: |
134 case ETouchFeedbackSubMenuOpened: |
133 case ETouchFeedbackItemDrop: |
135 case ETouchFeedbackSubMenuClosed: |
134 case ETouchFeedbackItemMoveOver: |
136 case ETouchFeedbackLongTap: |
135 case ETouchFeedbackItemPick: |
137 case ETouchFeedbackMultiTouchRecognized: |
136 case ETouchFeedbackMultipleCheckbox: |
|
137 case ETouchFeedbackRotateStep: |
|
138 case ETouchFeedbackStopFlick: |
|
139 case ETouchFeedbackLongPress: |
138 effectIndex = 0; |
140 effectIndex = 0; |
139 break; |
141 break; |
140 case ETouchFeedbackSensitive: // flow through |
142 case ETouchFeedbackSensitive: // flow through |
141 case ETouchFeedbackSensitiveButton: // flow through |
143 case ETouchFeedbackSensitiveButton: // flow through |
142 case ETouchFeedbackSensitiveList: |
144 case ETouchFeedbackSensitiveItem: |
143 case ETouchFeedbackSensitiveInput: |
145 case ETouchFeedbackSensitiveKeypad: |
|
146 case ETouchFeedbackSensitiveSlider: |
144 effectIndex = 1; |
147 effectIndex = 1; |
145 break; |
148 break; |
146 default: |
149 default: |
147 effectIndex = 0; |
150 effectIndex = 0; |
148 break; |
151 break; |
211 { |
214 { |
212 TRACE("CTactileVibraPlayer::PlayPreviewFeedback - Begin"); |
215 TRACE("CTactileVibraPlayer::PlayPreviewFeedback - Begin"); |
213 TInt ret( KErrArgument ); |
216 TInt ret( KErrArgument ); |
214 |
217 |
215 if ( aLevel > EProfileTactileFeedbackOff && |
218 if ( aLevel > EProfileTactileFeedbackOff && |
216 aLevel <= EProfileTactileFeedbackLevel3 ) |
219 aLevel <= EProfileTactileFeedbackLevel5 ) |
217 { |
220 { |
218 iOriginalLevel = iVibraLevel; |
221 iOriginalLevel = iVibraLevel; |
219 iVibraLevel = aLevel; |
222 iVibraLevel = aLevel; |
220 ReadSettings(); |
223 ReadSettings(); |
221 ret = PlayFeedback( aFeedback ); |
224 ret = PlayFeedback( aFeedback ); |
281 iRepository.Get( KTactileVibraIntensitySensitiveLevel3, |
284 iRepository.Get( KTactileVibraIntensitySensitiveLevel3, |
282 sensitiveParams.iIntensity ); |
285 sensitiveParams.iIntensity ); |
283 iRepository.Get( KTactileVibraDurationSensitiveLevel3, |
286 iRepository.Get( KTactileVibraDurationSensitiveLevel3, |
284 sensitiveParams.iTime ); |
287 sensitiveParams.iTime ); |
285 } |
288 } |
|
289 else if ( iVibraLevel == EProfileTactileFeedbackLevel4 ) |
|
290 { |
|
291 // Read settings for ETouchFeedbackBasic |
|
292 iRepository.Get( KTactileVibraIntensityBasicLevel4, |
|
293 basicParams.iIntensity ); |
|
294 iRepository.Get( KTactileVibraDurationBasicLevel4, |
|
295 basicParams.iTime ); |
|
296 |
|
297 // Read settings for ETouchFeedbackSensitive |
|
298 iRepository.Get( KTactileVibraIntensitySensitiveLevel4, |
|
299 sensitiveParams.iIntensity ); |
|
300 iRepository.Get( KTactileVibraDurationSensitiveLevel4, |
|
301 sensitiveParams.iTime ); |
|
302 } |
|
303 else if ( iVibraLevel == EProfileTactileFeedbackLevel5 ) |
|
304 { |
|
305 // Read settings for ETouchFeedbackBasic |
|
306 iRepository.Get( KTactileVibraIntensityBasicLevel5, |
|
307 basicParams.iIntensity ); |
|
308 iRepository.Get( KTactileVibraDurationBasicLevel5, |
|
309 basicParams.iTime ); |
|
310 |
|
311 // Read settings for ETouchFeedbackSensitive |
|
312 iRepository.Get( KTactileVibraIntensitySensitiveLevel5, |
|
313 sensitiveParams.iIntensity ); |
|
314 iRepository.Get( KTactileVibraDurationSensitiveLevel5, |
|
315 sensitiveParams.iTime ); |
|
316 } |
286 |
317 |
287 iVibraParams.Reset(); |
318 iVibraParams.Reset(); |
288 |
319 |
289 iVibraParams.Append( basicParams ); |
320 TRAP_IGNORE( iVibraParams.AppendL( basicParams ) ); |
290 iVibraParams.Append( sensitiveParams ); |
321 TRAP_IGNORE( iVibraParams.AppendL( sensitiveParams ) ); |
291 TRACE("CTactileVibraPlayer::ReadSettings - End"); |
322 TRACE("CTactileVibraPlayer::ReadSettings - End"); |
292 } |
323 } |
293 |
324 |
294 // --------------------------------------------------------------------------- |
325 // --------------------------------------------------------------------------- |
295 // Actually play feedback. |
326 // Actually play feedback. |