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