|
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 "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: This file contains haptics common panic codes and commands |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef HWRMHAPTICSCLIENTSERVER_H |
|
20 #define HWRMHAPTICSCLIENTSERVER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 /** |
|
25 * Constant used in message response handling, when |
|
26 * a response is received from an adaptation plugin. |
|
27 */ |
|
28 const TInt KHapticsMessageResponseArgsOffset = 1; |
|
29 |
|
30 /** |
|
31 * IPC-commands used in message passing between client |
|
32 * and server. |
|
33 */ |
|
34 enum THWRMHapticsRequest |
|
35 { |
|
36 EHWRMHaptics = 2000, |
|
37 EHWRMHapticsService, |
|
38 EHWRMHapticsPlayEffect, |
|
39 EHWRMHapticsSuppActuators, |
|
40 EHWRMHapticsOpenActuator, |
|
41 EHWRMHapticsSetLicenseProp, |
|
42 EHWRMHapticsReserve, |
|
43 EHWRMHapticsRelease, |
|
44 EHWRMHapticsCleanup, |
|
45 EHWRMHapticsGetStatus, |
|
46 EHWRMHapticsStatusNotification, |
|
47 EHWRMHapticsBridgeCommand |
|
48 }; |
|
49 |
|
50 /** |
|
51 * Specifies the different types of status to be notified to |
|
52 * client, when it has requested notification from server. |
|
53 * This type enumeration is needed, since the observer in |
|
54 * the client side is implemented as a single active object. |
|
55 * With the type value, the observer can recognize which status |
|
56 * was received. The observation is implemented with a single |
|
57 * active object to minimize the IPC-commands send to the |
|
58 * server. |
|
59 */ |
|
60 enum THWRMHapticsStatusTypes |
|
61 { |
|
62 /** |
|
63 * Haptics status. This value is used by haptics server, |
|
64 * when it notifies a client from haptics status changes. |
|
65 * Haptics client uses this value, when it requests status |
|
66 * information, and only haptics status notification is desired. |
|
67 * |
|
68 * @see MHWRMHapticsObserver::THWRMHapticsStatus |
|
69 */ |
|
70 EHWRMHapticsSessionStatus, |
|
71 |
|
72 /** |
|
73 * Actuator status. This value is used by haptics server, |
|
74 * when it notifies a client from actuator status changes. |
|
75 * Haptics client uses this value, when it requests status |
|
76 * information, and only actuator status notification is |
|
77 * desired. |
|
78 * |
|
79 * @see MHWRMHapticsActuatorObserver::THWRMActuatorEvents |
|
80 */ |
|
81 EHWRMHapticsActuatorStatus, |
|
82 |
|
83 /** |
|
84 * Both status types. This value is used only by haptics |
|
85 * client, when it requests status information, and both |
|
86 * status notification types are desired. |
|
87 */ |
|
88 EHWRMHapticsBothStatus |
|
89 }; |
|
90 |
|
91 /** |
|
92 * Defines the haptics server panic codes. |
|
93 */ |
|
94 enum THWRMHapticsPanic |
|
95 { |
|
96 /** |
|
97 * Illegal function called via client-server interface. |
|
98 */ |
|
99 EPanicIllegalFunction = 0, |
|
100 |
|
101 /** |
|
102 * Bad handle in client-server interface. |
|
103 */ |
|
104 EPanicBadHandle, |
|
105 |
|
106 /** |
|
107 * Actuator has not yet been opened successfully. |
|
108 */ |
|
109 EPanicNotReady |
|
110 }; |
|
111 |
|
112 #endif // HWRMHAPTICSCLIENTSERVER_H |
|
113 |
|
114 // End of File |