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