epoc32/include/remconcoreapi.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 /**
    17  @file
    18  @publishedAll
    19  @released
    20 */
    21 
    22 #ifndef REMCONCOREAPI_H
    23 #define REMCONCOREAPI_H
    24 
    25 #include <e32base.h>
    26 											
    27 /**
    28 The operation-specific data field for operations in the Core API has the 
    29 following format.
    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.
    38 */
    39 
    40 /** A buffer size for Core API operations' operation-specific data. */
    41 const TUint KRemConCoreApiMaxOperationSpecificDataSize = 16;
    42 
    43 /** Length of the results data in bytes. */
    44 const TUint KRemConCoreApiResultDataLength = 4;
    45 
    46 /** String of same length as result data.*/
    47 _LIT8(KRemConCoreApiResultPad, "    ");
    48 
    49 /** Offset for operation data for commands */
    50 const TUint KRemConCoreApiCommandDataOffset = 0; 
    51 
    52 /** Offset for operation data for responses */
    53 const TUint KRemConCoreApiResponseDataOffset = KRemConCoreApiResultDataLength;
    54 
    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.
    59 */
    60 const TUint KRemConCoreApiButtonDataOffset = 0;
    61 
    62 /** Length of the button action data in bytes. */
    63 const TUint KRemConCoreApiButtonDataLength = 1;
    64 
    65 /** Button actions. */
    66 enum TRemConCoreApiButtonAction
    67 	{
    68 	/** A button has been pressed. */
    69 	ERemConCoreApiButtonPress		= 0,
    70 
    71 	/** A button has been released. */
    72 	ERemConCoreApiButtonRelease 	= 1,
    73 
    74 	/** A button has been clicked. */
    75 	ERemConCoreApiButtonClick		= 2,
    76 	};
    77 
    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; 
    84 
    85 /**
    86 The UID identifying this outer-layer RemCon interface.
    87 */
    88 const TInt KRemConCoreApiUid = 0x10205E60;
    89 
    90 /**
    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.
    95 */
    96 enum TRemConCoreApiOperationId
    97 	{
    98 	/** Select. */
    99 	ERemConCoreApiSelect						= 0x00,
   100 	/** Up. */
   101 	ERemConCoreApiUp							= 0x01,
   102 	/** Down. */
   103 	ERemConCoreApiDown							= 0x02,
   104 	/** Left. */
   105 	ERemConCoreApiLeft							= 0x03,
   106 	/** Right. */
   107 	ERemConCoreApiRight 						= 0x04,
   108 	/** RightUp. */
   109 	ERemConCoreApiRightUp						= 0x05,
   110 	/** RightDown. */
   111 	ERemConCoreApiRightDown 					= 0x06,
   112 	/** LeftUp. */
   113 	ERemConCoreApiLeftUp						= 0x07,
   114 	/** LeftDown. */
   115 	ERemConCoreApiLeftDown						= 0x08,
   116 	/** RootMenu. */
   117 	ERemConCoreApiRootMenu						= 0x09,
   118 	/** SetupMenu. */
   119 	ERemConCoreApiSetupMenu 					= 0x0a,
   120 	/** ContentsMenu. */
   121 	ERemConCoreApiContentsMenu					= 0x0b,
   122 	/** FavoriteMenu. */
   123 	ERemConCoreApiFavoriteMenu					= 0x0c,
   124 	/** Exit. */
   125 	ERemConCoreApiExit							= 0x0d,
   126 	/** 0. */
   127 	ERemConCoreApi0 							= 0x20,
   128 	/** 1. */
   129 	ERemConCoreApi1 							= 0x21,
   130 	/** 2. */
   131 	ERemConCoreApi2 							= 0x22,
   132 	/** 3. */
   133 	ERemConCoreApi3 							= 0x23,
   134 	/** 4. */
   135 	ERemConCoreApi4 							= 0x24,
   136 	/** 5. */
   137 	ERemConCoreApi5 							= 0x25,
   138 	/** 6. */
   139 	ERemConCoreApi6 							= 0x26,
   140 	/** 7. */
   141 	ERemConCoreApi7 							= 0x27,
   142 	/** 8. */
   143 	ERemConCoreApi8 							= 0x28,
   144 	/** 9. */
   145 	ERemConCoreApi9 							= 0x29,
   146 	/** Dot. */
   147 	ERemConCoreApiDot							= 0x2a,
   148 	/** Enter. */
   149 	ERemConCoreApiEnter 						= 0x2b,
   150 	/** Clear. */
   151 	ERemConCoreApiClear 						= 0x2c,
   152 	/** ChannelUp. */
   153 	ERemConCoreApiChannelUp 					= 0x30,
   154 	/** ChannelDown. */
   155 	ERemConCoreApiChannelDown					= 0x31,
   156 	/** PreviousChannel. */
   157 	ERemConCoreApiPreviousChannel				= 0x32,
   158 	/** SoundSelect. */
   159 	ERemConCoreApiSoundSelect					= 0x33,
   160 	/** InputSelect. */
   161 	ERemConCoreApiInputSelect					= 0x34,
   162 	/** DisplayInformation. */
   163 	ERemConCoreApiDisplayInformation			= 0x35,
   164 	/** Help. */
   165 	ERemConCoreApiHelp							= 0x36,
   166 	/** PageUp. */
   167 	ERemConCoreApiPageUp						= 0x37,
   168 	/** PageDown. */
   169 	ERemConCoreApiPageDown						= 0x38,
   170 	/** Power. */
   171 	ERemConCoreApiPower 						= 0x40,
   172 	/** VolumeUp. */
   173 	ERemConCoreApiVolumeUp						= 0x41,
   174 	/** VolumeDown. */
   175 	ERemConCoreApiVolumeDown					= 0x42, 
   176 	/** Mute. */
   177 	ERemConCoreApiMute							= 0x43, 
   178 	/** Play. */
   179 	ERemConCoreApiPlay							= 0x44,
   180 	/** Stop. */
   181 	ERemConCoreApiStop							= 0x45,
   182 	/** Pause. */
   183 	ERemConCoreApiPause 						= 0x46,
   184 	/** Record. */
   185 	ERemConCoreApiRecord						= 0x47,
   186 	/** Rewind. */
   187 	ERemConCoreApiRewind						= 0x48,
   188 	/** FastForward. */
   189 	ERemConCoreApiFastForward					= 0x49,
   190 	/** Eject. */
   191 	ERemConCoreApiEject 						= 0x4a,
   192 	/** Forward. */
   193 	ERemConCoreApiForward						= 0x4b,
   194 	/** Backward. */
   195 	ERemConCoreApiBackward						= 0x4c,
   196 	/** Angle. */
   197 	ERemConCoreApiAngle 						= 0x50,
   198 	/** Subpicture. */
   199 	ERemConCoreApiSubpicture					= 0x51,
   200 	/** PausePlayFunction. */
   201 	ERemConCoreApiPausePlayFunction 			= 0x61,
   202 	/** RestoreVolumeFunction. */
   203 	ERemConCoreApiRestoreVolumeFunction 		= 0x66,
   204 	/** TuneFunction. */
   205 	ERemConCoreApiTuneFunction					= 0x67,
   206 	/** SelectDiskFunction. */
   207 	ERemConCoreApiSelectDiskFunction			= 0x68,
   208 	/** SelectAvInputFunction. */
   209 	ERemConCoreApiSelectAvInputFunction 		= 0x69,
   210 	/** SelectAudioInputFunction. */
   211 	ERemConCoreApiSelectAudioInputFunction		= 0x6a,
   212 	/** F1. */
   213 	ERemConCoreApiF1							= 0x71,
   214 	/** F2. */
   215 	ERemConCoreApiF2							= 0x72,
   216 	/** F3. */
   217 	ERemConCoreApiF3							= 0x73,
   218 	/** F4. */
   219 	ERemConCoreApiF4							= 0x74,
   220 	/** F5. */
   221 	ERemConCoreApiF5							= 0x75,
   222 
   223 	/* No-operation */
   224 	ENop                                        = 0x76,
   225 	
   226 	/**
   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. 
   231 	 * */
   232 	ELargestOperationId                         = 0x76,
   233 	};
   234 
   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.
   239 */
   240 enum TRemConCoreApiPlaybackSpeed
   241 	{
   242 	/** NextFrame. */
   243 	ERemConCoreApiPlaybackSpeedNextFrame		= 0x30,
   244 	/** SlowestForward. */
   245 	ERemConCoreApiPlaybackSpeedSlowestForward	= 0x31,
   246 	/** SlowForward6. */
   247 	ERemConCoreApiPlaybackSpeedSlowForward6 	= 0x32,
   248 	/** SlowForward5. */
   249 	ERemConCoreApiPlaybackSpeedSlowForward5 	= 0x33,
   250 	/** SlowForward4. */
   251 	ERemConCoreApiPlaybackSpeedSlowForward4 	= 0x34,
   252 	/** SlowForward3. */
   253 	ERemConCoreApiPlaybackSpeedSlowForward3 	= 0x35,
   254 	/** SlowForward2. */
   255 	ERemConCoreApiPlaybackSpeedSlowForward2 	= 0x36,
   256 	/** SlowForward1. */
   257 	ERemConCoreApiPlaybackSpeedSlowForward1 	= 0x37,
   258 	/** X1. */
   259 	ERemConCoreApiPlaybackSpeedX1				= 0x38,
   260 	/** FastForward1. */
   261 	ERemConCoreApiPlaybackSpeedFastForward1 	= 0x39,
   262 	/** FastForward2. */
   263 	ERemConCoreApiPlaybackSpeedFastForward2 	= 0x3a,
   264 	/** FastForward3. */
   265 	ERemConCoreApiPlaybackSpeedFastForward3 	= 0x3b,
   266 	/** FastForward4. */
   267 	ERemConCoreApiPlaybackSpeedFastForward4 	= 0x3c,
   268 	/** FastForward5. */
   269 	ERemConCoreApiPlaybackSpeedFastForward5 	= 0x3d,
   270 	/** FastForward6. */
   271 	ERemConCoreApiPlaybackSpeedFastForward6 	= 0x3e,
   272 	/** FastestForward. */
   273 	ERemConCoreApiPlaybackSpeedFastestForward	= 0x3f,
   274 	/** PreviousFrame. */
   275 	ERemConCoreApiPlaybackSpeedPreviousFrame	= 0x40,
   276 	/** SlowestReverse. */
   277 	ERemConCoreApiPlaybackSpeedSlowestReverse	= 0x41,
   278 	/** SlowReverse6. */
   279 	ERemConCoreApiPlaybackSpeedSlowReverse6 	= 0x42,
   280 	/** SlowReverse5. */
   281 	ERemConCoreApiPlaybackSpeedSlowReverse5 	= 0x43,
   282 	/** SlowReverse4. */
   283 	ERemConCoreApiPlaybackSpeedSlowReverse4 	= 0x44,
   284 	/** SlowReverse3. */
   285 	ERemConCoreApiPlaybackSpeedSlowReverse3 	= 0x45,
   286 	/** SlowReverse2. */
   287 	ERemConCoreApiPlaybackSpeedSlowReverse2 	= 0x46,
   288 	/** SlowReverse1. */
   289 	ERemConCoreApiPlaybackSpeedSlowReverse1 	= 0x47,
   290 	/** X1Reverse. */
   291 	ERemConCoreApiPlaybackSpeedX1Reverse		= 0x48,
   292 	/** FastReverse1. */
   293 	ERemConCoreApiPlaybackSpeedFastReverse1 	= 0x49,
   294 	/** FastReverse2. */
   295 	ERemConCoreApiPlaybackSpeedFastReverse2 	= 0x4a,
   296 	/** FastReverse3. */
   297 	ERemConCoreApiPlaybackSpeedFastReverse3 	= 0x4b,
   298 	/** FastReverse4. */
   299 	ERemConCoreApiPlaybackSpeedFastReverse4 	= 0x4c,
   300 	/** FastReverse5. */
   301 	ERemConCoreApiPlaybackSpeedFastReverse5 	= 0x4d,
   302 	/** FastReverse6. */
   303 	ERemConCoreApiPlaybackSpeedFastReverse6 	= 0x4e,
   304 	/** FastestReverse. */
   305 	ERemConCoreApiPlaybackSpeedFastestReverse	= 0x4f,
   306 	/** Reverse. */
   307 	ERemConCoreApiPlaybackSpeedReverse			= 0x65,
   308 	/** ReversePause. */
   309 	ERemConCoreApiPlaybackSpeedReversePause 	= 0x6d,
   310 	/** Forward. */
   311 	ERemConCoreApiPlaybackSpeedForward			= 0x75,
   312 	/** ForwardPause. */
   313 	ERemConCoreApiPlaybackSpeedForwardPause 	= 0x7d,
   314 	};
   315 
   316 #endif // REMCONCOREAPI_H