epoc32/include/hwrmhapticsactuatorobserver.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
     1 /*
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     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
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:  This file contains the header of the 
    15 *                MHWRMHapticsActuatorObserver class.
    16 *
    17 */
    18 
    19 
    20 #ifndef M_HWRMHAPTICSACTUATOROBSERVER_H
    21 #define M_HWRMHAPTICSACTUATOROBSERVER_H
    22 
    23 #include <hwrmlogicalactuators.h>
    24 
    25 /**
    26 * MHWRMHapticsActuatorObserver observer class.
    27 *
    28 * A client should derive from this abstract class to receive
    29 * logical actuator event notifications.
    30 *
    31 * @since S60 5.1
    32 */
    33 class MHWRMHapticsActuatorObserver
    34     {
    35 public:
    36  
    37     /**
    38     * @enum THWRMActuatorEvents
    39     * 
    40     * Events that can happen to logical actuators.
    41     */    
    42     enum THWRMActuatorEvents
    43         {
    44         /**
    45         * This event occurs, when an actuator plugin of a previously
    46         * unsupported logical actuator type is installed to the device.
    47         *
    48         * In practice, this event may occur when the user of the device
    49         * starts using an external vibra device, which requires the 
    50         * installation of an actuator plugin currently not present in
    51         * the device.
    52         */
    53         EHWRMActuatorAttached,
    54         
    55         /**
    56         * This event occurs, when an actuator plugin of a previously
    57         * supported logical actuator type is uninstalled from the device.
    58         *
    59         * In practice, this event may occur when the user of the device
    60         * chooses to stop using an external vibra device, and uninstalls
    61         * a previously installed actuator plugin.
    62         */
    63         EHWRMActuatorDetached,
    64         
    65         /**
    66         * Actuator is currently enabled and it is ready to be used
    67         * as normal.
    68         *
    69         * Enabled/disabled state of an actuator is notified, when the
    70         * actuator is opened by a client and when the state changes
    71         * on runtime.
    72         */
    73         EHWRMActuatorEnabled,
    74         
    75         /**
    76         * Actuator is currently disabled and it is not able to handle
    77         * haptics commands. This state of a logical actuator is in most
    78         * cases relevant only for actuator plugins handling external
    79         * vibra devices; E.g. connection to the external device may be
    80         * lost, in which case the plugin is not able to execute incoming
    81         * commands.
    82         */
    83         EHWRMActuatorDisabled, 
    84         
    85         /**
    86         * For sanity checks only e.g. when enumerating actuator events.
    87         */ 
    88         EHWRMEventLast    
    89         };
    90         
    91     /**
    92     * Called when the state of an actuator changes. 
    93     * 
    94     * @param aEvent Indicates the type of event.
    95     * @param aActuator Logical actuator to which the event happened.
    96     *
    97     * @since S60 5.1
    98     */
    99     virtual void ActuatorEventL( THWRMActuatorEvents aEvent, 
   100                                  THWRMLogicalActuators aActuator ) = 0;
   101     };
   102 
   103 #endif // M_HWRMHAPTICSACTUATOROBSERVER_H