1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/hwrmhapticsactuatorobserver.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,103 @@
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 +* MHWRMHapticsActuatorObserver class.
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +#ifndef M_HWRMHAPTICSACTUATOROBSERVER_H
1.24 +#define M_HWRMHAPTICSACTUATOROBSERVER_H
1.25 +
1.26 +#include <hwrmlogicalactuators.h>
1.27 +
1.28 +/**
1.29 +* MHWRMHapticsActuatorObserver observer class.
1.30 +*
1.31 +* A client should derive from this abstract class to receive
1.32 +* logical actuator event notifications.
1.33 +*
1.34 +* @since S60 5.1
1.35 +*/
1.36 +class MHWRMHapticsActuatorObserver
1.37 + {
1.38 +public:
1.39 +
1.40 + /**
1.41 + * @enum THWRMActuatorEvents
1.42 + *
1.43 + * Events that can happen to logical actuators.
1.44 + */
1.45 + enum THWRMActuatorEvents
1.46 + {
1.47 + /**
1.48 + * This event occurs, when an actuator plugin of a previously
1.49 + * unsupported logical actuator type is installed to the device.
1.50 + *
1.51 + * In practice, this event may occur when the user of the device
1.52 + * starts using an external vibra device, which requires the
1.53 + * installation of an actuator plugin currently not present in
1.54 + * the device.
1.55 + */
1.56 + EHWRMActuatorAttached,
1.57 +
1.58 + /**
1.59 + * This event occurs, when an actuator plugin of a previously
1.60 + * supported logical actuator type is uninstalled from the device.
1.61 + *
1.62 + * In practice, this event may occur when the user of the device
1.63 + * chooses to stop using an external vibra device, and uninstalls
1.64 + * a previously installed actuator plugin.
1.65 + */
1.66 + EHWRMActuatorDetached,
1.67 +
1.68 + /**
1.69 + * Actuator is currently enabled and it is ready to be used
1.70 + * as normal.
1.71 + *
1.72 + * Enabled/disabled state of an actuator is notified, when the
1.73 + * actuator is opened by a client and when the state changes
1.74 + * on runtime.
1.75 + */
1.76 + EHWRMActuatorEnabled,
1.77 +
1.78 + /**
1.79 + * Actuator is currently disabled and it is not able to handle
1.80 + * haptics commands. This state of a logical actuator is in most
1.81 + * cases relevant only for actuator plugins handling external
1.82 + * vibra devices; E.g. connection to the external device may be
1.83 + * lost, in which case the plugin is not able to execute incoming
1.84 + * commands.
1.85 + */
1.86 + EHWRMActuatorDisabled,
1.87 +
1.88 + /**
1.89 + * For sanity checks only e.g. when enumerating actuator events.
1.90 + */
1.91 + EHWRMEventLast
1.92 + };
1.93 +
1.94 + /**
1.95 + * Called when the state of an actuator changes.
1.96 + *
1.97 + * @param aEvent Indicates the type of event.
1.98 + * @param aActuator Logical actuator to which the event happened.
1.99 + *
1.100 + * @since S60 5.1
1.101 + */
1.102 + virtual void ActuatorEventL( THWRMActuatorEvents aEvent,
1.103 + THWRMLogicalActuators aActuator ) = 0;
1.104 + };
1.105 +
1.106 +#endif // M_HWRMHAPTICSACTUATOROBSERVER_H