epoc32/include/hwrmhapticsobserver.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@2
     5
* 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
     6
* which accompanies this distribution, and is available
williamr@2
     7
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:  This file contains the header of the 
williamr@2
    15
*                MHWRMHapticsObserver class.
williamr@2
    16
*
williamr@2
    17
*/
williamr@2
    18
williamr@2
    19
williamr@2
    20
#ifndef M_HWRMHAPTICSOBSERVER_H
williamr@2
    21
#define M_HWRMHAPTICSOBSERVER_H
williamr@2
    22
williamr@2
    23
#include <e32base.h>
williamr@2
    24
williamr@2
    25
/**
williamr@2
    26
* MHWRMHapticsObserver observer class.
williamr@2
    27
*
williamr@2
    28
* A client should derive from this abstract class to receive haptics 
williamr@2
    29
* status notifications and notification of effect completion. 
williamr@2
    30
*
williamr@2
    31
* @since S60 5.1
williamr@2
    32
*/
williamr@2
    33
class MHWRMHapticsObserver
williamr@2
    34
    {
williamr@2
    35
public:
williamr@2
    36
    
williamr@2
    37
    /**
williamr@2
    38
    * Haptics status.
williamr@2
    39
    */
williamr@2
    40
    enum THWRMHapticsStatus 
williamr@2
    41
        {
williamr@2
    42
        /**
williamr@2
    43
         * Haptics is available for the observing client.
williamr@2
    44
         */
williamr@2
    45
        EHWRMHapticsStatusAvailable = 0,
williamr@2
    46
williamr@2
    47
        /**
williamr@2
    48
         * Haptics is reserved for another client. The client making 
williamr@2
    49
         * the active reservation does not receive this notification, but
williamr@2
    50
         * a success code for the reservation command.
williamr@2
    51
         */
williamr@2
    52
        EHWRMHapticsStatusReserved,
williamr@2
    53
williamr@2
    54
        /**
williamr@2
    55
         * Haptics has been suspended for this client. This occurs, when
williamr@2
    56
         * another client with higher priority makes reservation for 
williamr@2
    57
         * haptics, or when this client is making reservation and haptics 
williamr@2
    58
         * has already been reserved for a client with higher priority.
williamr@2
    59
         *
williamr@2
    60
         * In suspended state, haptics effects are not played for the
williamr@2
    61
         * suspended client, but other commands are executed as normal.
williamr@2
    62
         */
williamr@2
    63
        EHWRMHapticsStatusSuspended
williamr@2
    64
        };
williamr@2
    65
        
williamr@2
    66
    /** 
williamr@2
    67
    * Called when the device's haptics feature state changes
williamr@2
    68
    *
williamr@2
    69
    * @param aStatus Indicates haptics status.
williamr@2
    70
    *
williamr@2
    71
    * @since S60 5.1
williamr@2
    72
    *
williamr@2
    73
    * @see CHWRMHaptics::THWRMHapticsStatus
williamr@2
    74
    */
williamr@2
    75
    virtual void HapticsStatusChangedL( THWRMHapticsStatus aStatus ) = 0;
williamr@2
    76
        
williamr@2
    77
    /** 
williamr@2
    78
    * Called when effect has completed playing. 
williamr@2
    79
    * 
williamr@2
    80
    * Method reserved for future use.
williamr@2
    81
    *
williamr@2
    82
    * @param aError Reason of completion.
williamr@2
    83
    * @param aEffectHandle The associated effectHandle to the effect.
williamr@2
    84
    *
williamr@2
    85
    * @since S60 5.1
williamr@2
    86
    */
williamr@2
    87
    virtual void EffectCompletedL( TInt aError, TInt aEffectHandle ) = 0;
williamr@2
    88
    };
williamr@2
    89
williamr@2
    90
#endif // M_HWRMHAPTICSOBSERVER_H