1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
22 #ifndef REMCONCOREAPI_H
23 #define REMCONCOREAPI_H
28 The operation-specific data field for operations in the Core API has the
30 For commands, there is 1 byte containing the button action. There is optional
31 further data, depending on the operation itself. For instance, Play carries an
32 extra 4 bytes of 'play speed' information. Hence the operation-specific data
33 for a Play command is 5 bytes long.
34 For responses, there are 4 bytes of 'results' data. This is followed by
35 whatever operation-specific data was attached to the originating command (so
36 that the client can identify if necessary what the response is a response to).
37 Hence the operation-specific data for a Play response is 9 bytes long.
40 /** A buffer size for Core API operations' operation-specific data. */
41 const TUint KRemConCoreApiMaxOperationSpecificDataSize = 16;
43 /** Length of the results data in bytes. */
44 const TUint KRemConCoreApiResultDataLength = 4;
46 /** String of same length as result data.*/
47 _LIT8(KRemConCoreApiResultPad, " ");
49 /** Offset for operation data for commands */
50 const TUint KRemConCoreApiCommandDataOffset = 0;
52 /** Offset for operation data for responses */
53 const TUint KRemConCoreApiResponseDataOffset = KRemConCoreApiResultDataLength;
55 /** Offset of button data from beginning of data section.
56 ie the offset of the data for commands is KRemConCoreApiCommandDataOffset
57 +KRemConCoreApiButtonDataOffset. The offset of the button data for
58 responses is KRemConCoreApiResponseDataOffset+KRemConCoreApiButtonDataOffset.
60 const TUint KRemConCoreApiButtonDataOffset = 0;
62 /** Length of the button action data in bytes. */
63 const TUint KRemConCoreApiButtonDataLength = 1;
65 /** Button actions. */
66 enum TRemConCoreApiButtonAction
68 /** A button has been pressed. */
69 ERemConCoreApiButtonPress = 0,
71 /** A button has been released. */
72 ERemConCoreApiButtonRelease = 1,
74 /** A button has been clicked. */
75 ERemConCoreApiButtonClick = 2,
78 /** Button press refresh interval.
79 If the client wants to emulate a button being held down, they send a press.
80 The client must re-post the press within this time, and continue to re-post
81 at least this frequently, otherwise the bearer may assume that the hold has
82 finished. The client may finish the hold by sending a release.*/
83 const TUint KRemConCoreApiPressRefreshInterval = 1000000;
86 The UID identifying this outer-layer RemCon interface.
88 const TInt KRemConCoreApiUid = 0x10205E60;
91 Operation ids belonging to the Core API.
92 These values are not numbered sequentially as a facility to AVRCP, which may
93 assume that they are numbered the same as the operation IDs in the AV/C Panel
94 Subunit Specification 1.21 Table 9.21.
96 enum TRemConCoreApiOperationId
99 ERemConCoreApiSelect = 0x00,
101 ERemConCoreApiUp = 0x01,
103 ERemConCoreApiDown = 0x02,
105 ERemConCoreApiLeft = 0x03,
107 ERemConCoreApiRight = 0x04,
109 ERemConCoreApiRightUp = 0x05,
111 ERemConCoreApiRightDown = 0x06,
113 ERemConCoreApiLeftUp = 0x07,
115 ERemConCoreApiLeftDown = 0x08,
117 ERemConCoreApiRootMenu = 0x09,
119 ERemConCoreApiSetupMenu = 0x0a,
121 ERemConCoreApiContentsMenu = 0x0b,
123 ERemConCoreApiFavoriteMenu = 0x0c,
125 ERemConCoreApiExit = 0x0d,
127 ERemConCoreApi0 = 0x20,
129 ERemConCoreApi1 = 0x21,
131 ERemConCoreApi2 = 0x22,
133 ERemConCoreApi3 = 0x23,
135 ERemConCoreApi4 = 0x24,
137 ERemConCoreApi5 = 0x25,
139 ERemConCoreApi6 = 0x26,
141 ERemConCoreApi7 = 0x27,
143 ERemConCoreApi8 = 0x28,
145 ERemConCoreApi9 = 0x29,
147 ERemConCoreApiDot = 0x2a,
149 ERemConCoreApiEnter = 0x2b,
151 ERemConCoreApiClear = 0x2c,
153 ERemConCoreApiChannelUp = 0x30,
155 ERemConCoreApiChannelDown = 0x31,
156 /** PreviousChannel. */
157 ERemConCoreApiPreviousChannel = 0x32,
159 ERemConCoreApiSoundSelect = 0x33,
161 ERemConCoreApiInputSelect = 0x34,
162 /** DisplayInformation. */
163 ERemConCoreApiDisplayInformation = 0x35,
165 ERemConCoreApiHelp = 0x36,
167 ERemConCoreApiPageUp = 0x37,
169 ERemConCoreApiPageDown = 0x38,
171 ERemConCoreApiPower = 0x40,
173 ERemConCoreApiVolumeUp = 0x41,
175 ERemConCoreApiVolumeDown = 0x42,
177 ERemConCoreApiMute = 0x43,
179 ERemConCoreApiPlay = 0x44,
181 ERemConCoreApiStop = 0x45,
183 ERemConCoreApiPause = 0x46,
185 ERemConCoreApiRecord = 0x47,
187 ERemConCoreApiRewind = 0x48,
189 ERemConCoreApiFastForward = 0x49,
191 ERemConCoreApiEject = 0x4a,
193 ERemConCoreApiForward = 0x4b,
195 ERemConCoreApiBackward = 0x4c,
197 ERemConCoreApiAngle = 0x50,
199 ERemConCoreApiSubpicture = 0x51,
200 /** PausePlayFunction. */
201 ERemConCoreApiPausePlayFunction = 0x61,
202 /** RestoreVolumeFunction. */
203 ERemConCoreApiRestoreVolumeFunction = 0x66,
205 ERemConCoreApiTuneFunction = 0x67,
206 /** SelectDiskFunction. */
207 ERemConCoreApiSelectDiskFunction = 0x68,
208 /** SelectAvInputFunction. */
209 ERemConCoreApiSelectAvInputFunction = 0x69,
210 /** SelectAudioInputFunction. */
211 ERemConCoreApiSelectAudioInputFunction = 0x6a,
213 ERemConCoreApiF1 = 0x71,
215 ERemConCoreApiF2 = 0x72,
217 ERemConCoreApiF3 = 0x73,
219 ERemConCoreApiF4 = 0x74,
221 ERemConCoreApiF5 = 0x75,
227 * This enum is created for internal purpose to have the largest value in TRemConCoreApiOperationId.
228 * If anyone needs an value for no-operation then we suggest to use 'ENop' instead.
229 * If new enums values are added in TRemConCoreApiOperationId then value of ELargestOperationId
230 * may change resulting in a BC break.
232 ELargestOperationId = 0x76,
235 /** Speeds associated with Play APIs.
236 These values are not numbered sequentially as a facility to AVRCP, which may
237 assume that they are numbered the same as the playback speeds in the AV/C
238 Panel Subunit Specification 1.21 Table 9.26.
240 enum TRemConCoreApiPlaybackSpeed
243 ERemConCoreApiPlaybackSpeedNextFrame = 0x30,
244 /** SlowestForward. */
245 ERemConCoreApiPlaybackSpeedSlowestForward = 0x31,
247 ERemConCoreApiPlaybackSpeedSlowForward6 = 0x32,
249 ERemConCoreApiPlaybackSpeedSlowForward5 = 0x33,
251 ERemConCoreApiPlaybackSpeedSlowForward4 = 0x34,
253 ERemConCoreApiPlaybackSpeedSlowForward3 = 0x35,
255 ERemConCoreApiPlaybackSpeedSlowForward2 = 0x36,
257 ERemConCoreApiPlaybackSpeedSlowForward1 = 0x37,
259 ERemConCoreApiPlaybackSpeedX1 = 0x38,
261 ERemConCoreApiPlaybackSpeedFastForward1 = 0x39,
263 ERemConCoreApiPlaybackSpeedFastForward2 = 0x3a,
265 ERemConCoreApiPlaybackSpeedFastForward3 = 0x3b,
267 ERemConCoreApiPlaybackSpeedFastForward4 = 0x3c,
269 ERemConCoreApiPlaybackSpeedFastForward5 = 0x3d,
271 ERemConCoreApiPlaybackSpeedFastForward6 = 0x3e,
272 /** FastestForward. */
273 ERemConCoreApiPlaybackSpeedFastestForward = 0x3f,
274 /** PreviousFrame. */
275 ERemConCoreApiPlaybackSpeedPreviousFrame = 0x40,
276 /** SlowestReverse. */
277 ERemConCoreApiPlaybackSpeedSlowestReverse = 0x41,
279 ERemConCoreApiPlaybackSpeedSlowReverse6 = 0x42,
281 ERemConCoreApiPlaybackSpeedSlowReverse5 = 0x43,
283 ERemConCoreApiPlaybackSpeedSlowReverse4 = 0x44,
285 ERemConCoreApiPlaybackSpeedSlowReverse3 = 0x45,
287 ERemConCoreApiPlaybackSpeedSlowReverse2 = 0x46,
289 ERemConCoreApiPlaybackSpeedSlowReverse1 = 0x47,
291 ERemConCoreApiPlaybackSpeedX1Reverse = 0x48,
293 ERemConCoreApiPlaybackSpeedFastReverse1 = 0x49,
295 ERemConCoreApiPlaybackSpeedFastReverse2 = 0x4a,
297 ERemConCoreApiPlaybackSpeedFastReverse3 = 0x4b,
299 ERemConCoreApiPlaybackSpeedFastReverse4 = 0x4c,
301 ERemConCoreApiPlaybackSpeedFastReverse5 = 0x4d,
303 ERemConCoreApiPlaybackSpeedFastReverse6 = 0x4e,
304 /** FastestReverse. */
305 ERemConCoreApiPlaybackSpeedFastestReverse = 0x4f,
307 ERemConCoreApiPlaybackSpeedReverse = 0x65,
309 ERemConCoreApiPlaybackSpeedReversePause = 0x6d,
311 ERemConCoreApiPlaybackSpeedForward = 0x75,
313 ERemConCoreApiPlaybackSpeedForwardPause = 0x7d,
316 #endif // REMCONCOREAPI_H