1.1 --- a/epoc32/include/remconcoreapi.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/remconcoreapi.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,318 @@
1.4 -remconcoreapi.h
1.5 +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// 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
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +
1.20 +
1.21 +
1.22 +/**
1.23 + @file
1.24 + @publishedAll
1.25 + @released
1.26 +*/
1.27 +
1.28 +#ifndef REMCONCOREAPI_H
1.29 +#define REMCONCOREAPI_H
1.30 +
1.31 +#include <e32base.h>
1.32 +
1.33 +/**
1.34 +The operation-specific data field for operations in the Core API has the
1.35 +following format.
1.36 +For commands, there is 1 byte containing the button action. There is optional
1.37 +further data, depending on the operation itself. For instance, Play carries an
1.38 +extra 4 bytes of 'play speed' information. Hence the operation-specific data
1.39 +for a Play command is 5 bytes long.
1.40 +For responses, there are 4 bytes of 'results' data. This is followed by
1.41 +whatever operation-specific data was attached to the originating command (so
1.42 +that the client can identify if necessary what the response is a response to).
1.43 +Hence the operation-specific data for a Play response is 9 bytes long.
1.44 +*/
1.45 +
1.46 +/** A buffer size for Core API operations' operation-specific data. */
1.47 +const TUint KRemConCoreApiMaxOperationSpecificDataSize = 16;
1.48 +
1.49 +/** Length of the results data in bytes. */
1.50 +const TUint KRemConCoreApiResultDataLength = 4;
1.51 +
1.52 +/** String of same length as result data.*/
1.53 +_LIT8(KRemConCoreApiResultPad, " ");
1.54 +
1.55 +/** Offset for operation data for commands */
1.56 +const TUint KRemConCoreApiCommandDataOffset = 0;
1.57 +
1.58 +/** Offset for operation data for responses */
1.59 +const TUint KRemConCoreApiResponseDataOffset = KRemConCoreApiResultDataLength;
1.60 +
1.61 +/** Offset of button data from beginning of data section.
1.62 +ie the offset of the data for commands is KRemConCoreApiCommandDataOffset
1.63 ++KRemConCoreApiButtonDataOffset. The offset of the button data for
1.64 +responses is KRemConCoreApiResponseDataOffset+KRemConCoreApiButtonDataOffset.
1.65 +*/
1.66 +const TUint KRemConCoreApiButtonDataOffset = 0;
1.67 +
1.68 +/** Length of the button action data in bytes. */
1.69 +const TUint KRemConCoreApiButtonDataLength = 1;
1.70 +
1.71 +/** Button actions. */
1.72 +enum TRemConCoreApiButtonAction
1.73 + {
1.74 + /** A button has been pressed. */
1.75 + ERemConCoreApiButtonPress = 0,
1.76 +
1.77 + /** A button has been released. */
1.78 + ERemConCoreApiButtonRelease = 1,
1.79 +
1.80 + /** A button has been clicked. */
1.81 + ERemConCoreApiButtonClick = 2,
1.82 + };
1.83 +
1.84 +/** Button press refresh interval.
1.85 +If the client wants to emulate a button being held down, they send a press.
1.86 +The client must re-post the press within this time, and continue to re-post
1.87 +at least this frequently, otherwise the bearer may assume that the hold has
1.88 +finished. The client may finish the hold by sending a release.*/
1.89 +const TUint KRemConCoreApiPressRefreshInterval = 1000000;
1.90 +
1.91 +/**
1.92 +The UID identifying this outer-layer RemCon interface.
1.93 +*/
1.94 +const TInt KRemConCoreApiUid = 0x10205E60;
1.95 +
1.96 +/**
1.97 +Operation ids belonging to the Core API.
1.98 +These values are not numbered sequentially as a facility to AVRCP, which may
1.99 +assume that they are numbered the same as the operation IDs in the AV/C Panel
1.100 +Subunit Specification 1.21 Table 9.21.
1.101 +*/
1.102 +enum TRemConCoreApiOperationId
1.103 + {
1.104 + /** Select. */
1.105 + ERemConCoreApiSelect = 0x00,
1.106 + /** Up. */
1.107 + ERemConCoreApiUp = 0x01,
1.108 + /** Down. */
1.109 + ERemConCoreApiDown = 0x02,
1.110 + /** Left. */
1.111 + ERemConCoreApiLeft = 0x03,
1.112 + /** Right. */
1.113 + ERemConCoreApiRight = 0x04,
1.114 + /** RightUp. */
1.115 + ERemConCoreApiRightUp = 0x05,
1.116 + /** RightDown. */
1.117 + ERemConCoreApiRightDown = 0x06,
1.118 + /** LeftUp. */
1.119 + ERemConCoreApiLeftUp = 0x07,
1.120 + /** LeftDown. */
1.121 + ERemConCoreApiLeftDown = 0x08,
1.122 + /** RootMenu. */
1.123 + ERemConCoreApiRootMenu = 0x09,
1.124 + /** SetupMenu. */
1.125 + ERemConCoreApiSetupMenu = 0x0a,
1.126 + /** ContentsMenu. */
1.127 + ERemConCoreApiContentsMenu = 0x0b,
1.128 + /** FavoriteMenu. */
1.129 + ERemConCoreApiFavoriteMenu = 0x0c,
1.130 + /** Exit. */
1.131 + ERemConCoreApiExit = 0x0d,
1.132 + /** 0. */
1.133 + ERemConCoreApi0 = 0x20,
1.134 + /** 1. */
1.135 + ERemConCoreApi1 = 0x21,
1.136 + /** 2. */
1.137 + ERemConCoreApi2 = 0x22,
1.138 + /** 3. */
1.139 + ERemConCoreApi3 = 0x23,
1.140 + /** 4. */
1.141 + ERemConCoreApi4 = 0x24,
1.142 + /** 5. */
1.143 + ERemConCoreApi5 = 0x25,
1.144 + /** 6. */
1.145 + ERemConCoreApi6 = 0x26,
1.146 + /** 7. */
1.147 + ERemConCoreApi7 = 0x27,
1.148 + /** 8. */
1.149 + ERemConCoreApi8 = 0x28,
1.150 + /** 9. */
1.151 + ERemConCoreApi9 = 0x29,
1.152 + /** Dot. */
1.153 + ERemConCoreApiDot = 0x2a,
1.154 + /** Enter. */
1.155 + ERemConCoreApiEnter = 0x2b,
1.156 + /** Clear. */
1.157 + ERemConCoreApiClear = 0x2c,
1.158 + /** ChannelUp. */
1.159 + ERemConCoreApiChannelUp = 0x30,
1.160 + /** ChannelDown. */
1.161 + ERemConCoreApiChannelDown = 0x31,
1.162 + /** PreviousChannel. */
1.163 + ERemConCoreApiPreviousChannel = 0x32,
1.164 + /** SoundSelect. */
1.165 + ERemConCoreApiSoundSelect = 0x33,
1.166 + /** InputSelect. */
1.167 + ERemConCoreApiInputSelect = 0x34,
1.168 + /** DisplayInformation. */
1.169 + ERemConCoreApiDisplayInformation = 0x35,
1.170 + /** Help. */
1.171 + ERemConCoreApiHelp = 0x36,
1.172 + /** PageUp. */
1.173 + ERemConCoreApiPageUp = 0x37,
1.174 + /** PageDown. */
1.175 + ERemConCoreApiPageDown = 0x38,
1.176 + /** Power. */
1.177 + ERemConCoreApiPower = 0x40,
1.178 + /** VolumeUp. */
1.179 + ERemConCoreApiVolumeUp = 0x41,
1.180 + /** VolumeDown. */
1.181 + ERemConCoreApiVolumeDown = 0x42,
1.182 + /** Mute. */
1.183 + ERemConCoreApiMute = 0x43,
1.184 + /** Play. */
1.185 + ERemConCoreApiPlay = 0x44,
1.186 + /** Stop. */
1.187 + ERemConCoreApiStop = 0x45,
1.188 + /** Pause. */
1.189 + ERemConCoreApiPause = 0x46,
1.190 + /** Record. */
1.191 + ERemConCoreApiRecord = 0x47,
1.192 + /** Rewind. */
1.193 + ERemConCoreApiRewind = 0x48,
1.194 + /** FastForward. */
1.195 + ERemConCoreApiFastForward = 0x49,
1.196 + /** Eject. */
1.197 + ERemConCoreApiEject = 0x4a,
1.198 + /** Forward. */
1.199 + ERemConCoreApiForward = 0x4b,
1.200 + /** Backward. */
1.201 + ERemConCoreApiBackward = 0x4c,
1.202 + /** Angle. */
1.203 + ERemConCoreApiAngle = 0x50,
1.204 + /** Subpicture. */
1.205 + ERemConCoreApiSubpicture = 0x51,
1.206 + /** PausePlayFunction. */
1.207 + ERemConCoreApiPausePlayFunction = 0x61,
1.208 + /** RestoreVolumeFunction. */
1.209 + ERemConCoreApiRestoreVolumeFunction = 0x66,
1.210 + /** TuneFunction. */
1.211 + ERemConCoreApiTuneFunction = 0x67,
1.212 + /** SelectDiskFunction. */
1.213 + ERemConCoreApiSelectDiskFunction = 0x68,
1.214 + /** SelectAvInputFunction. */
1.215 + ERemConCoreApiSelectAvInputFunction = 0x69,
1.216 + /** SelectAudioInputFunction. */
1.217 + ERemConCoreApiSelectAudioInputFunction = 0x6a,
1.218 + /** F1. */
1.219 + ERemConCoreApiF1 = 0x71,
1.220 + /** F2. */
1.221 + ERemConCoreApiF2 = 0x72,
1.222 + /** F3. */
1.223 + ERemConCoreApiF3 = 0x73,
1.224 + /** F4. */
1.225 + ERemConCoreApiF4 = 0x74,
1.226 + /** F5. */
1.227 + ERemConCoreApiF5 = 0x75,
1.228 +
1.229 + /* No-operation */
1.230 + ENop = 0x76,
1.231 +
1.232 + /**
1.233 + * This enum is created for internal purpose to have the largest value in TRemConCoreApiOperationId.
1.234 + * If anyone needs an value for no-operation then we suggest to use 'ENop' instead.
1.235 + * If new enums values are added in TRemConCoreApiOperationId then value of ELargestOperationId
1.236 + * may change resulting in a BC break.
1.237 + * */
1.238 + ELargestOperationId = 0x76,
1.239 + };
1.240 +
1.241 +/** Speeds associated with Play APIs.
1.242 +These values are not numbered sequentially as a facility to AVRCP, which may
1.243 +assume that they are numbered the same as the playback speeds in the AV/C
1.244 +Panel Subunit Specification 1.21 Table 9.26.
1.245 +*/
1.246 +enum TRemConCoreApiPlaybackSpeed
1.247 + {
1.248 + /** NextFrame. */
1.249 + ERemConCoreApiPlaybackSpeedNextFrame = 0x30,
1.250 + /** SlowestForward. */
1.251 + ERemConCoreApiPlaybackSpeedSlowestForward = 0x31,
1.252 + /** SlowForward6. */
1.253 + ERemConCoreApiPlaybackSpeedSlowForward6 = 0x32,
1.254 + /** SlowForward5. */
1.255 + ERemConCoreApiPlaybackSpeedSlowForward5 = 0x33,
1.256 + /** SlowForward4. */
1.257 + ERemConCoreApiPlaybackSpeedSlowForward4 = 0x34,
1.258 + /** SlowForward3. */
1.259 + ERemConCoreApiPlaybackSpeedSlowForward3 = 0x35,
1.260 + /** SlowForward2. */
1.261 + ERemConCoreApiPlaybackSpeedSlowForward2 = 0x36,
1.262 + /** SlowForward1. */
1.263 + ERemConCoreApiPlaybackSpeedSlowForward1 = 0x37,
1.264 + /** X1. */
1.265 + ERemConCoreApiPlaybackSpeedX1 = 0x38,
1.266 + /** FastForward1. */
1.267 + ERemConCoreApiPlaybackSpeedFastForward1 = 0x39,
1.268 + /** FastForward2. */
1.269 + ERemConCoreApiPlaybackSpeedFastForward2 = 0x3a,
1.270 + /** FastForward3. */
1.271 + ERemConCoreApiPlaybackSpeedFastForward3 = 0x3b,
1.272 + /** FastForward4. */
1.273 + ERemConCoreApiPlaybackSpeedFastForward4 = 0x3c,
1.274 + /** FastForward5. */
1.275 + ERemConCoreApiPlaybackSpeedFastForward5 = 0x3d,
1.276 + /** FastForward6. */
1.277 + ERemConCoreApiPlaybackSpeedFastForward6 = 0x3e,
1.278 + /** FastestForward. */
1.279 + ERemConCoreApiPlaybackSpeedFastestForward = 0x3f,
1.280 + /** PreviousFrame. */
1.281 + ERemConCoreApiPlaybackSpeedPreviousFrame = 0x40,
1.282 + /** SlowestReverse. */
1.283 + ERemConCoreApiPlaybackSpeedSlowestReverse = 0x41,
1.284 + /** SlowReverse6. */
1.285 + ERemConCoreApiPlaybackSpeedSlowReverse6 = 0x42,
1.286 + /** SlowReverse5. */
1.287 + ERemConCoreApiPlaybackSpeedSlowReverse5 = 0x43,
1.288 + /** SlowReverse4. */
1.289 + ERemConCoreApiPlaybackSpeedSlowReverse4 = 0x44,
1.290 + /** SlowReverse3. */
1.291 + ERemConCoreApiPlaybackSpeedSlowReverse3 = 0x45,
1.292 + /** SlowReverse2. */
1.293 + ERemConCoreApiPlaybackSpeedSlowReverse2 = 0x46,
1.294 + /** SlowReverse1. */
1.295 + ERemConCoreApiPlaybackSpeedSlowReverse1 = 0x47,
1.296 + /** X1Reverse. */
1.297 + ERemConCoreApiPlaybackSpeedX1Reverse = 0x48,
1.298 + /** FastReverse1. */
1.299 + ERemConCoreApiPlaybackSpeedFastReverse1 = 0x49,
1.300 + /** FastReverse2. */
1.301 + ERemConCoreApiPlaybackSpeedFastReverse2 = 0x4a,
1.302 + /** FastReverse3. */
1.303 + ERemConCoreApiPlaybackSpeedFastReverse3 = 0x4b,
1.304 + /** FastReverse4. */
1.305 + ERemConCoreApiPlaybackSpeedFastReverse4 = 0x4c,
1.306 + /** FastReverse5. */
1.307 + ERemConCoreApiPlaybackSpeedFastReverse5 = 0x4d,
1.308 + /** FastReverse6. */
1.309 + ERemConCoreApiPlaybackSpeedFastReverse6 = 0x4e,
1.310 + /** FastestReverse. */
1.311 + ERemConCoreApiPlaybackSpeedFastestReverse = 0x4f,
1.312 + /** Reverse. */
1.313 + ERemConCoreApiPlaybackSpeedReverse = 0x65,
1.314 + /** ReversePause. */
1.315 + ERemConCoreApiPlaybackSpeedReversePause = 0x6d,
1.316 + /** Forward. */
1.317 + ERemConCoreApiPlaybackSpeedForward = 0x75,
1.318 + /** ForwardPause. */
1.319 + ERemConCoreApiPlaybackSpeedForwardPause = 0x7d,
1.320 + };
1.321 +
1.322 +#endif // REMCONCOREAPI_H