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