|
1 /* |
|
2 * Copyright (c) 2006-2007 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 the License "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: Provides the Enumerations for Sensor interface Parameters |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef C_SENSORINTERFACE_HRH |
|
19 #define C_SENSORINTERFACE_HRH |
|
20 |
|
21 const TInt KBufSize = 20; |
|
22 const TInt KErrMessageLen = 150; |
|
23 const TInt KCmdLen = 40; |
|
24 |
|
25 // Output Key : |
|
26 _LIT8( KReturnValue, "ReturnValue" ); |
|
27 |
|
28 //Constant for appending transaction id to the output parameter list |
|
29 // in async calls |
|
30 _LIT8(KTransactionId, "TransactionID"); |
|
31 |
|
32 |
|
33 // API:FindSensorChannel : |
|
34 // Command : |
|
35 _LIT8( KCmdFindChannel, "FindSensorChannel" ); |
|
36 // Input key for key based parsing : |
|
37 _LIT8( KSearchCriterion, "SearchCriterion" ); |
|
38 // Input params : |
|
39 // Find all channels |
|
40 _LIT( KAll, "All" ); |
|
41 // Find Accelerometer Axis channels |
|
42 _LIT( KAcclmtrAxis, "AccelerometerAxis" ); |
|
43 // Find Accelerometer Wakeup channel |
|
44 _LIT( KAcclmtrWakeup, "AccelerometerWakeup" ); |
|
45 // Find Accelerometer Double Tapping channel |
|
46 _LIT( KAcclmtrDoubleTapping, "AccelerometerDoubleTapping" ); |
|
47 // Find Orientation channel |
|
48 _LIT( KOrientation, "Orientation" ); |
|
49 // Find Rotation channel |
|
50 _LIT( KRotation, "Rotation" ); |
|
51 // Output Map's internal keys : |
|
52 // Constants for channel info |
|
53 _LIT8( KChnlId, "ChannelId" ); |
|
54 _LIT8( KContextType, "ContextType" ); |
|
55 _LIT8( KQuantity, "Quantity" ); |
|
56 _LIT8( KChannelType, "ChannelType" ); |
|
57 _LIT8( KLocation, "Location" ); |
|
58 _LIT8( KVendorId, "VendorId" ); |
|
59 _LIT8( KDataItemSize, "DataItemSize" ); |
|
60 _LIT8( KChannelVisibility, "ChannelVisibility" ); |
|
61 _LIT8( KChnlDataTypeId, "ChannelDataTypeId" ); |
|
62 |
|
63 // API:RegisterForNotification : |
|
64 // Command : |
|
65 _LIT8( KCmdRegisterForNotification, "RegisterForNotification" ); |
|
66 // Input keys for key based parsing : |
|
67 //Key for listening type |
|
68 _LIT8( KListeningType, "ListeningType" ); |
|
69 //Key for channelinfo map |
|
70 _LIT8( KChnlInfoMap, "ChannelInfoMap" ); |
|
71 // Input params : |
|
72 // String for Channel Data Notification |
|
73 _LIT( KChnlData, "ChannelData" ); |
|
74 // String for Channel Change Notification |
|
75 _LIT( KChannelChange, "ChannelChange" ); |
|
76 // String for Property Change Notification |
|
77 _LIT( KPropertyChange, "ChannelPropertyChange" ); |
|
78 // String for ConditionSet Change Notification |
|
79 _LIT( KChnlCondnChange, "ChannelConditionSetChange" ); |
|
80 // Output : |
|
81 // Data type key |
|
82 _LIT8( KDataType, "DataType" ); |
|
83 // Data type values : |
|
84 _LIT( KAcclmtrAxisData, "AxisData" ); |
|
85 _LIT( KAcclmtrWakeupData, "WakeupData" ); |
|
86 _LIT( KAcclmtrDoubleTappingData, "DoubleTappingData" ); |
|
87 _LIT( KOrientationData, "OrientationData" ); |
|
88 _LIT( KRotationData, "RotationData" ); |
|
89 // Timestamp key |
|
90 _LIT8(KTimeStamp,"TimeStamp"); |
|
91 // Keys for Axis data values |
|
92 _LIT8(KXAxisData,"XAxisData"); |
|
93 _LIT8(KYAxisData,"YAxisData"); |
|
94 _LIT8(KZAxisData,"ZAxisData"); |
|
95 // Key for Direction |
|
96 _LIT8(KDirection,"DeviceDirection"); |
|
97 // Key for Orientation |
|
98 _LIT8(KDeviceOrientation,"DeviceOrientation"); |
|
99 //Constants for Device Orientation |
|
100 _LIT(KUndefined,"Undefined"); |
|
101 _LIT(KDisplayUp,"DisplayUp"); |
|
102 _LIT(KDisplayDown,"DisplayDown"); |
|
103 _LIT(KDisplayLeftUp,"DisplayLeftUp"); |
|
104 _LIT(KDisplayRightUp,"DisplayRightUp"); |
|
105 _LIT(KDisplayUpwards,"DisplayUpwards"); |
|
106 _LIT(KDisplayDownwards,"DisplayDownwards"); |
|
107 // Keys for Rotation Data values |
|
108 _LIT8(KAbtXAxis,"XRotation"); |
|
109 _LIT8(KAbtYAxis,"YRotation"); |
|
110 _LIT8(KAbtZAxis,"ZRotation"); |
|
111 // Key for channel changed notification |
|
112 _LIT8( KChannelChanged, "ChannelChanged" ); |
|
113 //Key for change type |
|
114 _LIT8( KChangeType, "ChangeType" ); |
|
115 // Keys for property change |
|
116 _LIT8( KPropId, "PropertyId" ); |
|
117 |
|
118 // API : StopReceivingNotification |
|
119 // Command |
|
120 _LIT8( KStopNotification, "Cancel" ); |
|
121 |
|
122 // API:GetChannelProperty : |
|
123 // Command : |
|
124 _LIT8(KCmdGetChnlProperty,"GetChannelProperty" ); |
|
125 // Output params: |
|
126 // Keys for channel property map |
|
127 _LIT8( KPropertyDataType, "PropertyDataType" ); |
|
128 _LIT8( KItemIndex, "ItemIndex" ); |
|
129 _LIT8( KReadOnly, "ReadOnly" ); |
|
130 _LIT8( KPropertyValue, "PropertyValue" ); |
|
131 _LIT8( KPropertyMaxValue, "PropertyMaxValue" ); |
|
132 _LIT8( KPropertyMinValue, "PropertyMinValue" ); |
|
133 |
|
134 |
|
135 // API:SetChannelProperty : |
|
136 // Command: |
|
137 _LIT8( KCmdSetChnlProperty, "SetChannelProperty" ); |
|
138 // Input key: |
|
139 _LIT8( KChannelPropertyMap, "ChannelPropertyMap" ); |
|
140 // Constants for property ID |
|
141 _LIT( KDataRate, "DataRate" ); |
|
142 _LIT( KAvailability, "Availability" ); |
|
143 _LIT( KMeasureRange, "MeasureRange" ); |
|
144 _LIT( KChannelDataFormat, "ChannelDataFormat" ); |
|
145 _LIT( KChannelAccuracy, "ChannelAccuracy" ); |
|
146 _LIT( KChannelScale, "ChannelScale" ); |
|
147 _LIT( KScaledRange, "ScaledRange" ); |
|
148 _LIT( KChannelUnit, "ChannelUnit" ); |
|
149 _LIT( KSensorModel, "SensorModel" ); |
|
150 _LIT( KConnectionType, "ConnectionType" ); |
|
151 _LIT( KSensorDescription, "Description" ); |
|
152 |
|
153 //Constant for command ModifyConditionSet |
|
154 _LIT8(KCmdModifyConditionSet,"ModifyConditionSet"); |
|
155 |
|
156 //Constants for proprty size |
|
157 //TO DO: check for the size |
|
158 const TInt KChnlPropertySize = 50; |
|
159 // Constant for the appending Error code |
|
160 _LIT8( KErrorCode, "ErrorCode" ); |
|
161 |
|
162 const TInt KMaxMsgSize = 256; |
|
163 const TInt KMaxKeySize = 128; |
|
164 |
|
165 //Constants for error messages |
|
166 _LIT8( KErrorMessage, "ErrorMessage"); |
|
167 _LIT( KErrSensorInParamList, "Empty input param list" ); |
|
168 _LIT( KErrSensorInvalidCmd, "Invalid service command" ); |
|
169 _LIT( KErrSensorInvalidReq, "Invalid service request" ); |
|
170 _LIT( KErrFindSensorChannelMissingSearchCrit, "Search criterion is missing" ); |
|
171 _LIT( KErrFindSensorChannelInvalidSrch, "Invalid channel search param" ); |
|
172 _LIT8( KErrFindSensorChannelBadSrchType, "Channel search param type invalid" ); |
|
173 _LIT( KErrRegNotifyAsyncbit, "Insufficent argument for asynchronous request" ); |
|
174 _LIT( KErrRegNotifyMissingListening, "Listening type is missing" ); |
|
175 _LIT8( KErrRegNotifyInvalidListeningType, "Listening type is invalid" ); |
|
176 _LIT( KErrRegNotifyInvalidListening, "Listening type is out of allowed range" ); |
|
177 _LIT( KErrStopNotifMissingTransId, "Transaction id is missing" ); |
|
178 _LIT( KErrStopNotifInvalidTransId, "Transaction id is incorrect" ); |
|
179 _LIT( KErrStopNotifCancelBit, "Insufficent argument for cancel request" ); |
|
180 _LIT( KErrInvalidChnlMap, "Channel info map values are inconsistent and not found" ); |
|
181 _LIT( KErrMissingChnlMap, "Channel info map is missing" ); |
|
182 _LIT( KErrMissingPropMap, "Channel property map is missing" ); |
|
183 _LIT( KErrPropMissingArgs, "Missing input params" ); |
|
184 _LIT( KErrPropInvalidPropId, "Property id is invalid" ); |
|
185 _LIT( KErrPropNotSupported, "Property is not supported by this channel" ); |
|
186 _LIT( KErrPropIncorrectVals, "Property values are incorrect" ); |
|
187 _LIT( KErrPropSetNotSupported, "Setting channel property is not supported;can only be set by HW" ); |
|
188 _LIT( KErrMissingPropId, "Property id is missing from input params" ); |
|
189 _LIT( KErrRegNotEnoughParams, "Incomplete input param list" ); |
|
190 _LIT( KErrInvalidNotif, "Notification is already registered on this channel" ); |
|
191 _LIT8( KStrPropertyValueMax, "String property value exceeds max length of 20" ); |
|
192 _LIT( KErrRegNoCallback, "Callback missing" ); |
|
193 _LIT( KMsgErr, "Sensors:"); |
|
194 _LIT( KColon, ":"); |
|
195 _LIT( KIncorrectValue, " Value Incorrect" ); |
|
196 _LIT( KInvalid, "Invalid" ); |
|
197 _LIT( KMissing, " Missing from ChannelInfoMap" ); |
|
198 _LIT( KTypeErr, " Type "); |
|
199 |
|
200 #endif // C_SENSORINTERFACE_HRH |