epoc32/include/hwrmhapticsobserver.h
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/hwrmhapticsobserver.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,90 @@
     1.4 +/*
     1.5 +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:  This file contains the header of the 
    1.18 +*                MHWRMHapticsObserver class.
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +#ifndef M_HWRMHAPTICSOBSERVER_H
    1.24 +#define M_HWRMHAPTICSOBSERVER_H
    1.25 +
    1.26 +#include <e32base.h>
    1.27 +
    1.28 +/**
    1.29 +* MHWRMHapticsObserver observer class.
    1.30 +*
    1.31 +* A client should derive from this abstract class to receive haptics 
    1.32 +* status notifications and notification of effect completion. 
    1.33 +*
    1.34 +* @since S60 5.1
    1.35 +*/
    1.36 +class MHWRMHapticsObserver
    1.37 +    {
    1.38 +public:
    1.39 +    
    1.40 +    /**
    1.41 +    * Haptics status.
    1.42 +    */
    1.43 +    enum THWRMHapticsStatus 
    1.44 +        {
    1.45 +        /**
    1.46 +         * Haptics is available for the observing client.
    1.47 +         */
    1.48 +        EHWRMHapticsStatusAvailable = 0,
    1.49 +
    1.50 +        /**
    1.51 +         * Haptics is reserved for another client. The client making 
    1.52 +         * the active reservation does not receive this notification, but
    1.53 +         * a success code for the reservation command.
    1.54 +         */
    1.55 +        EHWRMHapticsStatusReserved,
    1.56 +
    1.57 +        /**
    1.58 +         * Haptics has been suspended for this client. This occurs, when
    1.59 +         * another client with higher priority makes reservation for 
    1.60 +         * haptics, or when this client is making reservation and haptics 
    1.61 +         * has already been reserved for a client with higher priority.
    1.62 +         *
    1.63 +         * In suspended state, haptics effects are not played for the
    1.64 +         * suspended client, but other commands are executed as normal.
    1.65 +         */
    1.66 +        EHWRMHapticsStatusSuspended
    1.67 +        };
    1.68 +        
    1.69 +    /** 
    1.70 +    * Called when the device's haptics feature state changes
    1.71 +    *
    1.72 +    * @param aStatus Indicates haptics status.
    1.73 +    *
    1.74 +    * @since S60 5.1
    1.75 +    *
    1.76 +    * @see CHWRMHaptics::THWRMHapticsStatus
    1.77 +    */
    1.78 +    virtual void HapticsStatusChangedL( THWRMHapticsStatus aStatus ) = 0;
    1.79 +        
    1.80 +    /** 
    1.81 +    * Called when effect has completed playing. 
    1.82 +    * 
    1.83 +    * Method reserved for future use.
    1.84 +    *
    1.85 +    * @param aError Reason of completion.
    1.86 +    * @param aEffectHandle The associated effectHandle to the effect.
    1.87 +    *
    1.88 +    * @since S60 5.1
    1.89 +    */
    1.90 +    virtual void EffectCompletedL( TInt aError, TInt aEffectHandle ) = 0;
    1.91 +    };
    1.92 +
    1.93 +#endif // M_HWRMHAPTICSOBSERVER_H