diff -r ebc84c812384 -r 46218c8b8afa Symbian3/PDK/Source/GUID-623CA1EE-4D25-495A-BD2F-BA7BF95D6D9C.dita --- a/Symbian3/PDK/Source/GUID-623CA1EE-4D25-495A-BD2F-BA7BF95D6D9C.dita Thu Mar 11 15:24:26 2010 +0000 +++ b/Symbian3/PDK/Source/GUID-623CA1EE-4D25-495A-BD2F-BA7BF95D6D9C.dita Thu Mar 11 18:02:22 2010 +0000 @@ -1,49 +1,49 @@ - - - - - -Creating -a Vibra instance to control the vibra -

A CHWRMVibra instance can be created by -using NewL() or NewLC() methods. After this, -vibra can be directly controlled via the provided class methods.

Without -notify handling

The user has to create an instance of the CHWRMVibra implementation -class using the NewL() or NewLC() constructor -without a parameter. The following code snippet demonstrates how to create -an instance without notify handling to control the device vibra:

CHWRMVibra* vibra = CHWRMVibra::NewLC(); // No callbacks

With notify handling

The client must derive a class from -the MHWRMVibraObserver interface and implement the VibraModeChanged() and VibraStatusChanged() methods.

The following code snippet gives an example of the header of the class -implemented by the client:

// INCLUDES -#include HWRMVibra.h // Link against HWRMVibraClient.lib. -class CVibraStatusObserver : public CBase, - public MHWRMVibraObserver - { - public: - CVibraStatusObserver(); - ~CVibraStatusObserver(); - void ConstructL(); - static CVibraStatusObserver* NewL(); - // from MHWRMVibraObserver - virtual void VibraModeChanged( CHWRMVibra::TVibraModeState aStatus ); - virtual void VibraStatusChanged( CHWRMVibra::TVibraStatus aStatus ); - private: - CHWRMVibra* iVibra; - }; -

Create an instance of the CHWRMVibra implementation -class using the NewL() or NewLC() constructor -with a parameter. This parameter is a pointer to an object that is derived -from MHWRMVibraObserver. Every vibra user setting profile -change causes the notification using MHWRMVibraObserver::VibraModeChanged(). -Every vibra status change causes the notification using MHWRMVibraObserver::VibraStatusChanged().

The -following code snippet demonstrates how to create an instance with notify -handling to control the device vibra:

void CVibraStatusObserver::ConstructL() - { - iVibra = CHWRMVibra::NewL( this ) - }
+ + + + + +Creating +a Vibra instance to control the vibra +

A CHWRMVibra instance can be created by +using NewL() or NewLC() methods. After this, +vibra can be directly controlled via the provided class methods.

Without +notify handling

The user has to create an instance of the CHWRMVibra implementation +class using the NewL() or NewLC() constructor +without a parameter. The following code snippet demonstrates how to create +an instance without notify handling to control the device vibra:

CHWRMVibra* vibra = CHWRMVibra::NewLC(); // No callbacks

With notify handling

The client must derive a class from +the MHWRMVibraObserver interface and implement the VibraModeChanged() and VibraStatusChanged() methods.

The following code snippet gives an example of the header of the class +implemented by the client:

// INCLUDES +#include HWRMVibra.h // Link against HWRMVibraClient.lib. +class CVibraStatusObserver : public CBase, + public MHWRMVibraObserver + { + public: + CVibraStatusObserver(); + ~CVibraStatusObserver(); + void ConstructL(); + static CVibraStatusObserver* NewL(); + // from MHWRMVibraObserver + virtual void VibraModeChanged( CHWRMVibra::TVibraModeState aStatus ); + virtual void VibraStatusChanged( CHWRMVibra::TVibraStatus aStatus ); + private: + CHWRMVibra* iVibra; + }; +

Create an instance of the CHWRMVibra implementation +class using the NewL() or NewLC() constructor +with a parameter. This parameter is a pointer to an object that is derived +from MHWRMVibraObserver. Every vibra user setting profile +change causes the notification using MHWRMVibraObserver::VibraModeChanged(). +Every vibra status change causes the notification using MHWRMVibraObserver::VibraStatusChanged().

The +following code snippet demonstrates how to create an instance with notify +handling to control the device vibra:

void CVibraStatusObserver::ConstructL() + { + iVibra = CHWRMVibra::NewL( this ) + }
\ No newline at end of file