CTactilePlayer Class Reference

class CTactilePlayer : public CBase

Tactile feedback player ECom plugin interface.

There are two basic types of tactile players, haptics and audio players. Each player must follow the player type specific settings from Central Repository to play feedback in the specified level. If playing level for haptics or audio is set to zero, players of that type must not produce any feedback.

UID for tactile feedback settings is: KCRUidTactileFeedback = 0x2000B494;

Players are instantiated based on plugins' implementation UIDs, which are read from Central Repository by feedback resolver. Player types are differentiated by using word "Haptics" or "Audio" in default_data field in plugin's implementation info resource file.

Preview functions for playing immediate and starting continuous feedback are ment to use for example in settings view to get feedback played with different level without actually changing the level in settings. It is feedback resolver's responsibility not to play regular feedbacks when preview functions are used.

tactilefeedbackresolver.lib
Since
S60 5.2

Inherits from

Constructor & Destructor Documentation

~CTactilePlayer()

IMPORT_C ~CTactilePlayer ( ) [virtual]

Destructor.

Member Functions Documentation

ListImplementationsL(TTactilePlayerType, RImplInfoPtrArray &)

void ListImplementationsL ( TTactilePlayerType aType,
RImplInfoPtrArray & aImplInfoArray
) [static]

Returns a list of available implementations for this interface.

Since
S60 5.2

Parameters

TTactilePlayerType aType - Type of players to be listed.
RImplInfoPtrArray & aImplInfoArray - Implementation information array of all available implementations.

MaxLevel()

IMPORT_C TInt MaxLevel ( ) [virtual]

Plugin's maximum feedback level, which defines the strength of played feedback. The amount of feedback levels is dependent on a plugin.

Level values are used for playing preview of feedback.

Since
S60 5.2

ModifyFeedback(TInt)

IMPORT_C TInt ModifyFeedback ( TInt aIntensity ) [virtual]

Modifies the intensity of continuous feedback.

Since
S60 5.2

Parameters

TInt aIntensity - The percentage value of continuous feedback's intensity.

NewL(TUid, CRepository &)

CTactilePlayer * NewL ( TUid aImplementationUid,
CRepository & aRepository
) [static]

Instantiates an object of this type.

Since
S60 5.2

Parameters

TUid aImplementationUid - Implementation uid of the plugin to be created.
CRepository & aRepository - Reference to Central Repository, which is used for reading Tactile Feedback settings. CR Keys for Tactile Feedback are defined in tactilefeedbackdomaincrkeys.h

PlayFeedback(TTouchLogicalFeedback)

TInt PlayFeedback ( TTouchLogicalFeedback aFeedback ) [pure virtual]

Produces immediate physical feedback according to given logical feedback type.

Haptics and audio players have onw level value, which is specified in Tactile Feedback settings in Central Repository. That value defines the strength of feedback produced by this function. When settings are changed, plugin implementation must change the playing level according to that value. If feedback level for this type of player in settings is set to zero, this function must not produce any feedback.

Since
S60 5.2

Parameters

TTouchLogicalFeedback aFeedback - The logical feedback type, which is used to select the physical response to feedback method.

PlayPreviewFeedback(TInt, TTouchLogicalFeedback)

IMPORT_C TInt PlayPreviewFeedback ( TInt aLevel,
TTouchLogicalFeedback aFeedback
) [virtual]

Produces preview of feedback according to given locigal feedback type and given level value of feedback strength.

Since
S60 5.2

Parameters

TInt aLevel - A value, which defines the strength of preview feedback. Preview level can be any positive value up to value of MaxLevel().
TTouchLogicalFeedback aFeedback - The logical feedback type, which is used to select the physical response to feedback method.

StartFeedback(TTouchContinuousFeedback, TInt)

IMPORT_C TInt StartFeedback ( TTouchContinuousFeedback aFeedback,
TInt aIntensity
) [virtual]

Starts continuous feedback according to given logical continuous feedback type. Continuous feedback is started with given intensity, which is a percentage value of maximum strength on current level. Ongoing continuous feedback can be modified using ModifyFeedback() to change intensity of feedback.

Continuous feedback is stopped using StopFeedback() .

Since
S60 5.2

Parameters

TTouchContinuousFeedback aFeedback - The logical feedback type of continuous feedback, which is used to select the physical response to continuous feedback method.
TInt aIntensity - The percentage value of continuous feedback's maximum strength.

StartPreviewFeedback(TInt, TTouchContinuousFeedback, TInt)

IMPORT_C TInt StartPreviewFeedback ( TInt aLevel,
TTouchContinuousFeedback aFeedback,
TInt aIntensity
) [virtual]

Starts preview of continuous feedback according to given logical continuous feedback type and given level value of feedback strength. Preview of continuous feedback is started with given intensity, which is a percentage value of maximum strength in given level. Ongoing continuous feedback can be modified using ModifyFeedback() to change intensity of feedback.

Preview of continuous feedback is stopped using StopFeedback() .

Since
S60 5.2

Parameters

TInt aLevel - A value, which defines the strength of preview feedback. Preview level can be any positive value between zero and MaxLevel().
TTouchContinuousFeedback aFeedback - The logical feedback type of continuous feedback, which is used to select the physical response to continuous feedback method.
TInt aIntensity - The percentage value of continuous feedback's maximum strength.

StopFeedback()

IMPORT_C void StopFeedback ( ) [virtual]

Stops feedback.

Since
S60 5.2

StopPreviewFeedback()

IMPORT_C void StopPreviewFeedback ( ) [virtual]

Stops preview of continuous feedback. Player must set the original level value back in this function.

Since
S60 5.2

Member Data Documentation

TUid iDtor_ID_Key

TUid iDtor_ID_Key [private]