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: VibeTonz related const definitions header file |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef _HWRMHAPTICSVIBECONSTANTS_H |
|
19 #define _HWRMHAPTICSVIBECONSTANTS_H |
|
20 |
|
21 #include <e32def.h> |
|
22 #include <limits.h> |
|
23 |
|
24 /** |
|
25 * Invalid index constant |
|
26 */ |
|
27 const TInt KVibeInvalidIndex = -1; |
|
28 |
|
29 /** |
|
30 * String maximum length constants |
|
31 */ |
|
32 const TInt KVibeMaxEffectNameLength = 128; // Maximum effect name length |
|
33 const TInt KVibeMaxDeviceNameLength = 64; // Maximum device name length |
|
34 const TInt KVibeMaxCapabilityStringLength = 64; // Maximum capability string length |
|
35 const TInt KVibeMaxPropertyStringLength = 64; // Maximum property string length |
|
36 |
|
37 /** |
|
38 * 'Infinite' time |
|
39 */ |
|
40 const TInt KVibeTimeInfinite = INT_MAX; |
|
41 |
|
42 /** |
|
43 * Device Default priority value |
|
44 */ |
|
45 const TInt KVibeDevicePriorityDefault = 0; |
|
46 |
|
47 /** |
|
48 * 'Infinite' repeat count value |
|
49 */ |
|
50 const TUint8 KVibeRepeatCountInfinite = 255; |
|
51 |
|
52 /** |
|
53 * Maximum size of streaming sample (in bytes) |
|
54 */ |
|
55 const TInt KVibeMaxStreamingSampleSize = 255; |
|
56 |
|
57 /** |
|
58 * Data value types (used as property and capability data value type) |
|
59 */ |
|
60 const TUint8 KVibeValuetypeUnspecified = 0; |
|
61 const TUint8 KVibeValuetypeInt32 = 1; |
|
62 const TUint8 KVibeValuetypeBool = 2; |
|
63 const TUint8 KVibeValuetypeString = 3; |
|
64 |
|
65 /** |
|
66 * Error and Return value codes. |
|
67 */ |
|
68 // Success |
|
69 const TInt KVibeStatusSuccess = 0; |
|
70 |
|
71 // Effect is not playing |
|
72 const TInt KVibeWarningNotPlaying = 1; |
|
73 |
|
74 // Effect doesn't have enough priority to play, |
|
75 // higher priority effect is playing on the device |
|
76 const TInt KVibeWarningInsufficientPriority = 2; |
|
77 |
|
78 // Effects are disabled on the device |
|
79 const TInt KVibeWarningEffectsDisabled = 3; |
|
80 |
|
81 // Trying to resume an effect that is not paused |
|
82 const TInt KVibeWarningNotPaused = 4; |
|
83 |
|
84 // The API is already initialized (this code is obsolete) |
|
85 const TInt KVibeErrAlreadyInitialized = -1; |
|
86 |
|
87 // The API is not initialized |
|
88 const TInt KVibeErrNotInitialized = -2; |
|
89 |
|
90 // Invalid argument was used in a API function call |
|
91 const TInt KVibeErrInvalidArgument = -3; |
|
92 |
|
93 // Generic error |
|
94 const TInt KVibeErrFail = -4; |
|
95 |
|
96 // Incompatible Effect type has been passed into an API call |
|
97 const TInt KVibeErrIncompatibleEffectType = -5; |
|
98 |
|
99 // Incompatible Capability type was used in one of the following API call: |
|
100 // -ImmVibeGetDeviceCapabilityString |
|
101 // -ImmVibeSetDeviceCapabilityString |
|
102 // -ImmVibeGetDeviceCapabilityInt32 |
|
103 // -ImmVibeGetDeviceCapabilityInt32 |
|
104 const TInt KVibeErrIncompatibleCapabilityType = -6; |
|
105 |
|
106 // Incompatible Property type was used in on of the following API calls: |
|
107 // -ImmVibeGetDevicePropertyString |
|
108 // -ImmVibeSetDevicePropertyString |
|
109 // -ImmVibeGetDevicePropertyBool |
|
110 // -ImmVibeGetDevicePropertyInt32 |
|
111 // -ImmVibeSetDevicePropertyInt32 |
|
112 const TInt KVibeErrIncompatiblePropertyType = -7; |
|
113 |
|
114 // Access to the instance of haptics is locked until a valid license key is provided. |
|
115 // Use ImmVibeSetDevicePropertyString to set the license key. |
|
116 // The following API functions may return this error |
|
117 // -ImmVibeGetDevicePropertyBool |
|
118 // -ImmVibeSetDevicePropertyBool |
|
119 // -ImmVibeGetDevicePropertyInt32 |
|
120 // -ImmVibeSetDevicePropertyInt32 |
|
121 // -ImmVibeGetDevicePropertyString |
|
122 // -ImmVibeSetDevicePropertyString (except for setting the license key) |
|
123 // -ImmVibePlayIVTEffect |
|
124 // -ImmVibePlayIVTEffectRepeat |
|
125 // -ImmVibeStopPlayingEffect |
|
126 // -ImmVibePlayMagSweepEffect |
|
127 // -ImmVibePlayPeriodicEffect |
|
128 // -ImmVibeModifyPlayingMagSweepEffect |
|
129 // -ImmVibeModifyPlayingPeriodicEffect |
|
130 // -ImmVibeStopAllPlayingEffects |
|
131 const TInt KVibeErrDeviceNeedsLicense = -8; |
|
132 |
|
133 // Cannot allocate memory to complete the request |
|
134 const TInt KVibeErrNotEnoughMemory = -9; |
|
135 |
|
136 // ImmVibe service is not running |
|
137 const TInt KVibeErrServiceNotRunning = -10; |
|
138 |
|
139 // Insufficient priority to complete the request (insufficient license key priority) |
|
140 const TInt KVibeErrInsufficientPriority = -11; |
|
141 |
|
142 // ImmVibe service is busy and failed to complete the request |
|
143 const TInt KVibeErrServiceBusy = -12; |
|
144 |
|
145 #endif // _HWRMHAPTICSVIBECONSTANTS_H |
|