MHWRMVibraFeedbackObserver Class Reference

Link against: HWRMVibraClient.lib

Capability Information

Required Capabilities

None


#include <
HWRMVibra.h>

Detailed Description

A callback interface for tactile feedback vibra mode reporting.

If the client requires up-to-date status information, the client needs to derive a class from the MHWRMVibraFeedbackObserver interface and implement the VibraFeedbackModeChanged() method. In order to register for callback, client needs to call SetFeedbackObserver-method.

A callback object header example:

 // INCLUDES
 #include <HWRMVibra.h> // Link against HWRMVibraClient.lib.

 class CTest : public CBase, 
               public MHWRMVibraFeedbackObserver    
    {
    public:
        CTest();
        ~CTest();
                       
        void ConstructL();
        static CTest* NewL();
                
        // from MHWRMVibraFeedbackObserver
        virtual void VibraFeedbackModeChanged(CHWRMVibra::TVibraFeedbackModeState aMode);

    private:
        CHWRMVibra* iVibra;
    };

A callback method implementation example:

 #include <HWRMVibra.h>  // link against HWRMVibraClient.lib

 // A CHWRMVibra instance can be created by using NewL() or NewLC() methods. 
 CHWRMVibra* vibra = CHWRMVibra::NewL();

 // Request notification of feedback setting change
 vibra->SetFeedbackObserver(this); 

 // To clean up, delete the created object:
 delete vibra;
 
 void CTest::VibraFeedbackModeChanged(CHWRMVibra::TVibraFeedbackModeState aMode)
    {
    switch ( aMode )
        {
        case CHWRMVibra::EVibraFeedbackModeUnknown:
            RDebug::Print(_L("### Feedback vibration mode : EVibraFeedbackModeUnknown"));
            break;
        case CHWRMVibra::EVibraFeedbackModeON:
            RDebug::Print(_L("### Feedback vibration mode : EVibraFeedbackModeON"));
            break;
        case CHWRMVibra::EVibraFeedbackModeOFF:
            RDebug::Print(_L("### Feedback vibration mode : EVibraFeedbackModeOFF"));
            break;
        default:
            break;
        }
    }
Since:
S60 5.0

Public Member Functions

virtual void VibraFeedbackModeChanged (CHWRMVibra::TVibraFeedbackModeState aMode)=0
 Called when the tactile feedback vibration setting in the user profile is changed.

Member Function Documentation

virtual void MHWRMVibraFeedbackObserver::VibraFeedbackModeChanged CHWRMVibra::TVibraFeedbackModeState  aMode  )  [pure virtual]
 

Called when the tactile feedback vibration setting in the user profile is changed.

Parameters:
aMode Indicates the new setting.
See also:
CHWRMVibra::TVibraFeedbackModeState

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2007
Back to top