williamr@2: /* williamr@2: * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@2: * 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 williamr@2: * which accompanies this distribution, and is available williamr@2: * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: This file contains the header of the williamr@2: * MHWRMHapticsObserver class. williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: #ifndef M_HWRMHAPTICSOBSERVER_H williamr@2: #define M_HWRMHAPTICSOBSERVER_H williamr@2: williamr@2: #include williamr@2: williamr@2: /** williamr@2: * MHWRMHapticsObserver observer class. williamr@2: * williamr@2: * A client should derive from this abstract class to receive haptics williamr@2: * status notifications and notification of effect completion. williamr@2: * williamr@2: * @since S60 5.1 williamr@2: */ williamr@2: class MHWRMHapticsObserver williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: * Haptics status. williamr@2: */ williamr@2: enum THWRMHapticsStatus williamr@2: { williamr@2: /** williamr@2: * Haptics is available for the observing client. williamr@2: */ williamr@2: EHWRMHapticsStatusAvailable = 0, williamr@2: williamr@2: /** williamr@2: * Haptics is reserved for another client. The client making williamr@2: * the active reservation does not receive this notification, but williamr@2: * a success code for the reservation command. williamr@2: */ williamr@2: EHWRMHapticsStatusReserved, williamr@2: williamr@2: /** williamr@2: * Haptics has been suspended for this client. This occurs, when williamr@2: * another client with higher priority makes reservation for williamr@2: * haptics, or when this client is making reservation and haptics williamr@2: * has already been reserved for a client with higher priority. williamr@2: * williamr@2: * In suspended state, haptics effects are not played for the williamr@2: * suspended client, but other commands are executed as normal. williamr@2: */ williamr@2: EHWRMHapticsStatusSuspended williamr@2: }; williamr@2: williamr@2: /** williamr@2: * Called when the device's haptics feature state changes williamr@2: * williamr@2: * @param aStatus Indicates haptics status. williamr@2: * williamr@2: * @since S60 5.1 williamr@2: * williamr@2: * @see CHWRMHaptics::THWRMHapticsStatus williamr@2: */ williamr@2: virtual void HapticsStatusChangedL( THWRMHapticsStatus aStatus ) = 0; williamr@2: williamr@2: /** williamr@2: * Called when effect has completed playing. williamr@2: * williamr@2: * Method reserved for future use. williamr@2: * williamr@2: * @param aError Reason of completion. williamr@2: * @param aEffectHandle The associated effectHandle to the effect. williamr@2: * williamr@2: * @since S60 5.1 williamr@2: */ williamr@2: virtual void EffectCompletedL( TInt aError, TInt aEffectHandle ) = 0; williamr@2: }; williamr@2: williamr@2: #endif // M_HWRMHAPTICSOBSERVER_H