API published in: S60 2nd Ed
API deprecated in: S60 3rd Ed
Link against: vibractrl.lib
Required Capabilities
None
#include <vibractrl.h>
This class provides the ability to control the device vibration feature. Vibration might be used in a game to signal a collision or explosion or for giving tactile feedback to gaming events, such as a ball hitting a wall (shaking).
Public Types |
|
enum | TVibraModeState { EVibraModeON = 0, EVibraModeOFF, EVibraModeUnknown } |
Vibration setting in the user profile. More... |
|
enum | TVibraRequestStatus { EVibraRequestOK = 0, EVibraRequestFail, EVibraRequestNotAllowed, EVibraRequestStopped, EVibraRequestUnableToStop, EVibraRequestUnknown } |
Status of the vibrating setting request. More... |
|
enum | TVibraCtrlPanic { EPanicUnableToGetVibraSetting, EPanicVibraGeneral } |
Internal panic codes. More... |
|
Public Member Functions |
|
virtual | ~CVibraControl () |
Destructor. |
|
virtual void | StartVibraL (TUint16 aDuration)=0 |
Starts the device vibration feature with factory-defined intensity. |
|
virtual void | StopVibraL (void)=0 |
Interrupts the device vibration that is started with the StartVibra method immediately. |
|
virtual TVibraModeState | VibraSettings (void) const =0 |
This method retrieves the current settings of the vibration feature in the user profile. |
|
virtual void | StartVibraL (TUint16 aDuration, TInt aIntensity)=0 |
Starts the device vibration feature. |
|
Protected Member Functions |
|
CVibraControl () | |
C++ default constructor. |
|
Internal panic codes.
|
|
Vibration setting in the user profile.
|
|
Status of the vibrating setting request.
|
|
Destructor.
|
|
C++ default constructor.
|
|
Starts the device vibration feature. The method does not block, but returns immediately so that the vibration happens simultaneously as the game continues to run. If StartVibra is called again before the first vibration completes then the first vibration is interrupted and the second vibrations starts immediately -- i.e. The periods of vibration are not cumulative. The vibration can be interrupted with the method StopVibra before the specified interval has elasped. Vibra settings of the vibration feature in the user profile must be active. If no, vibration is not activated. Note: The device may have implementation defined or hardware imposed limits to the duration of the vibration feature. In such circumstances any vibration will cut off at that limit even if the duration parameter is greater than the limit.
|
|
Starts the device vibration feature with factory-defined intensity. The method does not block, but returns immediately so that the vibration happens simultaneously as the game continues to run. If StartVibra is called again before the first vibration completes then the first vibration is interrupted and the second vibrations starts immediately -- i.e. The periods of vibration are not cumulative. The vibration can be interrupted with the method StopVibra before the specified interval has elasped. Vibra settings of the vibration feature in the user profile must be active. If no, vibration is not activated. Note: The device may have implementation defined or hardware imposed limits to the duration of the vibration feature. In such circumstances any vibration will cut off at that limit even if the duration parameter is greater than the limit.
|
|
Interrupts the device vibration that is started with the StartVibra method immediately.
|
|
This method retrieves the current settings of the vibration feature in the user profile. The developer can check the Vibra settings in the profile and if there is no Vibra active but it is needed by the game then the user can be informed, or asked if he wants to enable the Vibra during the game.
|