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.
Public Member Functions | |
---|---|
~CTactilePlayer() | |
void | ListImplementationsL(TTactilePlayerType, RImplInfoPtrArray &) |
IMPORT_C TInt | MaxLevel() |
IMPORT_C TInt | ModifyFeedback(TInt) |
CTactilePlayer * | NewL(TUid, CRepository &) |
TInt | PlayFeedback(TTouchLogicalFeedback) |
IMPORT_C TInt | PlayPreviewFeedback(TInt, TTouchLogicalFeedback) |
IMPORT_C TInt | StartFeedback(TTouchContinuousFeedback, TInt) |
IMPORT_C TInt | StartPreviewFeedback(TInt, TTouchContinuousFeedback, TInt) |
IMPORT_C void | StopFeedback() |
IMPORT_C void | StopPreviewFeedback() |
Private Attributes | |
---|---|
TUid | iDtor_ID_Key |
void | ListImplementationsL | ( | TTactilePlayerType | aType, |
RImplInfoPtrArray & | aImplInfoArray | |||
) | [static] |
Returns a list of available implementations for this interface.
TTactilePlayerType aType | - Type of players to be listed. |
RImplInfoPtrArray & aImplInfoArray | - Implementation information array of all available implementations. |
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.
IMPORT_C TInt | ModifyFeedback | ( | TInt | aIntensity | ) | [virtual] |
Modifies the intensity of continuous feedback.
TInt aIntensity | - The percentage value of continuous feedback's intensity. |
CTactilePlayer * | NewL | ( | TUid | aImplementationUid, |
CRepository & | aRepository | |||
) | [static] |
Instantiates an object of this type.
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 |
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.
TTouchLogicalFeedback aFeedback | - The logical feedback type, which is used to select the physical response to feedback method. |
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.
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. |
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().
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. |
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().
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. |
IMPORT_C void | StopPreviewFeedback | ( | ) | [virtual] |
Stops preview of continuous feedback. Player must set the original level value back in this function.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.