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@4: * under the terms of "Eclipse Public License v1.0" williamr@2: * which accompanies this distribution, and is available williamr@4: * at the URL "http://www.eclipse.org/legal/epl-v10.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: * MHWRMHapticsActuatorObserver class. williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: #ifndef M_HWRMHAPTICSACTUATOROBSERVER_H williamr@2: #define M_HWRMHAPTICSACTUATOROBSERVER_H williamr@2: williamr@2: #include williamr@2: williamr@2: /** williamr@2: * MHWRMHapticsActuatorObserver observer class. williamr@2: * williamr@2: * A client should derive from this abstract class to receive williamr@2: * logical actuator event notifications. williamr@2: * williamr@2: * @since S60 5.1 williamr@2: */ williamr@2: class MHWRMHapticsActuatorObserver williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: * @enum THWRMActuatorEvents williamr@2: * williamr@2: * Events that can happen to logical actuators. williamr@2: */ williamr@2: enum THWRMActuatorEvents williamr@2: { williamr@2: /** williamr@2: * This event occurs, when an actuator plugin of a previously williamr@2: * unsupported logical actuator type is installed to the device. williamr@2: * williamr@2: * In practice, this event may occur when the user of the device williamr@2: * starts using an external vibra device, which requires the williamr@2: * installation of an actuator plugin currently not present in williamr@2: * the device. williamr@2: */ williamr@2: EHWRMActuatorAttached, williamr@2: williamr@2: /** williamr@2: * This event occurs, when an actuator plugin of a previously williamr@2: * supported logical actuator type is uninstalled from the device. williamr@2: * williamr@2: * In practice, this event may occur when the user of the device williamr@2: * chooses to stop using an external vibra device, and uninstalls williamr@2: * a previously installed actuator plugin. williamr@2: */ williamr@2: EHWRMActuatorDetached, williamr@2: williamr@2: /** williamr@2: * Actuator is currently enabled and it is ready to be used williamr@2: * as normal. williamr@2: * williamr@2: * Enabled/disabled state of an actuator is notified, when the williamr@2: * actuator is opened by a client and when the state changes williamr@2: * on runtime. williamr@2: */ williamr@2: EHWRMActuatorEnabled, williamr@2: williamr@2: /** williamr@2: * Actuator is currently disabled and it is not able to handle williamr@2: * haptics commands. This state of a logical actuator is in most williamr@2: * cases relevant only for actuator plugins handling external williamr@2: * vibra devices; E.g. connection to the external device may be williamr@2: * lost, in which case the plugin is not able to execute incoming williamr@2: * commands. williamr@2: */ williamr@2: EHWRMActuatorDisabled, williamr@2: williamr@2: /** williamr@2: * For sanity checks only e.g. when enumerating actuator events. williamr@2: */ williamr@2: EHWRMEventLast williamr@2: }; williamr@2: williamr@2: /** williamr@2: * Called when the state of an actuator changes. williamr@2: * williamr@2: * @param aEvent Indicates the type of event. williamr@2: * @param aActuator Logical actuator to which the event happened. williamr@2: * williamr@2: * @since S60 5.1 williamr@2: */ williamr@2: virtual void ActuatorEventL( THWRMActuatorEvents aEvent, williamr@2: THWRMLogicalActuators aActuator ) = 0; williamr@2: }; williamr@2: williamr@2: #endif // M_HWRMHAPTICSACTUATOROBSERVER_H