SonyEricsson::CVibration is the official API released by Sony Ericsson for the P800. It is available for download from Ericsson Mobility World
The provided package contains :
the API header files ( vibration.h )
a release build of the vibration library and interface for ARMI and THUMB targets ( vibration.dll and vibration.lib )
a release and debug build for CodeWarrior IDE.
the API documentation (generated by Doxygen)
The library is not installed by default on P800 devices and then shall be installed with your application.
class CVibration : public CBase
{
public:
/**
* Constructor.
* @param aObserver An optional pointer to the vibration observer. If no
* pointer is specified, no callbacks will be made.
* @return CVibration* A pointer to the created CVibration object.
*/
IMPORT_C static CVibration* NewL(MVibrationObserver* aObserver=0);
/**
* Constructor.
* @param aObserver An optional pointer to the vibration observer. If no
* pointer is specified, no callbacks will be made.
* @return CVibration* A pointer to the created CVibration object.
*/
IMPORT_C static CVibration* NewLC(MVibrationObserver* aObserver=0);
/**
* Virtual destructor.
*/
virtual ~CVibration();
/**
* Returns the version number of the CVibration implementation.
* This can be used to adapt the vibration behaviour to different
* hardware.
*/
virtual TVersion Version() = 0;
/**
* Turns the vibration on. The parameters are the requested behaviour.
* However, the vibrator may adjust these internally in order to handle
* the physical vibration constraints.
*
* @param aIntervalOn Time to have vibration turned on (1 = 100 milliseconds).
* @param aIntervalOff Time to have vibration turned off (1 = 100 milliseconds).
* @param aNumberOfTimes Number of times to run the above scenario.
* (0 = run an indefinite number of times).
*/
virtual void VibrationOn(TUint8 aIntervalOn, TUint8 aIntervalOff, TUint8 aNumberOfTimes) = 0;
/**
* Turns the vibration off.
*/
virtual void VibrationOff() = 0;
protected:
/**
* Constructor.
* Use NewL() or NewLC() to construct an object.
*/
CVibration();
};
|