CTactileFeedbackResolver Class Reference

class CTactileFeedbackResolver : public CBase

Class for procuding physical feedback based on logical feedback type.

Feedback is generated according to Tactile Feedback settings and current device state, and it may be that feedback is not even generated at all.

tactilefeedbackresolver.lib
Since
S60 5.2

Inherits from

  • CTactileFeedbackResolver

Constructor & Destructor Documentation

CTactileFeedbackResolver()

CTactileFeedbackResolver()[private]

Constructor.

~CTactileFeedbackResolver()

~CTactileFeedbackResolver()[virtual]

Member Functions Documentation

ConstructL()

voidConstructL()[private]

2nd phase constructor..

CreateAudioPlayerL(TUid)

voidCreateAudioPlayerL(TUidaAudioUid)[private]

Create audio player. ECom implementation uid is used for selecting the player plugin.

Parameters

TUid aAudioUid

CreateHapticsPlayerL(TUid)

voidCreateHapticsPlayerL(TUidaHapticsUid)[private]

Create haptics player. ECom implementation uid is used for selecting the player plugin.

Parameters

TUid aHapticsUid

DoHandleNotifyGenericL(TUint32)

voidDoHandleNotifyGenericL(TUint32aId)[private]

Handle changes in tactile feedback settings.

Parameters

TUint32 aId

HandleNotifyGeneric(TUint32)

voidHandleNotifyGeneric(TUint32aId)[private]

From MCenRepNotifyHandlerCallback.

This is called when Tactile Feedback settings in Central Repository are changed.

Parameters

TUint32 aId- The id of the changed Central Repository value.

InitializeCrKeysL()

voidInitializeCrKeysL()[private]

Central repository related initializations.

InitializePsKeysL()

voidInitializePsKeysL()[private]

Publish & Subscribe related initializations.

IsHigherThanPlaying(TTouchLogicalFeedback)

TBool IsHigherThanPlaying(TTouchLogicalFeedbackaFeedback)const [private]

Return ETrue if aFeedback's priority is higher than current playing feedback, namely iLastFeedback.

TODO: Currently, we only take Popup and Button effects into account. Ultimately, a complete priority queue should be set up.

Parameters

TTouchLogicalFeedback aFeedback

ModifyFeedback(TInt)

voidModifyFeedback(TIntaIntensity)
Modifies the intensity of ongoing continuous feedback.
Since
S60 5.2

Parameters

TInt aIntensity- New intensity for continuous feedback. Value range for intensity is 0-100%.

NewL()

CTactileFeedbackResolver *NewL()[static]

PlayFeedback(TTouchLogicalFeedback, TBool, TBool)

voidPlayFeedback(TTouchLogicalFeedbackaFeedback,
TBoolaPlayVibra,
TBoolaPlayAudio
)

Produces immediately physical feedback according to given logical feedback type.

Actual physical feedback type depends on settings of existing player plugins and current device state.

Parameters

TTouchLogicalFeedback aFeedback- Logical feedback type.
TBool aPlayVibra- If EFalse then vibra feedback is not played.
TBool aPlayAudio- If EFalse then audio feedback is not played.

PlayPreviewFeedback(TInt, TTouchLogicalFeedback, TTouchFeedbackType)

voidPlayPreviewFeedback(TIntaLevel,
TTouchLogicalFeedbackaFeedback,
TTouchFeedbackTypeaType
)

Produces immediate physical feedback according to given logical feedback type and given level.

Since
S60 5.2

Parameters

TInt aLevel- Level value defines the strength of playing effect. Maximum level value is player dependent.
TTouchLogicalFeedback aFeedback
TTouchFeedbackType aType- Type of feedback to be previewed.

PropertyChangedL(const TUid, const TUint)

voidPropertyChangedL(const TUidaCategory,
const TUintaKey
)[private]

From MTactilePropertyObserver

This is called when the property for temporary disabling feedback is updated.

Parameters

const TUid aCategory- The UID of the changed property
const TUint aKey- The key (i.e. identifier) of the changed property

ReadFeedbackEnabledFromPS()

voidReadFeedbackEnabledFromPS()[private]

This function reads the feedback enabled/disabled value from the dedicated P&S key, and stores it into iFeedbackEnabled -member variable.

Dedicated fuction used for avoiding duplicate code (in construction and when the P&S key changes)

StartFeedback(TTouchContinuousFeedback, TInt)

voidStartFeedback(TTouchContinuousFeedbackaType,
TIntaIntensity
)

Starts playing continuous feedback.

Since
S60 5.2

Parameters

TTouchContinuousFeedback aType- Type of continuous feedback to be played.
TInt aIntensity- Intensity of continuous feedback. Value range for intensity is 0-100%.

StartPreviewFeedback(TInt, TTouchContinuousFeedback, TInt, TTouchFeedbackType)

voidStartPreviewFeedback(TIntaLevel,
TTouchContinuousFeedbackaFeedback,
TIntaIntensity,
TTouchFeedbackTypeaType
)

Starts playing continuous feedback of given type on given level.

Since
S60 5.2

Parameters

TInt aLevel- Level value defines the strength of playing effect. Maximum level value is player dependent.
TTouchContinuousFeedback aFeedback- Type of continuous feedback to be played.
TInt aIntensity- Intensity of continuous feedback. Value range for intensity is 0-100% from basic strength (aLevel).
TTouchFeedbackType aType- Type of feedback to be previewed.

StopFeedback()

voidStopFeedback()

Stops the ongoing feedback.

Since
S60 5.2

StopPreviewFeedback()

voidStopPreviewFeedback()

Stops the ongoing preview of continuous feedback.

Since
S60 5.2

Member Data Documentation

TBool iAudioEnabled

TBool iAudioEnabled[private]

This flag indicates the audio feedback state according to the P&S key that can be used for globally disabling vibra and/or audio feedback.

CTactilePlayer * iAudioPlayer

CTactilePlayer *iAudioPlayer[private]

Audio player. Own.

CCenRepNotifyHandler * iCenRepNotifier

CCenRepNotifyHandler *iCenRepNotifier[private]

Central repository notifier, which sends notification when tactile feedback settings has been changed. Own.

TBool iFeedbackStarted

TBool iFeedbackStarted[private]

This flag indicates whether the continuous feedback is started or not.

CTactilePlayer * iHapticsPlayer

CTactilePlayer *iHapticsPlayer[private]

Haptics player. Own.

TTouchLogicalFeedback iLastFeedback

TTouchLogicalFeedback iLastFeedback[private]

Name of the last played feedback.

TTime iLastFeedbackTimeStamp

TTime iLastFeedbackTimeStamp[private]

Timestamp of the last played feedback.

TTimeIntervalMicroSeconds iMinimumInterval

TTimeIntervalMicroSeconds iMinimumInterval[private]

Minimum interval between feedbacks.

CTactilePropertyWatcher * iPropertyWatcher

CTactilePropertyWatcher *iPropertyWatcher[private]

Access to the P&S property, which is used for temporary disabling the feedback. Own.

CRepository * iRepository

CRepository *iRepository[private]

Central repository for reading tactile feedback settings. Own.

TBool iVibraEnabled

TBool iVibraEnabled[private]

This flag indicates the vibra feedback state according to the P&S key that can be used for globally disabling vibra and/or audio feedback.

TBool iVibraFirst

TBool iVibraFirst[private]

This flag determinates the playing order of feedback types. ETrue - vibra feedback is played first. EFalse - audio feedback is played first.