mmlibs/mmfw/inc/mmf/ControllerFramework/mmfstandardcustomcommands.h
changeset 0 40261b775718
child 31 ae0addfe117e
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     1 // Copyright (c) 2002-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 #ifndef __MMFSTANDARDCUSTOMCOMMANDS_H
       
    17 #define __MMFSTANDARDCUSTOMCOMMANDS_H
       
    18 
       
    19 #include <mmf/common/mmfcontroller.h>
       
    20 #include <mmf/common/mmfvideo.h>
       
    21 #include "mmf/common/mmcaf.h"
       
    22 
       
    23 class CMMFVideoFrameMessage;
       
    24 class CFbsBitmap;
       
    25 class CDesC8Array;
       
    26 
       
    27 /**
       
    28 @publishedAll
       
    29 @released
       
    30 */
       
    31 const TInt KPlaybackRateNormal = 1;
       
    32 
       
    33 /**
       
    34 @publishedAll
       
    35 @released
       
    36 
       
    37 Balance value for centre
       
    38 */
       
    39 const TInt KMMFBalanceCenter = 0;
       
    40 
       
    41 /**
       
    42 @publishedAll
       
    43 @released
       
    44 
       
    45 Balance value for max left
       
    46 */
       
    47 const TInt KMMFBalanceMaxLeft = -100;
       
    48 
       
    49 /**
       
    50 @publishedAll
       
    51 @released
       
    52 
       
    53 Balance value for max right
       
    54 */
       
    55 const TInt KMMFBalanceMaxRight = 100;
       
    56 
       
    57 /**
       
    58 @publishedAll
       
    59 @released
       
    60 */
       
    61 const TInt KMMFVideoCurrentFrame = -1;
       
    62 
       
    63 /**
       
    64 @publishedAll
       
    65 @released
       
    66 */
       
    67 enum TMMFDSAEvent
       
    68 	{
       
    69 	EAbortDSA,
       
    70 	EResumeDSA
       
    71 	};
       
    72 
       
    73 /**
       
    74 @publishedAll
       
    75 @released
       
    76 
       
    77 Interface UID and messages for the Audio Resource Notification API.
       
    78 */
       
    79 const TUid KMMFEventCategoryAudioResourceAvailable = {0x101FD9F2};
       
    80 
       
    81 
       
    82 /**
       
    83 @publishedAll
       
    84 @released
       
    85 
       
    86 Interface UID and messages for the Audio Play Device API.
       
    87 */
       
    88 const TUid KUidInterfaceMMFAudioPlayDevice = {0x101F76D6};
       
    89 
       
    90 /**
       
    91 @publishedAll
       
    92 @released
       
    93 
       
    94 Interface UID and messages for the Audio Record Device API.
       
    95 */
       
    96 const TUid KUidInterfaceMMFAudioRecordDevice = {0x101F76D7};
       
    97 
       
    98 /**
       
    99 @publishedAll
       
   100 @released
       
   101 
       
   102 Interface UID and messages for the Audio Play Controller API.
       
   103 */
       
   104 const TUid KUidInterfaceMMFAudioPlayController = {0x101F76D8};
       
   105 
       
   106 /**
       
   107 @publishedAll
       
   108 @released
       
   109 
       
   110 Interface UID and messages for the Audio Record Controller API.
       
   111 */
       
   112 const TUid KUidInterfaceMMFAudioRecordController = {0x101F76D9};
       
   113 
       
   114 /**
       
   115 @publishedAll
       
   116 @released
       
   117 
       
   118 Interface UID and messages for the Audio Controller API.
       
   119 */
       
   120 const TUid KUidInterfaceMMFAudioController = {0x101F76DA};
       
   121 
       
   122 /**
       
   123 @publishedAll
       
   124 @released
       
   125 */
       
   126 const TUid KUidInterfaceMMFVideoController = {0x101F76DB};
       
   127 
       
   128 /**
       
   129 @publishedAll
       
   130 @released
       
   131 */
       
   132 const TUid KUidInterfaceMMFVideoPlayController = {0x101F7B73};
       
   133 
       
   134 /**
       
   135 @publishedAll
       
   136 @released
       
   137 */
       
   138 const TUid KUidInterfaceMMFVideoRecordController = {0x101F7B74};
       
   139 
       
   140 /**
       
   141 @publishedAll
       
   142 @released
       
   143 */
       
   144 const TUid KUidInterfaceMMFVideoDRMExt = {0x101F7C23};
       
   145 
       
   146 /**
       
   147 @publishedAll
       
   148 @released
       
   149 
       
   150 Interface UID for the custom command that supports setting the initial screen for video on the controller.
       
   151 */
       
   152 const TUid KUidInterfaceMMFVideoSetInitScreen = {0x102825F7};
       
   153 
       
   154 /**
       
   155 @publishedAll
       
   156 @released
       
   157 */
       
   158 const TUid KUidInterfaceMMFVideoPixelAspectRatio = {0x102831EF};
       
   159 
       
   160 
       
   161 /**
       
   162 @publishedAll
       
   163 @released
       
   164 */
       
   165 const TUid KUidInterfaceMMFVideoAudioSamplingRateAndChannelConfig = {0x102831F0};
       
   166 
       
   167 /**
       
   168 @publishedAll
       
   169 @released
       
   170 
       
   171 Client class to access Audio Play Device functionality.
       
   172 
       
   173 The class uses the custom command function of the controller plugin, and removes the necessity
       
   174 for the client to formulate the custom commands.
       
   175 @since 7.0s
       
   176 */
       
   177 class RMMFAudioPlayDeviceCustomCommands : public RMMFCustomCommandsBase
       
   178 	{
       
   179 public:
       
   180 
       
   181 	/**
       
   182 	Constructor.
       
   183 
       
   184 	@param  aController
       
   185 	        The client side controller object to be used by this custom command interface.
       
   186 
       
   187 	@since 7.0s
       
   188 	*/
       
   189 	IMPORT_C RMMFAudioPlayDeviceCustomCommands(RMMFController& aController);
       
   190 
       
   191 	/**
       
   192 	Sets the volume of the sound device.
       
   193 
       
   194 	@param  aVolume
       
   195 	        The new volume.
       
   196 
       
   197 	@return	One of the system-wide error codes.
       
   198 
       
   199 	@since 7.0s
       
   200 	*/
       
   201 	IMPORT_C TInt SetVolume(TInt aVolume) const;
       
   202 
       
   203 	/**
       
   204 	Gets the maximum volume supported by the sound device.
       
   205 
       
   206 	@param  aMaxVolume
       
   207 	        The maximum volume, filled in by the controller.
       
   208 
       
   209 	@return One of the system-wide error codes.
       
   210 
       
   211 	@since  7.0s
       
   212 	*/
       
   213 	IMPORT_C TInt GetMaxVolume(TInt& aMaxVolume) const;
       
   214 
       
   215 	/**
       
   216 	Gets the current playback volume.
       
   217 
       
   218 	@param  aVolume
       
   219 	        On return contains the current playback volume.
       
   220 
       
   221 	@return One of the system-wide error codes.
       
   222 
       
   223 	@since  7.0s
       
   224 	*/
       
   225 	IMPORT_C TInt GetVolume(TInt& aVolume) const;
       
   226 
       
   227 	/**
       
   228 	Sets a volume ramp.
       
   229 
       
   230 	This will cause the sound device to start playing with zero volume,
       
   231 	increasing the volume over aRampDuration microseconds.
       
   232 
       
   233 	The volume ramp can be removed by setting the ramp duration to zero.
       
   234 
       
   235 	@param  aRampDuration
       
   236 	        The duration over which the volume is to be increased, in microseconds.
       
   237 
       
   238 	@return One of the system-wide error codes.
       
   239 
       
   240 	@since 7.0s
       
   241 	*/
       
   242 	IMPORT_C TInt SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampDuration) const;
       
   243 
       
   244 	/**
       
   245 	Sets the balance between the left and right stereo audio channels.
       
   246 
       
   247 	@param  aBalance
       
   248 	        Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be
       
   249 	        restored by using KMMFBalanceCenter.
       
   250 
       
   251 	@return	One of the system-wide error codes.
       
   252 
       
   253 	@since 7.0s
       
   254 	*/
       
   255 	IMPORT_C TInt SetBalance(TInt aBalance) const;
       
   256 
       
   257 	/**
       
   258 	Gets the balance between the left and right stereo audio channels.
       
   259 
       
   260 	@param  aBalance
       
   261 	        The current balance, filled in by the controller.
       
   262 
       
   263 	@return One of the system-wide error codes.
       
   264 	
       
   265 	@since 7.0s
       
   266 	*/
       
   267 	IMPORT_C TInt GetBalance(TInt& aBalance) const;
       
   268 	};
       
   269 
       
   270 /**
       
   271 @publishedAll
       
   272 @released
       
   273 
       
   274 Mixin class to be derived from controller plugins that could support the audio play device
       
   275 custom commands.
       
   276 */
       
   277 class MMMFAudioPlayDeviceCustomCommandImplementor
       
   278 	{
       
   279 public:
       
   280 
       
   281 	/**
       
   282 	Sets the volume of the sound device.
       
   283 
       
   284 	This function can leave with one of the system-wide error codes. The request will be
       
   285 	completed with the leave code.
       
   286 
       
   287 	@param  aVolume
       
   288 	        The new volume.
       
   289 
       
   290 	@since 7.0s
       
   291 	*/
       
   292 	virtual void MapdSetVolumeL(TInt aVolume) = 0;
       
   293 
       
   294 	/**
       
   295 	Gets the maximum volume supported by the sound device.
       
   296 
       
   297 	This function can leave with one of the system-wide error codes. The request will be
       
   298 	completed with the leave code.
       
   299 
       
   300 	@param  aMaxVolume
       
   301 	        The maximum volume, to be filled in by the controller plugin.
       
   302 
       
   303 	@since 7.0s
       
   304 	*/
       
   305 	virtual void MapdGetMaxVolumeL(TInt& aMaxVolume) = 0;
       
   306 
       
   307 	/**
       
   308 	Gets the current playback volume.
       
   309 
       
   310 	This function can leave with one of the system-wide error codes. The request will be
       
   311 	completed with the leave code.
       
   312 
       
   313 	@param  aVolume
       
   314 	        The volume, to be filled in by the controller.
       
   315 
       
   316 	@since 7.0s
       
   317 	*/
       
   318 	virtual void MapdGetVolumeL(TInt& aVolume) = 0;
       
   319 
       
   320 	/**
       
   321 	Sets a volume ramp.
       
   322 
       
   323 	This will cause the sound device to start playing with zero volume,
       
   324 	increasing the volume over aRampDuration microseconds.
       
   325 
       
   326 	The volume ramp can be removed by setting the ramp duration to zero.
       
   327 
       
   328 	This function can leave with one of the system-wide error codes. The request will be
       
   329 	completed with the leave code.
       
   330 
       
   331 	@param  aRampDuration
       
   332 	        The duration over which the volume is to be increased, in microseconds.
       
   333 
       
   334 	@since 7.0s
       
   335 	*/
       
   336 	virtual void MapdSetVolumeRampL(const TTimeIntervalMicroSeconds& aRampDuration) = 0;
       
   337 
       
   338 	/**
       
   339 	Sets the balance between the left and right stereo audio channels.
       
   340 
       
   341 	This function can leave with one of the system-wide error codes. The request will be
       
   342 	completed with the leave code.
       
   343 
       
   344 	@param  aBalance
       
   345 	        Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be
       
   346 	        restored by using KMMFBalanceCenter.
       
   347 
       
   348 	@since 7.0s
       
   349 	*/
       
   350 	virtual void MapdSetBalanceL(TInt aBalance) = 0;
       
   351 
       
   352 	/**
       
   353 	Gets the balance between the left and right stereo audio channels.
       
   354 
       
   355 	This function can leave with one of the system-wide error codes. The request will be
       
   356 	completed with the leave code.
       
   357 
       
   358 	@param  aBalance
       
   359 	        The current balance, filled in by the controller.
       
   360 
       
   361 	@since 7.0s
       
   362 	*/
       
   363 	virtual void MapdGetBalanceL(TInt& aBalance) = 0;
       
   364 	};
       
   365 
       
   366 /**
       
   367 @publishedAll
       
   368 @released
       
   369 
       
   370 Custom command parser class to be used by controller plugins wishing to support
       
   371 audio play device commands.
       
   372 
       
   373 The controller plugin must be derived from MMMFAudioPlayDeviceCustomCommandImplementor
       
   374 to use this class.
       
   375 
       
   376 The controller plugin should create an object of this type and add it to the list of custom
       
   377 command parsers in the controller framework. See the following example code for details.
       
   378 
       
   379 @code
       
   380 void CMMFAudioController::ConstructL()
       
   381 	{
       
   382 	// Construct custom command parsers
       
   383 	CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
       
   384 	CleanupStack::PushL(audPlayDevParser);
       
   385 	AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
       
   386 	CleanupStack::Pop();//audPlayDevParser
       
   387 
       
   388 	CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
       
   389 	CleanupStack::PushL(audRecDevParser);
       
   390 	AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
       
   391 	CleanupStack::Pop();//audRecDevParser
       
   392 
       
   393 etc.
       
   394 	}
       
   395 @endcode
       
   396 
       
   397 @since 7.0s
       
   398 */
       
   399 class CMMFAudioPlayDeviceCustomCommandParser : public CMMFCustomCommandParserBase
       
   400 	{
       
   401 public:
       
   402 
       
   403 	/**
       
   404 	Creates a new custom command parser capable of handling audio play device commands.
       
   405 
       
   406 	This function may leave with one of the system-wide error codes.
       
   407 
       
   408 	@param  aImplementor
       
   409 	        A reference to the controller plugin that owns this new object.
       
   410 
       
   411 	@return	A pointer to the object created.
       
   412 
       
   413 	@since  7.0s
       
   414 	*/
       
   415 	IMPORT_C static CMMFAudioPlayDeviceCustomCommandParser* NewL(MMMFAudioPlayDeviceCustomCommandImplementor& aImplementor);
       
   416 
       
   417 	/**
       
   418 	Destructor.
       
   419 
       
   420 	@since  7.0s
       
   421 	*/
       
   422 	IMPORT_C ~CMMFAudioPlayDeviceCustomCommandParser();
       
   423 
       
   424 	/**
       
   425 	Handles a request from the client. Called by the controller framework.
       
   426 
       
   427 	@param  aMessage
       
   428 	        The message to be handled.
       
   429 
       
   430 	@since  7.0s
       
   431 	*/
       
   432 	void HandleRequest(TMMFMessage& aMessage);
       
   433 private:
       
   434 
       
   435 	/**
       
   436 	Constructor.
       
   437 
       
   438 	@param  aImplementor
       
   439 	        A reference to the controller plugin that owns this new object.
       
   440 
       
   441 	@since	7.0s
       
   442 	*/
       
   443 	CMMFAudioPlayDeviceCustomCommandParser(MMMFAudioPlayDeviceCustomCommandImplementor& aImplementor);
       
   444 	// Internal request handling methods.
       
   445 	void DoHandleRequestL(TMMFMessage& aMessage);
       
   446 	TBool DoSetVolumeL(TMMFMessage& aMessage);
       
   447 	TBool DoGetMaxVolumeL(TMMFMessage& aMessage);
       
   448 	TBool DoGetVolumeL(TMMFMessage& aMessage);
       
   449 	TBool DoSetVolumeRampL(TMMFMessage& aMessage);
       
   450 	TBool DoSetBalanceL(TMMFMessage& aMessage);
       
   451 	TBool DoGetBalanceL(TMMFMessage& aMessage);
       
   452 private:
       
   453 	/** The object that implements the audio play device interface */
       
   454 	MMMFAudioPlayDeviceCustomCommandImplementor& iImplementor;
       
   455 	};
       
   456 
       
   457 /**
       
   458 @publishedAll
       
   459 @released
       
   460 
       
   461 Client class to access Audio Record Device functionality.
       
   462 
       
   463 The class uses the custom command function of the controller plugin, and removes the necessity
       
   464 for the client to formulate the custom commands.
       
   465 
       
   466 @since 7.0s
       
   467 */
       
   468 class RMMFAudioRecordDeviceCustomCommands : public RMMFCustomCommandsBase
       
   469 	{
       
   470 public:
       
   471 	
       
   472 	/**
       
   473 	Constructor.
       
   474 
       
   475 	@param  aController
       
   476 	        The client side controller object to be used by this custom command interface.
       
   477 
       
   478 	@since 7.0s
       
   479 	*/
       
   480 	IMPORT_C RMMFAudioRecordDeviceCustomCommands(RMMFController& aController);
       
   481 
       
   482 	/**
       
   483 	Sets the gain of the sound device.
       
   484 
       
   485 	@param  aGain
       
   486 	        The new gain.
       
   487 
       
   488 	@return One of the system-wide error codes.
       
   489 
       
   490 	@since 7.0s
       
   491 	*/
       
   492 	IMPORT_C TInt SetGain(TInt aGain) const;
       
   493 
       
   494 	/**
       
   495 	Gets the maximum gain supported by the sound device.
       
   496 
       
   497 	@param  aMaxGain
       
   498 	        The maximum gain, filled in by the controller.
       
   499 
       
   500 	@return One of the system-wide error codes.
       
   501 
       
   502 	@since 7.0s
       
   503 	*/
       
   504 	IMPORT_C TInt GetMaxGain(TInt& aMaxGain) const;
       
   505 
       
   506 	/**
       
   507 	Gets the current recording gain.
       
   508 
       
   509 	@param  aGain
       
   510 	        The gain, filled in by the controller.
       
   511 
       
   512 	@return One of the system-wide error codes.
       
   513 
       
   514 	@since  7.0s
       
   515 	*/
       
   516 	IMPORT_C TInt GetGain(TInt& aGain) const;
       
   517 
       
   518 	/**
       
   519 	Sets the balance between the left and right stereo microphone channels.
       
   520 
       
   521 	@param  aBalance
       
   522 	        Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be 
       
   523 	        restored by using KMMFBalanceCenter.
       
   524 
       
   525 	@return One of the system-wide error codes.
       
   526 
       
   527 	@since 7.0s
       
   528 	*/
       
   529 	IMPORT_C TInt SetBalance(TInt aBalance) const;
       
   530 
       
   531 	/**
       
   532 	Gets the balance between the left and right stereo microphone channels.
       
   533 
       
   534 	@param  aBalance
       
   535 	        The current balance, filled in by the controller.
       
   536 
       
   537 	@return One of the system-wide error codes.
       
   538 
       
   539 	@since  7.0s
       
   540 	*/
       
   541 	IMPORT_C TInt GetBalance(TInt& aBalance) const;
       
   542 	};
       
   543 
       
   544 /**
       
   545 @publishedAll
       
   546 @released
       
   547 
       
   548 Mixin class to be derived from controller plugins that could support the audio record device
       
   549 custom commands.
       
   550 */
       
   551 class MMMFAudioRecordDeviceCustomCommandImplementor
       
   552 	{
       
   553 public:
       
   554 
       
   555 	/**
       
   556 	Sets the gain of the sound device.
       
   557 
       
   558 	This function can leave with one of the system-wide error codes. The request will be
       
   559 	completed with the leave code.
       
   560 
       
   561 	@param  aGain
       
   562 	        The new gain.
       
   563 
       
   564 	@since 7.0s
       
   565 	*/
       
   566 	virtual void MardSetGainL(TInt aGain) = 0;
       
   567 
       
   568 	/**
       
   569 	Gets the maximum gain supported by the sound device.
       
   570 
       
   571 	This function can leave with one of the system-wide error codes. The request will be
       
   572 	completed with the leave code.
       
   573 
       
   574 	@param  aMaxGain
       
   575 	        The maximum gain, to be filled in by the controller plugin.
       
   576 
       
   577 	@since 7.0s
       
   578 	*/
       
   579 	virtual void MardGetMaxGainL(TInt& aMaxGain) = 0;
       
   580 
       
   581 	/**
       
   582 	Gets the current recording gain.
       
   583 
       
   584 	This function can leave with one of the system-wide error codes. The request will be
       
   585 	completed with the leave code.
       
   586 
       
   587 	@param  aGain
       
   588 	        The gain, to be filled in by the controller.
       
   589 
       
   590 	@since 7.0s
       
   591 	*/
       
   592 	virtual void MardGetGainL(TInt& aGain) = 0;
       
   593 
       
   594 	/**
       
   595 	Sets the balance between the left and right stereo microphone channels.
       
   596 
       
   597 	This function can leave with one of the system-wide error codes. The request will be
       
   598 	completed with the leave code.
       
   599 
       
   600 	@param  aBalance
       
   601 	        Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be
       
   602 	        restored by using KMMFBalanceCenter.
       
   603 
       
   604 	@since 7.0s
       
   605 	*/
       
   606 	virtual void MardSetBalanceL(TInt aBalance) = 0;
       
   607 
       
   608 	/**
       
   609 	Gets the balance between the left and right stereo microphone channels.
       
   610 
       
   611 	This function can leave with one of the system-wide error codes. The request will be
       
   612 	completed with the leave code.
       
   613 
       
   614 	@param  aBalance
       
   615 	        The current balance, filled in by the controller.
       
   616 
       
   617 	@since 7.0s
       
   618 	*/
       
   619 	virtual void MardGetBalanceL(TInt& aBalance) = 0;
       
   620 	};
       
   621 
       
   622 /**
       
   623 @publishedAll
       
   624 @released
       
   625 
       
   626 Custom command parser class to be used by controller plugins wishing to support
       
   627 audio record device commands.
       
   628 
       
   629 The controller plugin must be derived from MMMFAudioRecordDeviceCustomCommandImplementor
       
   630 to use this class.
       
   631 
       
   632 The controller plugin should create an object of this type and add it to the list of custom
       
   633 command parsers in the controller framework.  See the following example code for details.
       
   634 
       
   635 @code
       
   636 void CMMFAudioController::ConstructL()
       
   637 	{
       
   638 	// Construct custom command parsers
       
   639 	CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
       
   640 	CleanupStack::PushL(audPlayDevParser);
       
   641 	AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
       
   642 	CleanupStack::Pop();//audPlayDevParser
       
   643 
       
   644 	CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
       
   645 	CleanupStack::PushL(audRecDevParser);
       
   646 	AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
       
   647 	CleanupStack::Pop();//audRecDevParser
       
   648 
       
   649 etc.
       
   650 	}
       
   651 @endcode
       
   652 
       
   653 @since 7.0s
       
   654 */
       
   655 class CMMFAudioRecordDeviceCustomCommandParser : public CMMFCustomCommandParserBase
       
   656 	{
       
   657 public:
       
   658 
       
   659 	/**
       
   660 	Creates a new custom command parser capable of handling audio record device commands.
       
   661 
       
   662 	This function may leave with one of the system-wide error codes.
       
   663 
       
   664 	@param  aImplementor
       
   665 	        A reference to the controller plugin that owns this new object.
       
   666 
       
   667 	@return A pointer to the object created.
       
   668 
       
   669 	@since	7.0s
       
   670 	*/
       
   671 	IMPORT_C static CMMFAudioRecordDeviceCustomCommandParser* NewL(MMMFAudioRecordDeviceCustomCommandImplementor& aImplementor);
       
   672 
       
   673 	/**
       
   674 	Destructor.
       
   675 
       
   676 	@since  7.0s
       
   677 	*/
       
   678 	IMPORT_C ~CMMFAudioRecordDeviceCustomCommandParser();
       
   679 
       
   680 	/**
       
   681 	Handles a request from the client. Called by the controller framework.
       
   682 
       
   683 	@param  aMessage
       
   684 	        The message to be handled.
       
   685 
       
   686 	@since	7.0s
       
   687 	*/
       
   688 	void HandleRequest(TMMFMessage& aMessage);
       
   689 private:
       
   690 
       
   691 	/**
       
   692 	Constructor.
       
   693 
       
   694 	@param  aImplementor
       
   695 	        A reference to the controller plugin that owns this new object.
       
   696 
       
   697 	@since	7.0s
       
   698 	*/
       
   699 	CMMFAudioRecordDeviceCustomCommandParser(MMMFAudioRecordDeviceCustomCommandImplementor& aImplementor);
       
   700 	// Internal request handling methods.
       
   701 	void DoHandleRequestL(TMMFMessage& aMessage);
       
   702 	TBool DoSetGainL(TMMFMessage& aMessage);
       
   703 	TBool DoGetMaxGainL(TMMFMessage& aMessage);
       
   704 	TBool DoGetGainL(TMMFMessage& aMessage);
       
   705 	TBool DoSetBalanceL(TMMFMessage& aMessage);
       
   706 	TBool DoGetBalanceL(TMMFMessage& aMessage);
       
   707 private:
       
   708 	/** The object that implements the audio record device interface */
       
   709 	MMMFAudioRecordDeviceCustomCommandImplementor& iImplementor;
       
   710 	};
       
   711 
       
   712 
       
   713 /**
       
   714 @publishedAll
       
   715 @released
       
   716 
       
   717 Client class to access functionality specific to an audio play controller.
       
   718 
       
   719 The class uses the custom command function of the controller plugin, and removes the necessity
       
   720 for the client to formulate the custom commands.
       
   721 
       
   722 @since 7.0s
       
   723 */
       
   724 class RMMFAudioPlayControllerCustomCommands : public RMMFCustomCommandsBase
       
   725 	{
       
   726 public:
       
   727 	
       
   728 	/**
       
   729 	Constructor.
       
   730 
       
   731 	@param  aController
       
   732 	        The client side controller object to be used by this custom command interface.
       
   733 
       
   734 	@since  7.0s
       
   735 	*/
       
   736 	IMPORT_C RMMFAudioPlayControllerCustomCommands(RMMFController& aController);
       
   737 
       
   738 	/**
       
   739 	Sets a playback window.  The controller will start playing from the start of the window,
       
   740 	and finish playing at the end of the window.
       
   741 
       
   742 	@param  aStart
       
   743 	        The start of the window, in microseconds.
       
   744 	@param  aEnd
       
   745 	        The end of the window, in microseconds.
       
   746 
       
   747 	@return One of the system-wide error codes.
       
   748 
       
   749 	@since 7.0s
       
   750 	*/
       
   751 	IMPORT_C TInt SetPlaybackWindow(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) const;
       
   752 
       
   753 	/**
       
   754 	Removes a previously defined playback window.
       
   755 
       
   756 	@return One of the system-wide error codes.
       
   757 	@since 7.0s
       
   758 	*/
       
   759 	IMPORT_C TInt DeletePlaybackWindow();
       
   760 
       
   761 	/**
       
   762 	Gets the audio loading progress as a percentage.
       
   763 
       
   764 	@param  aPercentageProgress
       
   765 	        The progress loading the clip, as a percentage.
       
   766 
       
   767 	@return One of the system-wide error codes.
       
   768 
       
   769 	@since 7.0s
       
   770 	*/
       
   771 	IMPORT_C TInt GetLoadingProgress(TInt& aPercentageProgress) const;
       
   772 	};
       
   773 
       
   774 
       
   775 /**
       
   776 @publishedAll
       
   777 @released
       
   778 
       
   779 Mixin class to be derived from controller plugins that could support the audio play controller
       
   780 custom commands.
       
   781 */
       
   782 class MMMFAudioPlayControllerCustomCommandImplementor
       
   783 	{
       
   784 public:
       
   785 
       
   786 	/**
       
   787 	Sets a playback window. The controller will start playing from the start of the window,
       
   788 	and finish playing at the end of the window.
       
   789 
       
   790 	This function can leave with one of the system-wide error codes. The request will be
       
   791 	completed with the leave code.
       
   792 
       
   793 	@param  aStart
       
   794 	        The start of the window, in microseconds.
       
   795 	@param  aEnd
       
   796 	        The end of the window, in microseconds.
       
   797 
       
   798 	@since 7.0s
       
   799 	*/
       
   800 	virtual void MapcSetPlaybackWindowL(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) = 0;
       
   801 
       
   802 	/**
       
   803 	Removes a previously defined playback window.
       
   804 
       
   805 	This function can leave with one of the system-wide error codes. The request will be
       
   806 	completed with the leave code.
       
   807 
       
   808 	@since 7.0s
       
   809 	*/
       
   810 	virtual void MapcDeletePlaybackWindowL() = 0;
       
   811 
       
   812 	/**
       
   813 	Gets the completion status of loading/rebuffering the current audio clip.
       
   814 
       
   815 	This function can leave with one of the system-wide error codes. The request will be
       
   816 	completed with the leave code.
       
   817 
       
   818 	@param  aPercentageComplete
       
   819 	        The status of loading as a percentage completed.
       
   820 
       
   821 	@since 7.0s
       
   822 	*/
       
   823 	virtual void MapcGetLoadingProgressL(TInt& aPercentageComplete) = 0;
       
   824 	};
       
   825 
       
   826 /**
       
   827 @publishedAll
       
   828 @released
       
   829 
       
   830 Custom command parser class to be used by controller plugins wishing to support
       
   831 audio play controller commands.
       
   832 
       
   833 The controller plugin must be derived from MMMFAudioPlayControllerCustomCommandImplementor to use 
       
   834 this class.
       
   835 
       
   836 The controller plugin should create an object of this type and add it to the list of custom
       
   837 command parsers in the controller framework. See the following example code for details.
       
   838 
       
   839 @code
       
   840 void CMMFAudioController::ConstructL()
       
   841 	{
       
   842 	// Construct custom command parsers
       
   843 	CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
       
   844 	CleanupStack::PushL(audPlayDevParser);
       
   845 	AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
       
   846 	CleanupStack::Pop();//audPlayDevParser
       
   847 
       
   848 	CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
       
   849 	CleanupStack::PushL(audRecDevParser);
       
   850 	AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
       
   851 	CleanupStack::Pop();//audRecDevParser
       
   852 
       
   853 etc.
       
   854 	}
       
   855 @endcode
       
   856 
       
   857 @since  7.0s
       
   858 */
       
   859 class CMMFAudioPlayControllerCustomCommandParser : public CMMFCustomCommandParserBase
       
   860 	{
       
   861 public:
       
   862 
       
   863 	/**
       
   864 	Creates a new custom command parser capable of handling audio play controller commands.
       
   865 
       
   866 	@param  aImplementor
       
   867 	        A reference to the controller plugin that owns this new object.
       
   868 
       
   869 	@return A pointer to the object created.
       
   870 
       
   871 	@since	7.0s
       
   872 	*/
       
   873 	IMPORT_C static CMMFAudioPlayControllerCustomCommandParser* NewL(MMMFAudioPlayControllerCustomCommandImplementor& aImplementor);
       
   874 
       
   875 	/**
       
   876 	Destructor.
       
   877 
       
   878 	@since 7.0s
       
   879 	*/
       
   880 	IMPORT_C ~CMMFAudioPlayControllerCustomCommandParser();
       
   881 
       
   882 	/**
       
   883 	Handles a request from the client. Called by the controller framework.
       
   884 
       
   885 	@param  aMessage
       
   886 	        The message to be handled.
       
   887 
       
   888 	@since  7.0s
       
   889 	*/
       
   890 	void HandleRequest(TMMFMessage& aMessage);
       
   891 private:
       
   892 
       
   893 	/**
       
   894 	Constructor.
       
   895 
       
   896 	@param  aImplementor
       
   897 	        A reference to the controller plugin that owns this new object.
       
   898 
       
   899 	@since	7.0s
       
   900 	*/
       
   901 	CMMFAudioPlayControllerCustomCommandParser(MMMFAudioPlayControllerCustomCommandImplementor& aImplementor);
       
   902 	// Internal request handling methods.
       
   903 	void DoHandleRequestL(TMMFMessage& aMessage);
       
   904 	TBool DoSetPlaybackWindowL(TMMFMessage& aMessage);
       
   905 	TBool DoDeletePlaybackWindowL(TMMFMessage& aMessage);
       
   906 	TBool DoGetLoadingProgressL(TMMFMessage& aMessage);
       
   907 private:
       
   908 	/** 
       
   909 	The object that implements the audio play controller interface 
       
   910 	*/
       
   911 	MMMFAudioPlayControllerCustomCommandImplementor& iImplementor;
       
   912 	};
       
   913 
       
   914 
       
   915 
       
   916 
       
   917 /**
       
   918 @publishedAll
       
   919 @released
       
   920 
       
   921 Client class to access functionality specific to an audio record controller.
       
   922 
       
   923 The class uses the custom command function of the controller plugin, and removes the necessity
       
   924 for the client to formulate the custom commands.
       
   925 
       
   926 @since  7.0s
       
   927 */
       
   928 class RMMFAudioRecordControllerCustomCommands : public RMMFCustomCommandsBase
       
   929 	{
       
   930 public:
       
   931 
       
   932 	/**
       
   933 	Constructor.
       
   934 
       
   935 	@param  aController
       
   936 	        The client side controller object to be used by this custom command	interface.
       
   937 
       
   938 	@since  7.0s
       
   939 	*/
       
   940 	IMPORT_C RMMFAudioRecordControllerCustomCommands(RMMFController& aController);
       
   941 
       
   942 	/**
       
   943 	Gets the (possibly estimated) record time left in the clip.
       
   944 
       
   945 	@param  aTime
       
   946 	        The record time available, in microseconds.
       
   947 
       
   948 	@return One of the system-wide error codes.
       
   949 
       
   950 	@since 7.0s
       
   951 	*/
       
   952 	IMPORT_C TInt GetRecordTimeAvailable(TTimeIntervalMicroSeconds& aTime) const;
       
   953 
       
   954 	/**
       
   955 	Sets the maximum duration of the recorded clip, in microseconds.
       
   956 
       
   957 	@param  aMaxDuration
       
   958 	        The maximum duration of the recorded clip, in microseconds.
       
   959 
       
   960 	@return One of the system-wide error codes.
       
   961 
       
   962 	@since 7.0s
       
   963 	*/
       
   964 	IMPORT_C TInt SetMaxDuration(const TTimeIntervalMicroSeconds& aMaxDuration) const;
       
   965 
       
   966 	/**
       
   967 	Sets the maximum size of the recorded clip, in bytes.
       
   968 
       
   969 	@param  aMaxSize
       
   970 	        The maximum size of the recorded clip, in bytes.
       
   971 
       
   972 	@return One of the system-wide error codes.
       
   973 
       
   974 	@since 7.0s
       
   975 	*/
       
   976 	IMPORT_C TInt SetMaxFileSize(TInt aMaxSize) const;
       
   977 
       
   978 	/**
       
   979 	Removes a portion from the clip, either from the current position to the beginning or the 
       
   980 	current position to the end.
       
   981 
       
   982 	@param  aToEnd
       
   983 	        A boolean indicating whether to crop to the end. Crops to the end if set to ETrue, to 
       
   984 			the beginning set to EFalse.
       
   985 
       
   986 	@return One of the system-wide error codes.
       
   987 
       
   988 	@since  7.0s
       
   989 	*/
       
   990 	IMPORT_C TInt Crop(TBool aToEnd);
       
   991 
       
   992 	/**
       
   993 	Adds meta data to the clip.
       
   994 
       
   995 	@param  aNewEntry
       
   996 	        The details of the new entry to be added.
       
   997 
       
   998 	@since 7.0s
       
   999 	*/
       
  1000 	IMPORT_C void AddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry);
       
  1001 
       
  1002 	/**
       
  1003 	Removes a meta data entry from the clip.
       
  1004 
       
  1005 	@param  aIndex
       
  1006 	        The ID of the meta data entry to delete.
       
  1007 
       
  1008 	@return One of the system-wide error codes.
       
  1009 
       
  1010 	@since  7.0s
       
  1011 	*/
       
  1012 	IMPORT_C TInt RemoveMetaDataEntry(TInt aIndex);
       
  1013 
       
  1014 	/**
       
  1015 	Replaces a meta data in the clip.
       
  1016 
       
  1017 	@param  aIndex
       
  1018 	        The ID of the meta data entry to replace.
       
  1019 	@param  aNewEntry
       
  1020 	        The details of the new entry to be added.
       
  1021 
       
  1022 	@since 7.0s
       
  1023 	*/
       
  1024 	IMPORT_C void ReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry);
       
  1025 	};
       
  1026 
       
  1027 /**
       
  1028 @publishedAll
       
  1029 @released
       
  1030 
       
  1031 Mixin class to be derived from controller plugins that could support the audio record controller
       
  1032 custom commands.
       
  1033 */
       
  1034 class MMMFAudioRecordControllerCustomCommandImplementor
       
  1035 	{
       
  1036 public:
       
  1037 
       
  1038 	/**
       
  1039 	Gets the (possibly estimated) record time left in the clip.
       
  1040 
       
  1041 	This function can leave with one of the system-wide error codes. The request will be
       
  1042 	completed with the leave code.
       
  1043 
       
  1044 	@param  aTime
       
  1045 	        The record time available, in microseconds.
       
  1046 
       
  1047 	@since 7.0s
       
  1048 	*/
       
  1049 	virtual void MarcGetRecordTimeAvailableL(TTimeIntervalMicroSeconds& aTime) = 0;
       
  1050 
       
  1051 	/**
       
  1052 	Sets the maximum duration of the recorded clip, in microseconds.
       
  1053 
       
  1054 	This function can leave with one of the system-wide error codes. The request will be
       
  1055 	completed with the leave code.
       
  1056 
       
  1057 	@param  aMaxDuration
       
  1058 	        The maximum duration of the recorded clip, in microseconds.
       
  1059 
       
  1060 	@since 7.0s
       
  1061 	*/
       
  1062 	virtual void MarcSetMaxDurationL(const TTimeIntervalMicroSeconds& aMaxDuration) = 0;
       
  1063 
       
  1064 	/**
       
  1065 	Sets the maximum size of the recorded clip, in bytes.
       
  1066 
       
  1067 	This function can leave with one of the system-wide error codes. The request will be
       
  1068 	completed with the leave code.
       
  1069 
       
  1070 	@param  aMaxSize
       
  1071 	        The maximum size of the recorded clip, in bytes.
       
  1072 
       
  1073 	@since 7.0s
       
  1074 	*/
       
  1075 	virtual void MarcSetMaxFileSizeL(TInt aMaxSize) = 0;
       
  1076 
       
  1077 	/**
       
  1078 	Removes a portion from the clip, either from the current position to the beginning
       
  1079 	or the current position to the end.
       
  1080 
       
  1081 	This function can leave with one of the system-wide error codes. The request will be
       
  1082 	completed with the leave code.
       
  1083 
       
  1084 	@param  aToEnd
       
  1085 	        A boolean indicating whether to crop to the end or the beginning. ETrue to crop to the
       
  1086 	        end, EFalse to the beginning.
       
  1087 
       
  1088 	@since 7.0s
       
  1089 	*/
       
  1090 	virtual void MarcCropL(TBool aToEnd) = 0;
       
  1091 
       
  1092 	/**
       
  1093 	Adds meta data to the clip.
       
  1094 
       
  1095 	@param  aNewEntry
       
  1096 	        The details of the new entry to be added.
       
  1097 
       
  1098 	@since 7.0s
       
  1099 	*/
       
  1100 	virtual void MarcAddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry) = 0;
       
  1101 
       
  1102 	/**
       
  1103 	Removes a meta data entry from the clip.
       
  1104 
       
  1105 	@param  aIndex
       
  1106 	        The ID of the meta data entry to delete.
       
  1107 
       
  1108 	@since 7.0s
       
  1109 	*/
       
  1110 	virtual void MarcRemoveMetaDataEntryL(TInt aIndex) = 0;
       
  1111 
       
  1112 	/**
       
  1113 	Replaces a meta data entry in the clip.
       
  1114 
       
  1115 	@param  aIndex
       
  1116 	        The ID of the meta data entry to replace.
       
  1117 	@param  aNewEntry
       
  1118 	        The details of the new entry to be added.
       
  1119 
       
  1120 	@since 7.0s
       
  1121 	*/
       
  1122 	virtual void MarcReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry) = 0;
       
  1123 	};
       
  1124 
       
  1125 /**
       
  1126 @publishedAll
       
  1127 @released
       
  1128 
       
  1129 Custom command parser class to be used by controller plugins wishing to support
       
  1130 audio record controller commands.
       
  1131 
       
  1132 The controller plugin must be derived from MMMFAudioRecordControllerCustomCommandImplementor
       
  1133 to use this class.
       
  1134 
       
  1135 The controller plugin should create an object of this type and add it to the list of custom
       
  1136 command parsers in the controller framework.  See the following example code for details.
       
  1137 
       
  1138 @code
       
  1139 void CMMFAudioController::ConstructL()
       
  1140 	{
       
  1141 	// Construct custom command parsers
       
  1142 	CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
       
  1143 	CleanupStack::PushL(audPlayDevParser);
       
  1144 	AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
       
  1145 	CleanupStack::Pop();//audPlayDevParser
       
  1146 
       
  1147 	CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
       
  1148 	CleanupStack::PushL(audRecDevParser);
       
  1149 	AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
       
  1150 	CleanupStack::Pop();//audRecDevParser
       
  1151 
       
  1152 etc.
       
  1153 	}
       
  1154 @endcode
       
  1155 
       
  1156 @since 7.0s
       
  1157 */
       
  1158 class CMMFAudioRecordControllerCustomCommandParser : public CMMFCustomCommandParserBase
       
  1159 	{
       
  1160 public:
       
  1161 
       
  1162 	/**
       
  1163 	Creates a new custom command parser capable of handling audio record controller commands.
       
  1164 
       
  1165 	@param  aImplementor
       
  1166 	        A reference to the controller plugin that owns this new object.
       
  1167 
       
  1168 	@return A pointer to the object created.
       
  1169 
       
  1170 	@since  7.0s
       
  1171 	*/
       
  1172 	IMPORT_C static CMMFAudioRecordControllerCustomCommandParser* NewL(MMMFAudioRecordControllerCustomCommandImplementor& aImplementor);
       
  1173 
       
  1174 	/**
       
  1175 	Destructor.
       
  1176 
       
  1177 	@since  7.0s
       
  1178 	*/
       
  1179 	IMPORT_C ~CMMFAudioRecordControllerCustomCommandParser();
       
  1180 
       
  1181 	/**
       
  1182 	Handles a request from the client. Called by the controller framework.
       
  1183 	
       
  1184 	@param  aMessage
       
  1185 	        The message to be handled.
       
  1186 
       
  1187 	@since	7.0s
       
  1188 	*/
       
  1189 	void HandleRequest(TMMFMessage& aMessage);
       
  1190 private:
       
  1191 
       
  1192 	/**
       
  1193 	Constructor.
       
  1194 
       
  1195 	@param  aImplementor
       
  1196 	        A reference to the controller plugin that owns this new object.
       
  1197 
       
  1198 	@since  7.0s
       
  1199 	*/
       
  1200 	CMMFAudioRecordControllerCustomCommandParser(MMMFAudioRecordControllerCustomCommandImplementor& aImplementor);
       
  1201 	// Internal request handling methods.
       
  1202 	void DoHandleRequestL(TMMFMessage& aMessage);
       
  1203 	TBool DoGetRecordTimeAvailableL(TMMFMessage& aMessage);
       
  1204 	TBool DoSetMaxDurationL(TMMFMessage& aMessage);
       
  1205 	TBool DoSetMaxFileSizeL(TMMFMessage& aMessage);
       
  1206 	TBool DoCropL(TMMFMessage& aMessage);
       
  1207 	TBool DoAddMetaDataEntryL(TMMFMessage& aMessage);
       
  1208 	TBool DoRemoveMetaDataEntryL(TMMFMessage& aMessage);
       
  1209 	TBool DoReplaceMetaDataEntryL(TMMFMessage& aMessage);
       
  1210 private:
       
  1211 	/**	
       
  1212 	The object that implements the audio record controller interface.
       
  1213 	*/
       
  1214 	MMMFAudioRecordControllerCustomCommandImplementor& iImplementor;
       
  1215 	};
       
  1216 
       
  1217 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
       
  1218 #include <mmf/common/mmfstandardcustomcommandsenums.h>
       
  1219 #include <mmf/common/mmfstandardcustomcommandsimpl.h>
       
  1220 #endif
       
  1221 
       
  1222 /**
       
  1223 @publishedAll
       
  1224 @released
       
  1225 */
       
  1226 
       
  1227 	enum TMMFAudioControllerMessages
       
  1228 		{
       
  1229 		EMMFAudioControllerSetSourceSampleRate,
       
  1230 		EMMFAudioControllerSetSourceNumChannels,
       
  1231 		EMMFAudioControllerSetSourceFormat,
       
  1232 		EMMFAudioControllerSetSourceBitRate,
       
  1233 		EMMFAudioControllerSetSourceDataType,
       
  1234 		EMMFAudioControllerSetSinkSampleRate,
       
  1235 		EMMFAudioControllerSetSinkNumChannels,
       
  1236 		EMMFAudioControllerSetSinkFormat,
       
  1237 		EMMFAudioControllerSetSinkBitRate,
       
  1238 		EMMFAudioControllerSetSinkDataType,
       
  1239 		EMMFAudioControllerGetSourceSampleRate,
       
  1240 		EMMFAudioControllerGetSourceBitRate,
       
  1241 		EMMFAudioControllerGetSourceNumChannels,
       
  1242 		EMMFAudioControllerGetSourceFormat,
       
  1243 		EMMFAudioControllerGetSourceDataType,
       
  1244 		EMMFAudioControllerGetSinkSampleRate,
       
  1245 		EMMFAudioControllerGetSinkBitRate,
       
  1246 		EMMFAudioControllerGetSinkNumChannels,
       
  1247 		EMMFAudioControllerGetSinkFormat,
       
  1248 		EMMFAudioControllerGetSinkDataType,
       
  1249 		EMMFAudioControllerGetSupportedSourceSampleRates,
       
  1250 		EMMFAudioControllerGetSupportedSourceBitRates,
       
  1251 		EMMFAudioControllerGetSupportedSourceNumChannels,
       
  1252 		EMMFAudioControllerGetSupportedSourceDataTypes,
       
  1253 		EMMFAudioControllerGetSupportedSinkSampleRates,
       
  1254 		EMMFAudioControllerGetSupportedSinkBitRates,
       
  1255 		EMMFAudioControllerGetSupportedSinkNumChannels,
       
  1256 		EMMFAudioControllerGetSupportedSinkDataTypes,
       
  1257 		EMMFAudioControllerCopyArrayData,
       
  1258 		EMMFAudioControllerSetCodec
       
  1259 		};
       
  1260 
       
  1261 
       
  1262 /**
       
  1263 @publishedAll
       
  1264 @released
       
  1265 
       
  1266 Client class to access functionality specific to an audio controller.
       
  1267 
       
  1268 The class uses the custom command function of the controller plugin, and removes the necessity
       
  1269 for the client to formulate the custom commands.
       
  1270 
       
  1271 @since  7.0s
       
  1272 */
       
  1273 class RMMFAudioControllerCustomCommands : public RMMFCustomCommandsBase
       
  1274 	{
       
  1275 public:
       
  1276 
       
  1277 	/**
       
  1278 	Constructor.
       
  1279 
       
  1280 	@param  aController
       
  1281 	        The client side controller object to be used by this custom command
       
  1282 	        interface.
       
  1283 
       
  1284 	@since  7.0s
       
  1285 	*/
       
  1286 	IMPORT_C RMMFAudioControllerCustomCommands(RMMFController& aController);
       
  1287 
       
  1288 	/**
       
  1289 	Sets the sample rate of the data source in samples per second.
       
  1290 
       
  1291 	@param  aSampleRate
       
  1292 	        The sample rate, in samples per second.
       
  1293 
       
  1294 	@return One of the system-wide error codes.
       
  1295 
       
  1296 	@since  7.0s
       
  1297 	*/
       
  1298 	IMPORT_C TInt SetSourceSampleRate(TUint aSampleRate) const;
       
  1299 
       
  1300 	/**
       
  1301 	Sets the bit rate of the data source in bits per second.
       
  1302 
       
  1303 	@param  aRate
       
  1304 	        The bit rate, in bits per second.
       
  1305 
       
  1306 	@return One of the system-wide error codes.
       
  1307 
       
  1308 	@since 7.0s
       
  1309 	*/
       
  1310 	IMPORT_C TInt SetSourceBitRate(TUint aRate) const;
       
  1311 
       
  1312 	/**
       
  1313 	Sets the number of channels in the data source.	For example, one channel for mono, two channels 
       
  1314 	for stereo etc.
       
  1315 
       
  1316 	@param  aNumChannels
       
  1317 	        The number of channels.
       
  1318 
       
  1319 	@return One of the system-wide error codes.
       
  1320 
       
  1321 	@since 7.0s
       
  1322 	*/
       
  1323 	IMPORT_C TInt SetSourceNumChannels(TUint aNumChannels) const;
       
  1324 
       
  1325 	/**
       
  1326 	Sets the format of the data source.
       
  1327 
       
  1328 	The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin to be used.
       
  1329 
       
  1330 	@param  aFormatUid
       
  1331 	        The format plugin to be used.
       
  1332 
       
  1333 	@return One of the system-wide error codes.
       
  1334 
       
  1335 	@since  7.0s
       
  1336 	*/
       
  1337 	IMPORT_C TInt SetSourceFormat(TUid aFormatUid) const;
       
  1338 
       
  1339 	/**
       
  1340 	Sets the fourCC code of the source.
       
  1341 
       
  1342 	@param  aDataType
       
  1343 	        The fourCC code.
       
  1344 
       
  1345 	@return One of the system-wide error codes.
       
  1346 
       
  1347 	@since  7.0s
       
  1348 	*/
       
  1349 	IMPORT_C TInt SetSourceDataType(TFourCC aDataType) const;
       
  1350 
       
  1351 	/**
       
  1352 	Sets the sample rate of the data sink in samples per second.
       
  1353 
       
  1354 	@param  aSampleRate
       
  1355 	        The sample rate, in samples per second.
       
  1356 
       
  1357 	@return One of the system-wide error codes.
       
  1358 
       
  1359 	@since 7.0s
       
  1360 	*/
       
  1361 	IMPORT_C TInt SetSinkSampleRate(TUint aSampleRate) const;
       
  1362 
       
  1363 	/**
       
  1364 	Set the bit rate of the data sink in bits per second.
       
  1365 
       
  1366 	@param  aRate
       
  1367 	        The bit rate, in bits per second.
       
  1368 
       
  1369 	@return One of the system-wide error codes.
       
  1370 
       
  1371 	@since 7.0s
       
  1372 	*/
       
  1373 	IMPORT_C TInt SetSinkBitRate(TUint aRate) const;
       
  1374 
       
  1375 	/**
       
  1376 	Sets the number of channels in the data sink. For example, one channel for mono, two channels 
       
  1377 	for stereo etc.
       
  1378 
       
  1379 	@param  aNumChannels
       
  1380 	        The number of channels.
       
  1381 
       
  1382 	@return One of the system-wide error codes.
       
  1383 
       
  1384 	@since  7.0s
       
  1385 	*/
       
  1386 	IMPORT_C TInt SetSinkNumChannels(TUint aNumChannels) const;
       
  1387 
       
  1388 	/**
       
  1389 	Sets the format of the data sink.
       
  1390 
       
  1391 	The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin to be used.
       
  1392 
       
  1393 	@param  aFormatUid
       
  1394 	        The format plugin to be used.
       
  1395 
       
  1396 	@return One of the system-wide error codes.
       
  1397 
       
  1398 	@since  7.0s
       
  1399 	*/
       
  1400 	IMPORT_C TInt SetSinkFormat(TUid aFormatUid) const;
       
  1401 
       
  1402 	/**
       
  1403 	Set the fourCC code of the sink.
       
  1404 
       
  1405 	@param  aDataType
       
  1406 	        The fourCC code.
       
  1407 
       
  1408 	@return One of the system-wide error codes.
       
  1409 
       
  1410 	@since 7.0s
       
  1411 	*/
       
  1412 	IMPORT_C TInt SetSinkDataType(TFourCC aDataType) const;
       
  1413 
       
  1414 	/**
       
  1415 	Sets the codec to be used. Useful when recording data.
       
  1416 
       
  1417 	@param  aSourceDataType
       
  1418 	        The data type of the source of the codec.
       
  1419 	@param  aSinkDataType
       
  1420 	        The data type of the sink of the codec.
       
  1421 
       
  1422 	@return One of the system-wide error codes.
       
  1423 
       
  1424 	@since  7.0s
       
  1425 	*/
       
  1426 	IMPORT_C TInt SetCodec(TFourCC aSourceDataType, TFourCC aSinkDataType) const;
       
  1427 
       
  1428 	/**
       
  1429 	Gets the sample rate of the data source in samples per second.
       
  1430 
       
  1431 	@param  aRate
       
  1432 	        The sample rate, in samples per second.
       
  1433 
       
  1434 	@return One of the system-wide error codes.
       
  1435 
       
  1436 	@since  7.0s
       
  1437 	*/
       
  1438 	IMPORT_C TInt GetSourceSampleRate(TUint& aRate) const;
       
  1439 
       
  1440 	/**
       
  1441 	Gets the bit rate of the data source in bits per second.
       
  1442 
       
  1443 	@param  aRate
       
  1444 	        The bit rate, in bits per second.
       
  1445 	
       
  1446 	@return One of the system-wide error codes.
       
  1447 
       
  1448 	@since  7.0s
       
  1449 	*/
       
  1450 	IMPORT_C TInt GetSourceBitRate(TUint& aRate) const;
       
  1451 
       
  1452 	/**
       
  1453 	Gets the number of channels in the data source. For example, one channel for mono, two channels 
       
  1454 	for stereo etc.
       
  1455 
       
  1456 	@param  aNumChannels
       
  1457 	        The number of channels.
       
  1458 
       
  1459 	@return One of the system-wide error codes.
       
  1460 
       
  1461 	@since  7.0s
       
  1462 	*/
       
  1463 	IMPORT_C TInt GetSourceNumChannels(TUint& aNumChannels) const;
       
  1464 
       
  1465 	/**
       
  1466 	Gets the format of the data source.
       
  1467 
       
  1468 	The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin being used.
       
  1469 
       
  1470 	@param  aFormat
       
  1471 	        The format plugin being used.
       
  1472 
       
  1473 	@return One of the system-wide error codes.
       
  1474 
       
  1475 	@since  7.0s
       
  1476 	*/
       
  1477 	IMPORT_C TInt GetSourceFormat(TUid& aFormat) const;
       
  1478 
       
  1479 	/**
       
  1480 	Get the fourCC code of the source.
       
  1481 
       
  1482 	@param  aDataType
       
  1483 	        The fourCC code.
       
  1484 
       
  1485 	@return One of the system-wide error codes.
       
  1486 
       
  1487 	@since  7.0s
       
  1488 	*/
       
  1489 	IMPORT_C TInt GetSourceDataType(TFourCC& aDataType) const;
       
  1490 
       
  1491 	/**
       
  1492 	Gets the sample rate of the data sink in samples per second.
       
  1493 
       
  1494 	@param  aRate
       
  1495 	        The sample rate, in samples per second.
       
  1496 
       
  1497 	@return One of the system-wide error codes.
       
  1498 
       
  1499 	@since  7.0s
       
  1500 	*/
       
  1501 	IMPORT_C TInt GetSinkSampleRate(TUint& aRate) const;
       
  1502 
       
  1503 	/**
       
  1504 	Gets the bit rate of the data sink in bits per second.
       
  1505 
       
  1506 	@param  aRate
       
  1507 	        The bit rate, in bits per second.
       
  1508 
       
  1509 	@return One of the system-wide error codes.
       
  1510 
       
  1511 	@since  7.0s
       
  1512 	*/
       
  1513 	IMPORT_C TInt GetSinkBitRate(TUint& aRate) const;
       
  1514 
       
  1515 	/**
       
  1516 	Gets the number of channels in the data sink. For example, one channel for mono, two channels 
       
  1517 	for stereo etc.
       
  1518 
       
  1519 	@param  aNumChannels
       
  1520 	        The number of channels.
       
  1521 
       
  1522 	@return One of the system-wide error codes.
       
  1523 
       
  1524 	@since  7.0s
       
  1525 	*/
       
  1526 	IMPORT_C TInt GetSinkNumChannels(TUint& aNumChannels) const;
       
  1527 
       
  1528 	/**
       
  1529 	Gets the format of the data sink.
       
  1530 
       
  1531 	The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin being used.
       
  1532 
       
  1533 	@param  aFormat
       
  1534 	        The format plugin being used.
       
  1535 
       
  1536 	@return One of the system-wide error codes.
       
  1537 
       
  1538 	@since  7.0s
       
  1539 	*/
       
  1540 	IMPORT_C TInt GetSinkFormat(TUid& aFormat) const;
       
  1541 
       
  1542 	/**
       
  1543 	Gets the fourCC code of the sink.
       
  1544 
       
  1545 	@param  aDataType
       
  1546 	        The fourCC code.
       
  1547 
       
  1548 	@return One of the system-wide error codes.
       
  1549 
       
  1550 	@since 7.0s
       
  1551 	*/
       
  1552 	IMPORT_C TInt GetSinkDataType(TFourCC& aDataType) const;
       
  1553 
       
  1554 	/**
       
  1555 	Gets the list of sample rates supported by the data source.
       
  1556 
       
  1557 	Warning: Existing objects in this array will be removed by this function.
       
  1558 
       
  1559 	@param  aSupportedRates
       
  1560 	        The supported rates.
       
  1561 
       
  1562 	@return One of the system-wide error codes.
       
  1563 
       
  1564 	@since  7.0s
       
  1565 	*/
       
  1566 	IMPORT_C void GetSupportedSourceSampleRatesL(RArray<TUint>& aSupportedRates) const;
       
  1567 
       
  1568 	/**
       
  1569 	Gets the list of bit rates supported by the data source.
       
  1570 
       
  1571 	Warning: Existing objects in this array will be removed by this function.
       
  1572 
       
  1573 	@param  aSupportedRates
       
  1574 	        The supported rates.
       
  1575 
       
  1576 	@return One of the system-wide error codes.
       
  1577 
       
  1578 	@since 7.0s
       
  1579 	*/
       
  1580 	IMPORT_C void GetSupportedSourceBitRatesL(RArray<TUint>& aSupportedRates) const;
       
  1581 
       
  1582 	/**
       
  1583 	Gets the list of channels supported by the data source (ie mono, stereo etc).
       
  1584 
       
  1585 	Warning: Existing objects in this array will be removed by this method.
       
  1586 
       
  1587 	@param  aSupportedChannels
       
  1588 	        The supported channels.
       
  1589 
       
  1590 	@return One of the system-wide error codes.
       
  1591 
       
  1592 	@since 7.0s
       
  1593 	*/
       
  1594 	IMPORT_C void GetSupportedSourceNumChannelsL(RArray<TUint>& aSupportedChannels) const;
       
  1595 
       
  1596 	/**
       
  1597 	Gets the list of fourCC codes supported by the data source.
       
  1598 
       
  1599 	Warning: Existing objects in this array will be removed by this method.
       
  1600 
       
  1601 	@param  aSupportedDataTypes
       
  1602 	        The supported data types.
       
  1603 
       
  1604 	@return One of the system-wide error codes.
       
  1605 
       
  1606 	@since  7.0s
       
  1607 	*/
       
  1608 	IMPORT_C void GetSupportedSourceDataTypesL(RArray<TFourCC>& aSupportedDataTypes) const;
       
  1609 
       
  1610 	/**
       
  1611 	Gets the list of sample rates supported by the data sink.
       
  1612 
       
  1613 	Warning: Existing objects in this array will be removed by this method.
       
  1614 
       
  1615 	@param  aSupportedRates
       
  1616 	        The supported rates.
       
  1617 
       
  1618 	@return One of the system-wide error codes.
       
  1619 
       
  1620 	@since  7.0s
       
  1621 	*/
       
  1622 	IMPORT_C void GetSupportedSinkSampleRatesL(RArray<TUint>& aSupportedRates) const;
       
  1623 
       
  1624 	/**
       
  1625 	Gets the list of bit rates supported by the data sink.
       
  1626 
       
  1627 	Warning: Existing objects in this array will be removed by this method.
       
  1628 
       
  1629 	@param  aSupportedRates
       
  1630 	        The supported rates.
       
  1631 
       
  1632 	@return One of the system-wide error codes.
       
  1633 
       
  1634 	@since  7.0s
       
  1635 	*/
       
  1636 	IMPORT_C void GetSupportedSinkBitRatesL(RArray<TUint>& aSupportedRates) const;
       
  1637 
       
  1638 	/**
       
  1639 	Gets the list of channels supported by the data sink (ie mono, stereo etc).
       
  1640 
       
  1641 	Warning: Existing objects in this array will be removed by this method.
       
  1642 
       
  1643 	@param  aSupportedChannels
       
  1644 	        The supported channels.
       
  1645 
       
  1646 	@return One of the system-wide error codes.
       
  1647 
       
  1648 	@since  7.0s
       
  1649 	*/
       
  1650 	IMPORT_C void GetSupportedSinkNumChannelsL(RArray<TUint>& aSupportedChannels) const;
       
  1651 
       
  1652 	/**
       
  1653 	Gets the list of fourCC codes supported by the data sink.
       
  1654 
       
  1655 	Warning: Existing objects in this array will be removed by this method.
       
  1656 
       
  1657 	@param  aSupportedDataTypes
       
  1658 	        The supported data types.
       
  1659 
       
  1660 	@return One of the system-wide error codes.
       
  1661 
       
  1662 	@since  7.0s
       
  1663 	*/
       
  1664 	IMPORT_C void GetSupportedSinkDataTypesL(RArray<TFourCC>& aSupportedDataTypes) const;
       
  1665 
       
  1666 private:
       
  1667 	void DoGetUintArrayL(RArray<TUint>& aArray, TMMFAudioControllerMessages aIpc) const;
       
  1668 	void DoGetFourCCArrayL(RArray<TFourCC>& aArray, TMMFAudioControllerMessages aIpc) const;
       
  1669 	};
       
  1670 
       
  1671 
       
  1672 /**
       
  1673 @publishedAll
       
  1674 @released
       
  1675 
       
  1676 Mixin class to be derived from controller plugins that could support the audio record controller
       
  1677 custom commands.
       
  1678 */
       
  1679 class MMMFAudioControllerCustomCommandImplementor
       
  1680 	{
       
  1681 public:
       
  1682 
       
  1683 	/**
       
  1684 	Sets the sample rate of the data source in samples per second.
       
  1685 
       
  1686 	@param  aSampleRate
       
  1687 	        The sample rate, in samples per second.
       
  1688 
       
  1689 	@since 7.0s
       
  1690 	*/
       
  1691 	virtual void MacSetSourceSampleRateL(TUint aSampleRate) = 0;
       
  1692 
       
  1693 	/**
       
  1694 	Sets the bit rate of the data source in bits per second.
       
  1695 
       
  1696 	@param  aBitRate
       
  1697 	        The bit rate, in bits per second.
       
  1698 
       
  1699 	@since  7.0s
       
  1700 	*/
       
  1701 	virtual void MacSetSourceBitRateL(TUint aBitRate) = 0;
       
  1702 
       
  1703 	/**
       
  1704 	Sets the number of channels in the data source.	For example, one channel for mono, two channels 
       
  1705 	for stereo etc.
       
  1706 
       
  1707 	@param  aNumChannels
       
  1708 	        The number of channels.
       
  1709 
       
  1710 	@since  7.0s
       
  1711 	*/
       
  1712 	virtual void MacSetSourceNumChannelsL(TUint aNumChannels) = 0;
       
  1713 
       
  1714 	/**
       
  1715 	Sets the format of the data source.	The UID corresponds to the UID of the CMMFFormat-derived 
       
  1716 	ECOM plugin to be used.
       
  1717 
       
  1718 	@param  aFormatUid
       
  1719 	        The format plugin to be used.
       
  1720 
       
  1721 	@since 7.0s
       
  1722 	*/
       
  1723 	virtual void MacSetSourceFormatL(TUid aFormatUid) = 0;
       
  1724 
       
  1725 	/**
       
  1726 	Sets the fourCC code of the source.
       
  1727 
       
  1728 	@param  aDataType
       
  1729 	        The fourCC code.
       
  1730 
       
  1731 	@since 7.0s
       
  1732 	*/
       
  1733 	virtual void MacSetSourceDataTypeL(TFourCC aDataType) = 0;
       
  1734 
       
  1735 	/**
       
  1736 	Sets the sample rate of the data sink in samples per second.
       
  1737 
       
  1738 	@param  aSampleRate
       
  1739 	        The sample rate, in samples per second.
       
  1740 
       
  1741 	@since  7.0s
       
  1742 	*/
       
  1743 	virtual void MacSetSinkSampleRateL(TUint aSampleRate) = 0;
       
  1744 
       
  1745 	/**
       
  1746 	Sets the bit rate of the data sink in bits per second.
       
  1747 
       
  1748 	@param  aRate
       
  1749 	        The bit rate, in bits per second.
       
  1750 
       
  1751 	@since  7.0s
       
  1752 	*/
       
  1753 	virtual void MacSetSinkBitRateL(TUint aRate) = 0;
       
  1754 
       
  1755 	/**
       
  1756 	Sets the number of channels in the data sink. For example, one channel for mono, two channels 
       
  1757 	for stereo etc.
       
  1758 
       
  1759 	@param  aNumChannels
       
  1760 	        The number of channels.
       
  1761 
       
  1762 	@since  7.0s
       
  1763 	*/
       
  1764 	virtual void MacSetSinkNumChannelsL(TUint aNumChannels) = 0;
       
  1765 
       
  1766 	/**
       
  1767 	Sets the format of the data sink. The UID corresponds to the uid of the CMMFFormat-derived ECOM 
       
  1768 	plugin to be used.
       
  1769 
       
  1770 	@param  aFormatUid
       
  1771 	        The format plugin to be used.
       
  1772 
       
  1773 	@since  7.0s
       
  1774 	*/
       
  1775 	virtual void MacSetSinkFormatL(TUid aFormatUid) = 0;
       
  1776 
       
  1777 	/**
       
  1778 	Sets the fourCC code of the sink.
       
  1779 
       
  1780 	@param  aDataType
       
  1781 	        The fourCC code.
       
  1782 
       
  1783 	@since  7.0s
       
  1784 	*/
       
  1785 	virtual void MacSetSinkDataTypeL(TFourCC aDataType) = 0;
       
  1786 
       
  1787 	/**
       
  1788 	Sets the codec to be used.  Useful when recording data.
       
  1789 
       
  1790 	@param  aSourceDataType
       
  1791 	        The data type of the source of the codec.
       
  1792 	@param  aSinkDataType
       
  1793 	        The data type of the sink of the codec.
       
  1794 
       
  1795 	@since  7.0s
       
  1796 	*/
       
  1797 	virtual void MacSetCodecL(TFourCC aSourceDataType, TFourCC aSinkDataType) = 0;
       
  1798 
       
  1799 
       
  1800 	/**
       
  1801 	Gets the sample rate of the data source in samples per second.
       
  1802 
       
  1803 	@param  aRate	
       
  1804 	        The sample rate, in samples per second.
       
  1805 
       
  1806 	@since  7.0s
       
  1807 	*/
       
  1808 	virtual void MacGetSourceSampleRateL(TUint& aRate) = 0;
       
  1809 
       
  1810 	/**
       
  1811 	Gets the bit rate of the data source in bits per second.
       
  1812 
       
  1813 	@param  aRate
       
  1814 	        The bit rate, in bits per second.
       
  1815 
       
  1816 	@since  7.0s
       
  1817 	*/
       
  1818 	virtual void MacGetSourceBitRateL(TUint& aRate) = 0;
       
  1819 
       
  1820 	/**
       
  1821 	Gets the number of channels in the data source.	For example, one channel for mono, two channels 
       
  1822 	for stereo etc.
       
  1823 
       
  1824 	@param  aNumChannels
       
  1825 	        The number of channels.
       
  1826 
       
  1827 	@since  7.0s
       
  1828 	*/
       
  1829 	virtual void MacGetSourceNumChannelsL(TUint& aNumChannels) = 0;
       
  1830 
       
  1831 	/**
       
  1832 	Gets the format of the data source.	The UID corresponds to the uid of the CMMFFormat-derived 
       
  1833 	ECOM plugin being used.
       
  1834 
       
  1835 	@param  aFormat
       
  1836 	        The format plugin being used.
       
  1837 
       
  1838 	@since  7.0s
       
  1839 	*/
       
  1840 	virtual void MacGetSourceFormatL(TUid& aFormat) = 0;
       
  1841 
       
  1842 	/**
       
  1843 	Gets the fourCC code of the source.
       
  1844 
       
  1845 	@param  aDataType
       
  1846 	        The fourCC code.
       
  1847 
       
  1848 	@since  7.0s
       
  1849 	*/
       
  1850 	virtual void MacGetSourceDataTypeL(TFourCC& aDataType) = 0;
       
  1851 
       
  1852 	/**
       
  1853 	Gets the sample rate of the data sink in samples per second.
       
  1854 
       
  1855 	@param  aRate
       
  1856 	        The sample rate, in samples per second.
       
  1857 
       
  1858 	@since  7.0s
       
  1859 	*/
       
  1860 	virtual void MacGetSinkSampleRateL(TUint& aRate) = 0;
       
  1861 
       
  1862 	/**
       
  1863 	Gets the bit rate of the data sink in bits per second.
       
  1864 
       
  1865 	@param  aRate
       
  1866 	        The bit rate, in bits per second.
       
  1867 
       
  1868 	@since  7.0s
       
  1869 	*/
       
  1870 	virtual void MacGetSinkBitRateL(TUint& aRate) = 0;
       
  1871 
       
  1872 	/**
       
  1873 	Gets the number of channels in the data sink. For example, one channel for mono, two channels 
       
  1874 	for stereo etc.
       
  1875 
       
  1876 	@param  aNumChannels
       
  1877 	        The number of channels.
       
  1878 
       
  1879 	@since  7.0s
       
  1880 	*/
       
  1881 	virtual void MacGetSinkNumChannelsL(TUint& aNumChannels) = 0;
       
  1882 
       
  1883 	/**
       
  1884 	Gets the format of the data sink. The UID corresponds to the uid of the CMMFFormat-derived ECOM 
       
  1885 	plugin being used.
       
  1886 
       
  1887 	@param  aFormat
       
  1888 	        The format plugin being used.
       
  1889 
       
  1890 	@since  7.0s
       
  1891 	*/
       
  1892 	virtual void MacGetSinkFormatL(TUid& aFormat) = 0;
       
  1893 
       
  1894 	/**
       
  1895 	Gets the fourCC code of the sink.
       
  1896 
       
  1897 	@param  aDataType
       
  1898 	        The fourCC code.
       
  1899 
       
  1900 	@since  7.0s
       
  1901 	*/
       
  1902 	virtual void MacGetSinkDataTypeL(TFourCC& aDataType) = 0;
       
  1903 
       
  1904 	/**
       
  1905 	Gets the list of sample rates supported by the data source.
       
  1906 
       
  1907 	@param  aSupportedRates
       
  1908 	        The supported rates.  Warning: Existing objects in this array will be removed by this method.
       
  1909 
       
  1910 	@since  7.0s
       
  1911 	*/
       
  1912 	virtual void MacGetSupportedSourceSampleRatesL(RArray<TUint>& aSupportedRates) = 0;
       
  1913 
       
  1914 	/**
       
  1915 	Gets the list of bit rates supported by the data source.
       
  1916 
       
  1917 	Warning: Existing objects in this array will be removed by this method.
       
  1918 
       
  1919 	@param  aSupportedRates
       
  1920 	        The supported rates.
       
  1921 
       
  1922 	@since  7.0s
       
  1923 	*/
       
  1924 	virtual void MacGetSupportedSourceBitRatesL(RArray<TUint>& aSupportedRates) = 0;
       
  1925 
       
  1926 	/**
       
  1927 	Gets the list of channels supported by the data source (ie mono, stereo etc).
       
  1928 
       
  1929 	Warning: Existing objects in this array will be removed by this method.
       
  1930 
       
  1931 	@param  aSupportedChannels
       
  1932 	        The supported channels.
       
  1933 
       
  1934 	@since  7.0s
       
  1935 	*/
       
  1936 	virtual void MacGetSupportedSourceNumChannelsL(RArray<TUint>& aSupportedChannels) = 0;
       
  1937 
       
  1938 	/**
       
  1939 	Gets the list of fourCC codes supported by the data source.
       
  1940 
       
  1941 	Warning: Existing objects in this array will be removed by this method.
       
  1942 
       
  1943 	@param  aSupportedDataTypes
       
  1944 	        The supported data types.
       
  1945 
       
  1946 	@since  7.0s
       
  1947 	*/
       
  1948 	virtual void MacGetSupportedSourceDataTypesL(RArray<TFourCC>& aSupportedDataTypes) = 0;
       
  1949 
       
  1950 	/**
       
  1951 	Gets the list of sample rates supported by the data sink.
       
  1952 
       
  1953 	Warning: Existing objects in this array will be removed by this method.
       
  1954 
       
  1955 	@param  aSupportedRates
       
  1956 	        The supported rates.
       
  1957 
       
  1958 	@since  7.0s
       
  1959 	*/
       
  1960 	virtual void MacGetSupportedSinkSampleRatesL(RArray<TUint>& aSupportedRates) = 0;
       
  1961 
       
  1962 	/**
       
  1963 	Gets the list of bit rates supported by the data sink.
       
  1964 
       
  1965 	Warning: Existing objects in this array will be removed by this method.
       
  1966 
       
  1967 	@param  aSupportedRates
       
  1968 	        The supported rates.
       
  1969 
       
  1970 	@since  7.0s
       
  1971 	*/
       
  1972 	virtual void MacGetSupportedSinkBitRatesL(RArray<TUint>& aSupportedRates) = 0;
       
  1973 
       
  1974 	/**
       
  1975 	Gets the list of channels supported by the data sink (ie mono, stereo etc).
       
  1976 
       
  1977 	Warning: Existing objects in this array will be removed by this method.
       
  1978 
       
  1979 	@param  aSupportedChannels
       
  1980 	        The supported channels.
       
  1981 
       
  1982 	@since  7.0s
       
  1983 	*/
       
  1984 	virtual void MacGetSupportedSinkNumChannelsL(RArray<TUint>& aSupportedChannels) = 0;
       
  1985 
       
  1986 	/**
       
  1987 	Gets the list of fourCC codes supported by the data sink.
       
  1988 
       
  1989 	Warning: Existing objects in this array will be removed by this method.
       
  1990 
       
  1991 	@param  aSupportedDataTypes
       
  1992 	        The supported data types.
       
  1993 
       
  1994 	@since  7.0s
       
  1995 	*/
       
  1996 	virtual void MacGetSupportedSinkDataTypesL(RArray<TFourCC>& aSupportedDataTypes) = 0;
       
  1997 	};
       
  1998 
       
  1999 /**
       
  2000 @publishedAll
       
  2001 @released
       
  2002 
       
  2003 Custom command parser class to be used by controller plugins wishing to support
       
  2004 audio controller commands.
       
  2005 
       
  2006 The controller plugin must be derived from MMMFAudioControllerCustomCommandImplementor
       
  2007 to use this class.
       
  2008 
       
  2009 The controller plugin should create an object of this type and add it to the list of custom
       
  2010 command parsers in the controller framework. See the following example code for details.
       
  2011 
       
  2012 @code
       
  2013 void CMMFAudioController::ConstructL()
       
  2014 	{
       
  2015 	// Construct custom command parsers
       
  2016 	CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
       
  2017 	CleanupStack::PushL(audPlayDevParser);
       
  2018 	AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
       
  2019 	CleanupStack::Pop();//audPlayDevParser
       
  2020 
       
  2021 	CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
       
  2022 	CleanupStack::PushL(audRecDevParser);
       
  2023 	AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
       
  2024 	CleanupStack::Pop();//audRecDevParser
       
  2025 
       
  2026 etc.
       
  2027 	}
       
  2028 @endcode
       
  2029 
       
  2030 @since  7.0s
       
  2031 */
       
  2032 class CMMFAudioControllerCustomCommandParser : public CMMFCustomCommandParserBase
       
  2033 	{
       
  2034 public:
       
  2035 
       
  2036 	/**
       
  2037 	Creates a new custom command parser capable of handling audio controller commands.
       
  2038 
       
  2039 	@param  aImplementor
       
  2040 	        A reference to the controller plugin that owns this new object.
       
  2041 
       
  2042 	@return A pointer to the object created.
       
  2043 
       
  2044 	@since  7.0s
       
  2045 	*/
       
  2046 	IMPORT_C static CMMFAudioControllerCustomCommandParser* NewL(MMMFAudioControllerCustomCommandImplementor& aImplementor);
       
  2047 
       
  2048 	/**
       
  2049 	Destructor.
       
  2050 
       
  2051 	@since 7.0s
       
  2052 	*/
       
  2053 	IMPORT_C ~CMMFAudioControllerCustomCommandParser();
       
  2054 
       
  2055 	/**
       
  2056 	Handles a request from the client. Called by the controller framework.
       
  2057 
       
  2058 	@param  aMessage
       
  2059 	        The message to be handled.
       
  2060 
       
  2061 	@since  7.0s
       
  2062 	*/
       
  2063 	void HandleRequest(TMMFMessage& aMessage);
       
  2064 private:
       
  2065 	/**
       
  2066 	Constructor.
       
  2067 
       
  2068 	@param  aImplementor
       
  2069 	        A reference to the controller plugin that owns this new object.
       
  2070 
       
  2071 	@since  7.0s
       
  2072 	*/
       
  2073 	CMMFAudioControllerCustomCommandParser(MMMFAudioControllerCustomCommandImplementor& aImplementor);
       
  2074 	// Internal request handling methods.
       
  2075 	void DoHandleRequestL(TMMFMessage& aMessage);
       
  2076 
       
  2077 	TBool DoSetSourceSampleRateL(TMMFMessage& aMessage);
       
  2078 	TBool DoSetSourceNumChannelsL(TMMFMessage& aMessage);
       
  2079 	TBool DoSetSourceFormatL(TMMFMessage& aMessage);
       
  2080 	TBool DoSetSinkSampleRateL(TMMFMessage& aMessage);
       
  2081 	TBool DoSetSinkNumChannelsL(TMMFMessage& aMessage);
       
  2082 	TBool DoSetSinkFormatL(TMMFMessage& aMessage);
       
  2083 	TBool DoSetCodecL(TMMFMessage& aMessage);
       
  2084 	TBool DoSetSourceBitRateL(TMMFMessage& aMessage);
       
  2085 	TBool DoSetSourceDataTypeL(TMMFMessage& aMessage);
       
  2086 	TBool DoSetSinkBitRateL(TMMFMessage& aMessage);
       
  2087 	TBool DoSetSinkDataTypeL(TMMFMessage& aMessage);
       
  2088 	TBool DoGetSourceSampleRateL(TMMFMessage& aMessage);
       
  2089 	TBool DoGetSourceBitRateL(TMMFMessage& aMessage);
       
  2090 	TBool DoGetSourceNumChannelsL(TMMFMessage& aMessage);
       
  2091 	TBool DoGetSourceFormatL(TMMFMessage& aMessage);
       
  2092 	TBool DoGetSourceDataTypeL(TMMFMessage& aMessage);
       
  2093 	TBool DoGetSinkSampleRateL(TMMFMessage& aMessage);
       
  2094 	TBool DoGetSinkBitRateL(TMMFMessage& aMessage);
       
  2095 	TBool DoGetSinkNumChannelsL(TMMFMessage& aMessage);
       
  2096 	TBool DoGetSinkFormatL(TMMFMessage& aMessage);
       
  2097 	TBool DoGetSinkDataTypeL(TMMFMessage& aMessage);
       
  2098 	TBool DoGetSupportedSourceSampleRatesL(TMMFMessage& aMessage);
       
  2099 	TBool DoGetSupportedSourceBitRatesL(TMMFMessage& aMessage);
       
  2100 	TBool DoGetSupportedSourceNumChannelsL(TMMFMessage& aMessage);
       
  2101 	TBool DoGetSupportedSourceDataTypesL(TMMFMessage& aMessage);
       
  2102 	TBool DoGetSupportedSinkSampleRatesL(TMMFMessage& aMessage);
       
  2103 	TBool DoGetSupportedSinkBitRatesL(TMMFMessage& aMessage);
       
  2104 	TBool DoGetSupportedSinkNumChannelsL(TMMFMessage& aMessage);
       
  2105 	TBool DoGetSupportedSinkDataTypesL(TMMFMessage& aMessage);
       
  2106 	TBool DoCopyArrayDataL(TMMFMessage& aMessage);
       
  2107 
       
  2108 	void DoCreateBufFromUintArrayL(RArray<TUint>& aArray);
       
  2109 	void DoCreateBufFromFourCCArrayL(RArray<TFourCC>& aArray);
       
  2110 private:
       
  2111 	/** 
       
  2112 	The object that implements the audio record controller interface 
       
  2113 	*/
       
  2114 	MMMFAudioControllerCustomCommandImplementor& iImplementor;
       
  2115 
       
  2116 	CBufFlat* iDataCopyBuffer;
       
  2117 	};
       
  2118 
       
  2119 
       
  2120 class RWindow;
       
  2121 
       
  2122 /**
       
  2123 @publishedAll
       
  2124 @released
       
  2125 
       
  2126 Client class to access functionality specific to a video controller.
       
  2127 
       
  2128 The class uses the custom command function of the controller plugin, and removes the necessity
       
  2129 for the client to formulate the custom commands.
       
  2130 
       
  2131 @since  7.0s
       
  2132 */
       
  2133 class RMMFVideoControllerCustomCommands : public RMMFCustomCommandsBase
       
  2134 	{
       
  2135 public:
       
  2136 
       
  2137 	/**
       
  2138 	Constructor.
       
  2139 
       
  2140 	@param  aController
       
  2141 	        The client side controller object to be used by this custom command interface.
       
  2142 
       
  2143 	@since  7.0s
       
  2144 	*/
       
  2145 	IMPORT_C RMMFVideoControllerCustomCommands(RMMFController& aController);
       
  2146 
       
  2147 	/**
       
  2148 	Gets the frame size of the clip.
       
  2149 
       
  2150 	@param  aVideoFrameSize
       
  2151 	        The frame size, in pixels.
       
  2152 
       
  2153 	@return One of the system-wide error codes.
       
  2154 
       
  2155 	@since 7.0s
       
  2156 	*/
       
  2157 	IMPORT_C TInt GetVideoFrameSize(TSize& aVideoFrameSize) const;
       
  2158 
       
  2159 	/**
       
  2160 	Gets the audio type.
       
  2161 
       
  2162 	@param  aCodec
       
  2163 	        The FourCC of the audio codec.
       
  2164 
       
  2165 	@return One of the system-wide error codes.
       
  2166 
       
  2167 	@since  7.0s
       
  2168 	*/
       
  2169 	IMPORT_C TInt GetAudioCodec(TFourCC& aCodec) const;
       
  2170 
       
  2171 	/**
       
  2172 	Gets the video bit rate.
       
  2173 
       
  2174 	@param  aBitRate	
       
  2175 	        The bit rate of the video stream. If this value is KMMFVariableVideoBitRate it signifies
       
  2176 	        a variable bit rate.
       
  2177 
       
  2178 	@return One of the system-wide error codes.
       
  2179 
       
  2180 	@since  7.0s
       
  2181 	*/
       
  2182 	IMPORT_C TInt GetVideoBitRate(TInt& aBitRate) const;
       
  2183 
       
  2184 	/**
       
  2185 	Gets the audio bit rate.
       
  2186 
       
  2187 	@param aBitRate
       
  2188 	       The bit rate of the audio stream.
       
  2189 
       
  2190 	@return One of the system-wide error codes.
       
  2191 
       
  2192 	@since  7.0s
       
  2193 	*/
       
  2194 	IMPORT_C TInt GetAudioBitRate(TInt& aBitRate) const;
       
  2195 
       
  2196 	/**
       
  2197 	Sets the frame rate of the clip.
       
  2198 
       
  2199 	@param  aFramesPerSecond
       
  2200 	        The number of frames per second.
       
  2201 
       
  2202 	@return One of the system-wide error codes.
       
  2203 
       
  2204 	@since  7.0s
       
  2205 	*/
       
  2206 	IMPORT_C TInt SetFrameRate(TReal32 aFramesPerSecond) const;
       
  2207 
       
  2208 	/**
       
  2209 	Gets the frame rate of the clip.
       
  2210 
       
  2211 	@param  aFramesPerSecond
       
  2212 	        The number of frames per second, filled in by the controller plugin.
       
  2213 
       
  2214 	@return One of the system-wide error codes.
       
  2215 
       
  2216 	@since  7.0s
       
  2217 	*/
       
  2218 	IMPORT_C TInt GetFrameRate(TReal32& aFramesPerSecond) const;
       
  2219 
       
  2220 	/**
       
  2221 	Gets the video clip MIME type.
       
  2222 
       
  2223 	@param  aMimeType
       
  2224 	        The Mime type of the current clip.
       
  2225 
       
  2226 	@since  7.0s
       
  2227 	*/
       
  2228 	IMPORT_C TInt GetVideoMimeType(TDes8& aMimeType) const;
       
  2229 	};
       
  2230 
       
  2231 /**
       
  2232 @publishedAll
       
  2233 @released
       
  2234 
       
  2235 Client class to access functionality specific to a video playback controller.
       
  2236 
       
  2237 The class uses the custom command function of the controller plugin, and removes the necessity
       
  2238 for the client to formulate the custom commands.
       
  2239 
       
  2240 @since  7.0s
       
  2241 */
       
  2242 class RMMFVideoPlayControllerCustomCommands : public RMMFCustomCommandsBase
       
  2243 	{
       
  2244 public:
       
  2245 
       
  2246 	/**
       
  2247 	Constructor.
       
  2248 
       
  2249 	@param  aController
       
  2250 	        The client side controller object to be used by this custom command interface.
       
  2251 
       
  2252 	@since  7.0s
       
  2253 	*/
       
  2254 	IMPORT_C RMMFVideoPlayControllerCustomCommands(RMMFController& aController);
       
  2255 
       
  2256 	/**
       
  2257 	Prepares the video clip to be accessed.
       
  2258 
       
  2259 	A call to this function tells the loaded controller plugin to finalise its configuration
       
  2260 	and to prepare to start reading the video clip.  It is not possible to play the video clip
       
  2261 	or query any of its properties (e.g. duration, meta data etc.) until the controller plugin
       
  2262 	has signified the completion of this method by generating a KMMFEventCategoryVideoPrepareComplete
       
  2263 	event.
       
  2264 
       
  2265 	@since  7.0s
       
  2266 	*/
       
  2267 	IMPORT_C TInt Prepare();
       
  2268 
       
  2269 	/**
       
  2270 	Asks the controller to store the current frame to a bitmap. 
       
  2271 
       
  2272 	The video play controller will send an event to the client on completion of the task.
       
  2273 
       
  2274 	@param  aBitmap
       
  2275 	        The handle of the CFbsBitmap object to retrieve the frame to.
       
  2276 	@param  aStatus
       
  2277 	        The active object to call back on.
       
  2278 
       
  2279 	@return One of the system-wide error codes.
       
  2280 
       
  2281 	@since  7.0s
       
  2282 	*/
       
  2283 	IMPORT_C void GetFrame(CFbsBitmap& aBitmap, TRequestStatus& aStatus);
       
  2284 
       
  2285 	/**
       
  2286 	Sets the screen region to be used to display the video.
       
  2287 
       
  2288 	@param  aWindowRect
       
  2289 	        The window rectangle.
       
  2290 	@param  aClipRect
       
  2291 	        The clip rectangle.
       
  2292 
       
  2293 	@return One of the system-wide error codes.
       
  2294 
       
  2295 	@since  7.0s
       
  2296 	*/
       
  2297 	IMPORT_C TInt SetDisplayWindow(const TRect& aWindowRect, const TRect& aClipRect) const;
       
  2298 
       
  2299 	/**
       
  2300 	Updates the display region.
       
  2301 
       
  2302 	@param  aRegion
       
  2303 	        The valid region to display to.
       
  2304 
       
  2305 	@return One of the system-wide error codes.
       
  2306 
       
  2307 	@since  7.0s
       
  2308 	*/
       
  2309 	IMPORT_C TInt UpdateDisplayRegion(const TRegion& aRegion) const;
       
  2310 
       
  2311 	/**
       
  2312 	Queries whether audio is enabled.
       
  2313 
       
  2314 	@param  aEnabled
       
  2315 	        A boolean indicating whether audio is enabled.
       
  2316 
       
  2317 	@return One of the system-wide error codes.
       
  2318 
       
  2319 	@since  7.0s
       
  2320 	*/
       
  2321 	IMPORT_C TInt GetAudioEnabled(TBool& aEnabled) const;
       
  2322 
       
  2323 	/**
       
  2324 	Sends a direct screen access event to controller.
       
  2325 
       
  2326 	@param  aDSAEvent
       
  2327 	        The direct screen access event.
       
  2328 
       
  2329 	@return One of the system-wide error codes.
       
  2330 
       
  2331 	@since  7.0s
       
  2332 	*/
       
  2333 	IMPORT_C TInt DirectScreenAccessEvent(const TMMFDSAEvent aDSAEvent) const;
       
  2334 
       
  2335 	/**
       
  2336  	Sets a time window for video playback.
       
  2337 
       
  2338  	@param  aStart
       
  2339 	        The start time in milliseconds relative to the start of the video clip.
       
  2340   	@param  aEnd
       
  2341 	        The end time in milliseconds relative to the start of the video clip.
       
  2342 
       
  2343   	@return One of the system-wide error codes.
       
  2344 
       
  2345   	@since  7.0s
       
  2346 	*/
       
  2347 	IMPORT_C TInt Play(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) const;
       
  2348 
       
  2349 	/**
       
  2350   	Requests the controller to redraw the current frame.
       
  2351 
       
  2352   	@return One of the system-wide error codes.
       
  2353 
       
  2354   	@since  7.0s
       
  2355 	*/
       
  2356 	IMPORT_C TInt RefreshFrame() const;
       
  2357 
       
  2358 	/**
       
  2359 	Gets the video loading progress as a percentage.
       
  2360 
       
  2361 	@param  aPercentageProgress
       
  2362 	        The progress loading the clip, as a percentage.
       
  2363 
       
  2364 	@return One of the system-wide error codes.
       
  2365 
       
  2366 	@since  7.0s
       
  2367 	*/
       
  2368 	IMPORT_C TInt GetLoadingProgress(TInt& aPercentageProgress) const;
       
  2369 
       
  2370 	/**
       
  2371 	Rotates the video image on the screen.
       
  2372 
       
  2373 	@param  aRotation
       
  2374 	        The desired rotation to apply.
       
  2375 
       
  2376 	@return One of the system-wide error codes.
       
  2377 
       
  2378 	@since  7.0s
       
  2379 	*/
       
  2380 	IMPORT_C TInt SetRotation(TVideoRotation aRotation) const;
       
  2381 
       
  2382 	/**
       
  2383 	Queries the rotation that is currently applied to the video image.
       
  2384 
       
  2385 	@param  aRotation
       
  2386 	        The applied rotation.
       
  2387 
       
  2388 	@return One of the system wide error codes.
       
  2389 
       
  2390 	@since  7.0s
       
  2391 	*/
       
  2392 	IMPORT_C TInt GetRotation(TVideoRotation& aRotation) const;
       
  2393 
       
  2394 	/**
       
  2395 	Scales the video image to a specified percentage of its original size.
       
  2396 
       
  2397 	@param  aWidthPercentage
       
  2398 	        The percentage (100 = original size) to be used to scale the width of the video image.
       
  2399 	@param  aHeightPercentage
       
  2400 	        The percentage (100 = original size) to be used to scale the height of the video image. 
       
  2401 	        If this is not equal to aWidthPercentage then the image may be distorted.
       
  2402 	@param  aAntiAliasFiltering
       
  2403 	        True if anti-aliasing filtering should be used. If the plugin does not
       
  2404 	        support this kind of processing, this value will be ignored.
       
  2405 
       
  2406 	@return One of the system wide error codes.
       
  2407 
       
  2408 	@since 7.0s
       
  2409 	*/
       
  2410 	IMPORT_C TInt SetScaleFactor(TReal32 aWidthPercentage, TReal32 aHeightPercentage, TBool aAntiAliasFiltering) const;
       
  2411 
       
  2412 	/**
       
  2413 	Gets the scale factor currently applied to the video image.
       
  2414 
       
  2415 	@param  aWidthPercentage
       
  2416 	        On return, will contain the percentage (100 = original size) used to scale the width
       
  2417 	        of the video image.
       
  2418 	@param  aHeightPercentage
       
  2419 	        On return. will contain the percentage (100 = original size) used to scale the height 
       
  2420 	        of the video image.
       
  2421 	@param  aAntiAliasFiltering
       
  2422 	        True if anti-aliasing filtering is being used
       
  2423 
       
  2424 	@return One of the system wide error codes.
       
  2425 
       
  2426 	@since  7.0s
       
  2427 	*/
       
  2428 	IMPORT_C TInt GetScaleFactor(TReal32& aWidthPercentage, TReal32& aHeightPercentage, TBool& aAntiAliasFiltering) const;
       
  2429 
       
  2430 	/**
       
  2431 	Selects a region of the video image to be displayed.
       
  2432 
       
  2433 	@param  aCropRegion
       
  2434 	        The dimensions of the crop region, relative to the video image.
       
  2435 
       
  2436 	@return One of the system wide error codes.
       
  2437 
       
  2438 	@since 7.0s
       
  2439 	*/
       
  2440 	IMPORT_C TInt SetCropRegion(const TRect& aCropRegion) const;
       
  2441 
       
  2442 	/**
       
  2443 	Gets the crop region currently applied to the image.
       
  2444 
       
  2445 	@param  aCropRegion
       
  2446 	        The dimensions of the crop region, relative to the video image. If no crop region has
       
  2447 	        been applied, the full dimensions of the video image will be returned.
       
  2448 	
       
  2449 	@return One of the system-wide error codes.
       
  2450 
       
  2451 	@since  7.0s
       
  2452 	*/
       
  2453 	IMPORT_C TInt GetCropRegion(TRect& aCropRegion) const;
       
  2454 
       
  2455 
       
  2456 private:
       
  2457 	TPckgBuf<TMMFVideoConfig> iConfigPackage;
       
  2458 	};
       
  2459 
       
  2460 /**
       
  2461 @publishedAll
       
  2462 @released
       
  2463 */
       
  2464 
       
  2465 	enum TMMFVideoRecordControllerMessages
       
  2466 		{
       
  2467 		EMMFVideoRecordControllerSetVideoFormat,
       
  2468 		EMMFVideoRecordControllerSetVideoCodec,
       
  2469 		EMMFVideoRecordControllerSetAudioCodec,
       
  2470 		EMMFVideoRecordControllerSetVideoBitRate,
       
  2471 		EMMFVideoRecordControllerSetAudioBitRate,
       
  2472 		EMMFVideoRecordControllerSetVideoFrameSize,
       
  2473 		EMMFVideoRecordControllerSetMaxFileSize,
       
  2474 		EMMFVideoRecordControllerAddMetaDataEntry,
       
  2475 		EMMFVideoRecordControllerRemoveMetaDataEntry,
       
  2476 		EMMFVideoRecordControllerReplaceMetaDataEntry,
       
  2477 		EMMFVideoRecordControllerSetAudioEnabled,
       
  2478 		EMMFVideoRecordControllerPrepare,
       
  2479 		EMMFVideoRecordControllerSetCameraHandle,
       
  2480 		EMMFVideoRecordControllerGetRecordTimeAvailable,
       
  2481 		EMMFVideoRecordControllerGetSupportedSinkAudioTypes,
       
  2482 		EMMFVideoRecordControllerGetSupportedSinkVideoTypes,
       
  2483 		EMMFVideoRecordControllerCopyDescriptorArrayData,
       
  2484 		EMMFVideoRecordControllerCopyFourCCArrayData,
       
  2485 		EMMFVideoRecordControllerGetAudioEnabled // INC23777
       
  2486 		};
       
  2487 
       
  2488 
       
  2489 /**
       
  2490 @publishedAll
       
  2491 @released
       
  2492 
       
  2493 Client class to access functionality specific to a video recorder controller.
       
  2494 
       
  2495 The class uses the custom command function of the controller plugin, and removes the necessity
       
  2496 for the client to formulate the custom commands.
       
  2497 
       
  2498 @since  7.0s
       
  2499 */
       
  2500 class RMMFVideoRecordControllerCustomCommands : public RMMFCustomCommandsBase
       
  2501 	{
       
  2502 public:
       
  2503 
       
  2504 	/**
       
  2505 	Constructor.
       
  2506 
       
  2507 	@param  aController
       
  2508 	        The client side controller object to be used by this custom command interface.
       
  2509 
       
  2510 	@since 7.0s
       
  2511 	*/
       
  2512 	IMPORT_C RMMFVideoRecordControllerCustomCommands(RMMFController& aController);
       
  2513 
       
  2514 	/**
       
  2515 	Sets the format for the video to record.
       
  2516 
       
  2517 	@param  aVideoFormatUid
       
  2518 	        The UID of the video format.
       
  2519 
       
  2520 	@return This method will return with one of the system-wide error codes.
       
  2521 
       
  2522 	@since  7.0s
       
  2523 	*/
       
  2524 	IMPORT_C TInt SetVideoFormat(TUid aVideoFormatUid) const;
       
  2525 
       
  2526 	/**
       
  2527 	Sets the video codec for recording.
       
  2528 
       
  2529 	@param  aVideoCodec
       
  2530 	        The MIME type of the video codec.
       
  2531 
       
  2532 	@return	One of the system-wide error codes.
       
  2533 
       
  2534 	@since  7.0s
       
  2535 	*/
       
  2536 	IMPORT_C TInt SetVideoCodec(const TDesC8& aVideoCodec) const;
       
  2537 
       
  2538 	/**
       
  2539 	Sets the video bit rate.
       
  2540 
       
  2541 	@param  aBitRate
       
  2542 	        The bit rate of the video stream.
       
  2543 
       
  2544 	@return One of the system-wide error codes.
       
  2545 
       
  2546 	@since  7.0s
       
  2547 	*/
       
  2548 	IMPORT_C TInt SetVideoBitRate(TInt aBitRate) const;
       
  2549 
       
  2550 	/**
       
  2551 	Sets the audio bit rate.
       
  2552 
       
  2553 	@param  aBitRate
       
  2554 	        The bit rate of the audio stream.
       
  2555 
       
  2556 	@return One of the system-wide error codes.
       
  2557 
       
  2558 	@since  7.0s
       
  2559 	*/
       
  2560 	IMPORT_C TInt SetAudioBitRate(TInt aBitRate) const;
       
  2561 
       
  2562 	/**
       
  2563 	Sets the audio codec for recording.
       
  2564 
       
  2565 	@param  aAudioCodec
       
  2566 	        The FourCC code of the audio codec.
       
  2567 
       
  2568 	@return	One of the system-wide error codes.
       
  2569 
       
  2570 	@since  7.0s
       
  2571 	*/
       
  2572 	IMPORT_C TInt SetAudioCodec(TFourCC aAudioCodec) const;
       
  2573 
       
  2574 	/**
       
  2575 	Sets the frame size of the clip.
       
  2576 
       
  2577 	@param  aVideoFrameSize
       
  2578 	        The frame size, in pixels.
       
  2579 
       
  2580 	@return One of the system-wide error codes.
       
  2581 
       
  2582 	@since  7.0s
       
  2583 	*/
       
  2584 	IMPORT_C TInt SetVideoFrameSize(TSize aVideoFrameSize) const;
       
  2585 
       
  2586 	/**
       
  2587 	Sets the maximum size of the recorded clip, in bytes.
       
  2588 
       
  2589 	@param  aMaxSize
       
  2590 	        The maximum size of the recorded clip, in bytes. This can be called with the parameter 
       
  2591 	        KMMFNoMaxClipSize which signifies no maximum file size.
       
  2592 
       
  2593 	@return	One of the system-wide error codes.
       
  2594 
       
  2595 	@since  7.0s
       
  2596 	*/
       
  2597 	IMPORT_C TInt SetMaxFileSize(TInt aMaxSize) const;
       
  2598 
       
  2599 	/**
       
  2600 	Adds meta data to the clip.
       
  2601 
       
  2602 	@param  aNewEntry
       
  2603 	        The details of the new entry to be added.
       
  2604 
       
  2605 	@return One of the system-wide error codes.
       
  2606 
       
  2607 	@since  7.0s
       
  2608 	*/
       
  2609 	IMPORT_C void AddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry)const;
       
  2610 
       
  2611 	/**
       
  2612 	Removes a meta data entry from the clip.
       
  2613 
       
  2614 	@param  aIndex
       
  2615 	        The ID of the meta data entry to delete.
       
  2616 
       
  2617 	@return One of the system-wide error codes.
       
  2618 
       
  2619 	@since  7.0s
       
  2620 	*/
       
  2621 	IMPORT_C TInt RemoveMetaDataEntry(TInt aIndex)const;
       
  2622 
       
  2623 	/**
       
  2624 	Replaces a meta data in the clip.
       
  2625 
       
  2626 	@param  aIndex
       
  2627 	        The ID of the meta data entry to replace.
       
  2628 	@param  aNewEntry
       
  2629 	        The details of the new entry to be added.
       
  2630 
       
  2631 	@since  7.0s
       
  2632 	*/
       
  2633 	IMPORT_C void ReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry)const;
       
  2634 
       
  2635 	/**
       
  2636 	Sets whether audio is enabled.
       
  2637 
       
  2638 	@param  aEnable
       
  2639 	        A boolean indicating if audio should be enabled.
       
  2640 
       
  2641 	@return One of the system-wide error codes.
       
  2642 
       
  2643 	@since  7.0s
       
  2644 	*/
       
  2645 	IMPORT_C TInt SetAudioEnabled(TBool aEnable) const;
       
  2646 
       
  2647 	/**
       
  2648 	Prepares the controller for recording. This should be called before the first attempt to record 
       
  2649 	with the controller.
       
  2650 
       
  2651 	@return One of the system-wide error codes.
       
  2652 
       
  2653 	@since  7.0s
       
  2654 	*/
       
  2655 	IMPORT_C TInt Prepare() const;
       
  2656 
       
  2657 	/**
       
  2658 	Sets the handle of the camera to use.
       
  2659 
       
  2660 	@param  aCameraHandle
       
  2661 	        The handle of the camera to use.
       
  2662 
       
  2663 	@return One of the system-wide error codes.
       
  2664 
       
  2665 	@since  7.0s
       
  2666 	*/
       
  2667 	IMPORT_C TInt SetCameraHandle(TInt aCameraHandle) const;
       
  2668 
       
  2669 	/**
       
  2670 	Gets the (possibly estimated) record time left in the clip.
       
  2671 
       
  2672 	@param  aTime
       
  2673 	        The record time available, in microseconds.
       
  2674 
       
  2675 	@return One of the system-wide error codes.
       
  2676 
       
  2677 	@since  7.0s
       
  2678 	*/
       
  2679 	IMPORT_C TInt GetRecordTimeAvailable(TTimeIntervalMicroSeconds& aTime) const;
       
  2680 
       
  2681 	/**
       
  2682 	Gets the supported sink audio types.
       
  2683 
       
  2684 	@param  aSupportedDataTypes
       
  2685 	        The supported data types.
       
  2686 
       
  2687 	@since  7.0s
       
  2688 	*/
       
  2689 	IMPORT_C TInt GetSupportedSinkAudioTypes(RArray<TFourCC>& aSupportedDataTypes) const;
       
  2690 
       
  2691 	/**
       
  2692 	Gets the supported sink video types.
       
  2693 
       
  2694 	@param  aDataTypes
       
  2695 	        The supported data types.
       
  2696 
       
  2697 	@since  7.0s
       
  2698 	*/
       
  2699 	IMPORT_C TInt GetSupportedSinkVideoTypes(CDesC8Array& aDataTypes) const;
       
  2700 
       
  2701 	// INC23777
       
  2702 	/**
       
  2703 	Retrieves whether audio is enabled.
       
  2704 
       
  2705 	@param  aEnabled
       
  2706 	        A boolean indicating whether audio is enabled.
       
  2707 
       
  2708 	@return One of the system-wide error codes.
       
  2709 
       
  2710 	@since  7.0s
       
  2711 	*/
       
  2712 	IMPORT_C TInt GetAudioEnabled(TBool& aEnabled) const;
       
  2713 
       
  2714 private:
       
  2715 	void DoGetCDesC8ArrayL(CDesC8Array& aArray, TMMFVideoRecordControllerMessages aIpc) const;
       
  2716 	void DoGetFourCCArrayL(RArray<TFourCC>& aArray) const;
       
  2717 	};
       
  2718 
       
  2719 
       
  2720 /**
       
  2721 @publishedAll
       
  2722 @released
       
  2723 
       
  2724 Mixin class to be derived from controller plugins that could support the video record controller 
       
  2725 custom commands.
       
  2726 */
       
  2727 class MMMFVideoRecordControllerCustomCommandImplementor
       
  2728 	{
       
  2729 public:
       
  2730 
       
  2731 	/**
       
  2732 	Sets the format for the video to record.
       
  2733 
       
  2734 	@param  aVideoFormatUid
       
  2735 	        The UID of the video format.
       
  2736 
       
  2737 	@return One of the system-wide error codes.
       
  2738 
       
  2739 	@since  7.0s
       
  2740 	*/
       
  2741 	virtual void MvrcSetVideoFormatL(TUid aVideoFormatUid)=0;
       
  2742 
       
  2743 	/**
       
  2744 	Sets the video codec for recording.
       
  2745 
       
  2746 	@param  aVideoCodec
       
  2747 	        The MIME type of the video codec.
       
  2748 
       
  2749 	@return One of the system-wide error codes.
       
  2750 
       
  2751 	@since 7.0s
       
  2752 	*/
       
  2753 	virtual void MvrcSetVideoCodecL(const TDesC8& aVideoCodec)=0;
       
  2754 
       
  2755 	/**
       
  2756 	Sets the audio codec for recording.
       
  2757 
       
  2758 	@param  aAudioCodec
       
  2759 	        The FourCC code of the audio codec.
       
  2760 
       
  2761 	@return One of the system-wide error codes.
       
  2762 
       
  2763 	@since  7.0s
       
  2764 	*/
       
  2765 	virtual void MvrcSetAudioCodecL(TFourCC aAudioCodec)=0;
       
  2766 
       
  2767 	/**
       
  2768 	Sets the video bit rate.
       
  2769 
       
  2770 	@param  aBitRate
       
  2771 	        The bit rate of the video stream. This can be called with the parameter 
       
  2772 	        KMMFVariableVideoBitRate which specifies a variable bit rate.
       
  2773 
       
  2774 	@return One of the system-wide error codes.
       
  2775 
       
  2776 	@since  7.0s
       
  2777 	*/
       
  2778 	virtual void MvrcSetVideoBitRateL(TInt& aBitRate)=0;
       
  2779 
       
  2780 	/**
       
  2781 	Sets the audio bit rate.
       
  2782 
       
  2783 	@param  aBitRate
       
  2784 	        The bit rate of the audio stream.
       
  2785 
       
  2786 	@return One of the system-wide error codes.
       
  2787 
       
  2788 	@since  7.0s
       
  2789 	*/
       
  2790 	virtual void MvrcSetAudioBitRateL(TInt& aBitRate)=0;
       
  2791 
       
  2792 	/**
       
  2793 	Adds meta data to the clip.
       
  2794 
       
  2795 	@param  aNewEntry
       
  2796 	        The details of the new entry to be added.
       
  2797 
       
  2798 	@since  7.0s
       
  2799 	*/
       
  2800 	virtual void MvrcAddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry)=0;
       
  2801 
       
  2802 	/**
       
  2803 	Removes a meta data entry from the clip.
       
  2804 
       
  2805 	@param  aIndex
       
  2806 	        The ID of the meta data entry to delete.
       
  2807 
       
  2808 	@since  7.0s
       
  2809 	*/
       
  2810 	virtual void MvrcRemoveMetaDataEntryL(TInt aIndex)=0;
       
  2811 
       
  2812 	/**
       
  2813 	Replaces a meta data in the clip.
       
  2814 
       
  2815 	@param  aIndex
       
  2816 	        The ID of the meta data entry to replace.
       
  2817 	@param  aNewEntry
       
  2818 	        The details of the new entry to be added.
       
  2819 
       
  2820 	@since  7.0s
       
  2821 	*/
       
  2822 	virtual void MvrcReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry)=0;
       
  2823 
       
  2824 	/**
       
  2825 	Sets the maximum file size.
       
  2826 
       
  2827 	@param  aMaxFileSize
       
  2828 	        The maximum file size allowed for recording. This can be called with the parameter
       
  2829 	        KMMFNoMaxClipSize which signifies no maximum file size.
       
  2830 
       
  2831 	@since  7.0s
       
  2832 	*/
       
  2833 	virtual void MvrcSetMaxFileSizeL(TInt aMaxFileSize)=0;
       
  2834 
       
  2835 	/**
       
  2836 	Sets whether audio is enabled.
       
  2837 
       
  2838 	@param  aEnable
       
  2839 	        A boolean indicating if audio is enabled.
       
  2840 
       
  2841 	@since  7.0s
       
  2842 	*/
       
  2843 	virtual void MvrcSetAudioEnabledL(TBool aEnable)=0;
       
  2844 
       
  2845 	/**
       
  2846 	Sets the frame size for the video recording.
       
  2847 
       
  2848 	@param  aFrameSize
       
  2849 	        The frame size for recording.
       
  2850 
       
  2851 	@since  7.0s
       
  2852 	*/
       
  2853 	virtual void MvrcSetVideoFrameSizeL(TSize aFrameSize)=0;
       
  2854 
       
  2855 	/**
       
  2856 	Prepares the controller for recording. This needs to be called before
       
  2857 	the first call to Record().
       
  2858 
       
  2859 	@since  7.0s
       
  2860 	*/
       
  2861 	virtual void MvrcPrepareL()=0;
       
  2862 
       
  2863 	/**
       
  2864 	Sets the handle of the camera to use for recording.
       
  2865 
       
  2866 	@since  7.0s
       
  2867 	*/
       
  2868 	virtual void MvrcSetCameraHandleL(TInt aCameraHandle)=0;
       
  2869 
       
  2870 	/**
       
  2871 	Gets the (possibly estimated) record time left in the clip.
       
  2872 
       
  2873 	@param  aTime
       
  2874 	        The record time available, in microseconds.
       
  2875 
       
  2876 	@since  7.0s
       
  2877 	*/
       
  2878 	virtual void MvrcGetRecordTimeAvailableL(TTimeIntervalMicroSeconds& aTime) = 0;
       
  2879 
       
  2880 	/**
       
  2881 	Gets the supported sink audio types.
       
  2882 
       
  2883 	@param  aDataTypes
       
  2884 	        The supported data types.
       
  2885 
       
  2886 	@return One of the system-wide error codes.
       
  2887 
       
  2888 	@since  7.0s
       
  2889 	*/
       
  2890 	virtual void MvrcGetSupportedSinkAudioTypesL(RArray<TFourCC>& aDataTypes)=0;
       
  2891 
       
  2892 	/**
       
  2893 	Gets the supported sink video types.
       
  2894 
       
  2895 	@param  aDataTypes
       
  2896 	        The supported data types.
       
  2897 
       
  2898 	@return One of the system-wide error codes.
       
  2899 
       
  2900 	@since  7.0s
       
  2901 	*/
       
  2902 	virtual void MvrcGetSupportedSinkVideoTypesL(CDesC8Array& aDataTypes)=0;
       
  2903 
       
  2904 	//INC23777
       
  2905 	/**
       
  2906 	Indicates if the audio is enabled.
       
  2907 
       
  2908 	@param  aEnabled
       
  2909 	        A boolean indicating if the audio is enabled.
       
  2910 
       
  2911 	@since  7.0s
       
  2912 	*/
       
  2913 	virtual void MvrcGetAudioEnabledL(TBool& aEnabled)=0;
       
  2914 	};
       
  2915 
       
  2916 
       
  2917 /**
       
  2918 @publishedAll
       
  2919 @released
       
  2920 
       
  2921 Client class to access functionality specific to a video playback controller.
       
  2922 
       
  2923 The class uses the custom command function of the controller plugin, and removes the necessity
       
  2924 for the client to formulate the custom commands.
       
  2925 
       
  2926 @since  7.0s
       
  2927 */
       
  2928 class MMMFVideoPlayControllerCustomCommandImplementor
       
  2929 	{
       
  2930 public:
       
  2931 
       
  2932 	/**
       
  2933 	Prepares the video clip to be accessed.
       
  2934 
       
  2935 	A call to this method tells the controller plugin to finalise its configuration
       
  2936 	and to prepare to start reading the video clip.  It is not possible to play the video clip
       
  2937 	or query any of its properties (e.g. duration, meta data etc.) until the controller plugin
       
  2938 	has signified the completion of this method by generating a 
       
  2939 	KMMFEventCategoryVideoPrepareComplete event.
       
  2940 
       
  2941 	@since  7.0s
       
  2942 	*/
       
  2943 	virtual void MvpcPrepare()=0;
       
  2944 
       
  2945 	/**
       
  2946 	Gets a frame previously requested from the controller.
       
  2947 
       
  2948 	@param  aVideoFrame
       
  2949 	        The handle of bitmap to retrieve frame to.
       
  2950 
       
  2951 	@since  7.0s
       
  2952 	*/
       
  2953 	virtual void MvpcGetFrameL(MMMFVideoFrameMessage& aVideoFrame)=0;
       
  2954 
       
  2955 	/**
       
  2956 	Indicates whether audio is enabled.
       
  2957 
       
  2958 	@param  aEnabled
       
  2959 	        On return, contains a boolean indicating whether audio is enabled.
       
  2960 
       
  2961 	@since  7.0s
       
  2962 	*/
       
  2963 	virtual void MvpcGetAudioEnabledL(TBool& aEnabled)=0;
       
  2964 
       
  2965 	/**
       
  2966 	Sets the screen region to be used to display the video.
       
  2967 
       
  2968 	@param  aClipRect
       
  2969 	        The clip rect used to display the video.
       
  2970 
       
  2971 	@since  7.0s
       
  2972 	*/
       
  2973 	virtual void MvpcSetDisplayWindowL(const TRect& aWindowRect, const TRect& aClipRect) = 0;
       
  2974 
       
  2975 	/**
       
  2976 	Updates the region to display.
       
  2977 
       
  2978 	@param  aRegion
       
  2979 	        A TRegion containing the current display regions, ownership of the TRegion is not
       
  2980 	        transferred.
       
  2981 
       
  2982 	@since  7.0s
       
  2983 	*/
       
  2984 	virtual void MvpcUpdateDisplayRegionL(const TRegion& aRegion) = 0;
       
  2985 
       
  2986 	/**
       
  2987 	Pauses/Resumes video playback. This is to be used with direct screen access
       
  2988 	to indicate that the display has changed and should not be written to. This
       
  2989 	does not affect audio playback.
       
  2990 
       
  2991 	@param  aDSAEvent
       
  2992 	        Whether the video display should be active.
       
  2993 
       
  2994 	@since  7.0s
       
  2995 	*/
       
  2996 	virtual void MvpcDirectScreenAccessEventL(const TMMFDSAEvent aDSAEvent) = 0;
       
  2997 
       
  2998 	/**
       
  2999  	Sets a time window for video playback.
       
  3000 
       
  3001  	@param  aStart
       
  3002 	        Start time in milliseconds relative to the start of the video clip.
       
  3003   	@param  aEnd
       
  3004 	        End time in milliseconds relative to the start of the video clip.
       
  3005 
       
  3006   	@since 7.0s
       
  3007 	*/
       
  3008 	virtual void MvpcPlayL(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) = 0;
       
  3009 	
       
  3010 	/**
       
  3011   	Requests the controller to redraw the current frame.
       
  3012 
       
  3013   	@since  7.0s
       
  3014 	*/
       
  3015 	virtual void MvpcRefreshFrameL() = 0;
       
  3016 
       
  3017 	/**
       
  3018 	Gets the progress of loading a video clip.
       
  3019 
       
  3020 	@param  aPercentageComplete
       
  3021 	        The progress loading the clip, as a percentage.
       
  3022 
       
  3023 	@since  7.0s
       
  3024 	*/
       
  3025 	virtual void MvpcGetLoadingProgressL(TInt& aPercentageComplete) = 0;
       
  3026 
       
  3027 	/**
       
  3028 	Rotates the video image on the screen.
       
  3029 
       
  3030 	@param  aRotation
       
  3031 	        The desired rotation to apply.
       
  3032 
       
  3033 	@since  7.0s
       
  3034 	*/
       
  3035 	virtual void MvpcSetRotationL(TVideoRotation aRotation) = 0;
       
  3036 
       
  3037 	/**
       
  3038 	Queries the rotation that is currently applied to the video image.
       
  3039 
       
  3040 	@param  aRotation
       
  3041 	        The applied rotation.
       
  3042 
       
  3043 	@since  7.0s
       
  3044 	*/
       
  3045 	virtual void MvpcGetRotationL(TVideoRotation& aRotation) = 0;
       
  3046 
       
  3047 	/**
       
  3048 	Scales the video image to a specified percentage of its original size.
       
  3049 
       
  3050 	@param  aWidthPercentage
       
  3051 	        The percentage (100 = original size) to be used to scale the width of the video image.
       
  3052 	@param  aHeightPercentage
       
  3053 	        The percentage (100 = original size) to be used to scale the height of the video image. 
       
  3054 	        If this is not equal to aWidthPercentage then the image may be distorted.
       
  3055 	@param  aAntiAliasFiltering
       
  3056 	        A boolean indicating if anit-aliasing filtering should be used. ETrue if anti-aliasing 
       
  3057 	        should be used.  If the plugin does not support this kind of processing, this value will 
       
  3058 	        be ignored.
       
  3059 
       
  3060 	@since  7.0s
       
  3061 	*/
       
  3062 	virtual void MvpcSetScaleFactorL(TReal32 aWidthPercentage, TReal32 aHeightPercentage, TBool aAntiAliasFiltering) = 0;
       
  3063 
       
  3064 	/**
       
  3065 	Gets the scale factor currently applied to the video image.
       
  3066 
       
  3067 	@param  aWidthPercentage
       
  3068 	        The percentage (100 = original size) used to scale the width of the video image will be 
       
  3069 	        copied into here.
       
  3070 	@param  aHeightPercentage
       
  3071 	        The percentage (100 = original size) used to scale the height of the video image will be 
       
  3072 	        copied into here.
       
  3073 	@param  aAntiAliasFiltering
       
  3074 	        A boolean indicating if anti-aliasing filtering should be used. ETrue if anti-aliasing 
       
  3075 	        filtering is being used, EFalse if not.
       
  3076 
       
  3077 	@since 7.0s
       
  3078 	*/
       
  3079 	virtual void MvpcGetScaleFactorL(TReal32& aWidthPercentage, TReal32& aHeightPercentage, TBool& aAntiAliasFiltering) = 0;
       
  3080 
       
  3081 	/**
       
  3082 	Selects a region of the video image to be displayed.
       
  3083 
       
  3084 	@param  aCropRegion
       
  3085 	        The dimensions of the crop region, relative to the video image.
       
  3086 
       
  3087 	@since  7.0s
       
  3088 	*/
       
  3089 	virtual void MvpcSetCropRegionL(const TRect& aCropRegion) = 0;
       
  3090 
       
  3091 	/**
       
  3092 	Gets the crop region currently applied to the image
       
  3093 
       
  3094 	@param  aCropRegion
       
  3095 	        The dimensions of the crop region, relative to the video image. If no crop region has 
       
  3096 	        been applied, the full dimensions of the video image will be returned.
       
  3097 
       
  3098 	@since  7.0s
       
  3099 	*/
       
  3100 	virtual void MvpcGetCropRegionL(TRect& aCropRegion) = 0;
       
  3101 	};
       
  3102 
       
  3103 /**
       
  3104 @publishedAll
       
  3105 @released
       
  3106 
       
  3107 Mixin class to be derived from controller plugins that could support the video record controller
       
  3108 custom commands.
       
  3109 */
       
  3110 class MMMFVideoControllerCustomCommandImplementor
       
  3111 	{
       
  3112 public:
       
  3113 
       
  3114 	/**
       
  3115 	Gets the frame size of the clip.
       
  3116 
       
  3117 	@param  aVideoFrameSize
       
  3118 	        The frame size, in pixels.
       
  3119 
       
  3120 	@since  7.0s
       
  3121 	*/
       
  3122 	virtual void MvcGetVideoFrameSizeL(TSize& aVideoFrameSize)=0;
       
  3123 
       
  3124 	/**
       
  3125 	Gets the audio type.
       
  3126 
       
  3127 	@param  aCodec
       
  3128 	        The FourCC of the audio codec.
       
  3129 
       
  3130 	@since  7.0s
       
  3131 	*/
       
  3132 	virtual void MvcGetAudioCodecL(TFourCC& aCodec)=0;
       
  3133 
       
  3134 	/**
       
  3135 	Gets the video bit rate.
       
  3136 
       
  3137 	@param  aBitRate
       
  3138 	        The bit rate of the video stream. If this value is KMMFVariableVideoBitRate it signifies
       
  3139 	        a variable bit rate.
       
  3140 
       
  3141 	@since  7.0s
       
  3142 	*/
       
  3143 	virtual void MvcGetVideoBitRateL(TInt& aBitRate)=0;
       
  3144 
       
  3145 	/**
       
  3146 	Gets the audio bit rate.
       
  3147 
       
  3148 	@param  aBitRate
       
  3149 	        The bit rate of the audio stream.
       
  3150 
       
  3151 	@since  7.0s
       
  3152 	*/
       
  3153 	virtual void MvcGetAudioBitRateL(TInt& aBitRate)=0;
       
  3154 
       
  3155 	/**
       
  3156 	Sets the frame rate of the clip.
       
  3157 
       
  3158 	@param  aFramesPerSecond
       
  3159 	        The number of frames per second.
       
  3160 
       
  3161 	@since  7.0s
       
  3162 	*/
       
  3163 	virtual void MvcSetFrameRateL(TReal32 aFramesPerSecond)=0;
       
  3164 
       
  3165 	/**
       
  3166 	Gets the frame rate of the clip.
       
  3167 
       
  3168 	@param  aFramesPerSecond
       
  3169 	        The number of frames per second, filled in by the controller plugin.
       
  3170 
       
  3171 	@since  7.0s
       
  3172 	*/
       
  3173 	virtual void MvcGetFrameRateL(TReal32& aFramesPerSecond)=0;
       
  3174 
       
  3175 	/**
       
  3176 	Gets the supported sink video types.
       
  3177 
       
  3178 	@param  aMimeType
       
  3179 	        The supported data types.
       
  3180 
       
  3181 	@since  7.0s
       
  3182 	*/
       
  3183 	virtual void MvcGetVideoMimeTypeL(TDes8& aMimeType)=0;
       
  3184 	};
       
  3185 
       
  3186 
       
  3187 /**
       
  3188 @publishedAll
       
  3189 @released
       
  3190 
       
  3191 Custom command parser class to be used by controller plugins wishing to support
       
  3192 video controller commands.
       
  3193 
       
  3194 The controller plugin must be derived from MMMFVideoControllerCustomCommandImplementor
       
  3195 to use this class.
       
  3196 
       
  3197 The controller plugin should create an object of this type and add it to the list of custom
       
  3198 command parsers in the controller framework.  See the following example code for details.
       
  3199 
       
  3200 @code
       
  3201 void CMMFAudioController::ConstructL()
       
  3202 	{
       
  3203 	// Construct custom command parsers
       
  3204 	CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
       
  3205 	CleanupStack::PushL(audPlayDevParser);
       
  3206 	AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
       
  3207 	CleanupStack::Pop();//audPlayDevParser
       
  3208 
       
  3209 	CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
       
  3210 	CleanupStack::PushL(audRecDevParser);
       
  3211 	AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
       
  3212 	CleanupStack::Pop();//audRecDevParser
       
  3213 
       
  3214 etc.
       
  3215 	}
       
  3216 @endcode
       
  3217 
       
  3218 @since 7.0s
       
  3219 
       
  3220 */
       
  3221 class CMMFVideoControllerCustomCommandParser : public CMMFCustomCommandParserBase
       
  3222 	{
       
  3223 public:
       
  3224 
       
  3225 	/**
       
  3226 	Creates a new custom command parser capable of handling video controller commands.
       
  3227 
       
  3228 	@param  aImplementor
       
  3229 	        A reference to the controller plugin that owns this new object.
       
  3230 
       
  3231 	@return	A pointer to the object created.
       
  3232 
       
  3233 	@since  7.0s
       
  3234 	*/
       
  3235 	IMPORT_C static CMMFVideoControllerCustomCommandParser* NewL(MMMFVideoControllerCustomCommandImplementor& aImplementor);
       
  3236 
       
  3237 	/**
       
  3238 	Destructor.
       
  3239 
       
  3240 	@since  7.0s
       
  3241 	*/
       
  3242 	IMPORT_C ~CMMFVideoControllerCustomCommandParser();
       
  3243 
       
  3244 	/**
       
  3245 	Handles a request from the client. Called by the controller framework.
       
  3246 
       
  3247 	@param  aMessage
       
  3248 	        The message to be handled.
       
  3249 
       
  3250 	@since  7.0s
       
  3251 	*/
       
  3252 	void HandleRequest(TMMFMessage& aMessage);
       
  3253 private:
       
  3254 
       
  3255 	/**
       
  3256 	Constructor.
       
  3257 
       
  3258 	@param  aImplementor
       
  3259 	        A reference to the controller plugin that owns this new object.
       
  3260 
       
  3261 	@since  7.0s
       
  3262 	*/
       
  3263 	CMMFVideoControllerCustomCommandParser(MMMFVideoControllerCustomCommandImplementor& aImplementor);
       
  3264 	// Internal request handling methods.
       
  3265 	void DoHandleRequestL(TMMFMessage& aMessage);
       
  3266 	TBool DoGetAudioCodecL(TMMFMessage& aMessage);
       
  3267 
       
  3268 	TBool DoGetAudioBitRateL(TMMFMessage& aMessage);
       
  3269 	TBool DoGetVideoBitRateL(TMMFMessage& aMessage);
       
  3270 	TBool DoGetVideoFrameSizeL(TMMFMessage& aMessage);
       
  3271 	TBool DoSetFrameRateL(TMMFMessage& aMessage);
       
  3272 	TBool DoGetFrameRateL(TMMFMessage& aMessage);
       
  3273 	TBool DoGetVideoMimeTypeL(TMMFMessage& aMessage);
       
  3274 private:
       
  3275 	/** 
       
  3276 	The object that implements the video record controller interface 
       
  3277 	*/
       
  3278 	MMMFVideoControllerCustomCommandImplementor& iImplementor;
       
  3279 	};
       
  3280 
       
  3281 /**
       
  3282 @publishedAll
       
  3283 @released
       
  3284 
       
  3285 Custom command parser class to be used by controller plugins wishing to support video play 
       
  3286 controller commands.
       
  3287 
       
  3288 The controller plugin must be derived from MMMFVideoPlayControllerCustomCommandImplementor to use 
       
  3289 this class. The controller plugin should create an object of this type and add it to the list of 
       
  3290 custom command parsers in the controller framework.
       
  3291 */
       
  3292 class CMMFVideoPlayControllerCustomCommandParser : public CMMFCustomCommandParserBase
       
  3293 	{
       
  3294 public:
       
  3295 
       
  3296 	/**
       
  3297 	Creates a new custom command parser capable of handling video controller commands.
       
  3298 
       
  3299 	@param  aImplementor
       
  3300 	        A reference to the controller plugin that owns this new object.
       
  3301 
       
  3302 	@return A pointer to the object created.
       
  3303 
       
  3304 	@since  7.0s
       
  3305 	*/
       
  3306 	IMPORT_C static CMMFVideoPlayControllerCustomCommandParser* NewL(MMMFVideoPlayControllerCustomCommandImplementor& aImplementor);
       
  3307 
       
  3308 	/**
       
  3309 	Destructor.
       
  3310 
       
  3311 	@since  7.0s
       
  3312 	*/
       
  3313 	IMPORT_C ~CMMFVideoPlayControllerCustomCommandParser();
       
  3314 
       
  3315 	/**
       
  3316 	Handles a request from the client. Called by the controller framework.
       
  3317 
       
  3318 	@param  aMessage
       
  3319 	        The message to be handled.
       
  3320 
       
  3321 	@since  7.0s
       
  3322 	*/
       
  3323 	void HandleRequest(TMMFMessage& aMessage);
       
  3324 private:
       
  3325 	/**
       
  3326 	Constructor.
       
  3327 
       
  3328 	@param  aImplementor
       
  3329 	        A reference to the controller plugin that owns this new object.
       
  3330 
       
  3331 	@since  7.0s
       
  3332 	*/
       
  3333 	CMMFVideoPlayControllerCustomCommandParser(MMMFVideoPlayControllerCustomCommandImplementor& aImplementor);
       
  3334 	// Internal request handling methods.
       
  3335 	void DoHandleRequestL(TMMFMessage& aMessage);
       
  3336 	TBool DoRequestFrameL(TMMFMessage& aMessage);
       
  3337 	TBool DoGetFrameL(TMMFMessage& aMessage);
       
  3338 	TBool DoSetDisplayWindowL(TMMFMessage& aMessage);
       
  3339 	TBool DoUpdateDisplayRegionL(TMMFMessage& aMessage);
       
  3340 	TBool DoGetAudioEnabledL(TMMFMessage& aMessage);
       
  3341 	TBool DoDirectScreenAccessEventL(TMMFMessage& aMessage);
       
  3342 	TBool DoPlayL(TMMFMessage& aMessage);
       
  3343 	TBool DoRefreshFrameL(TMMFMessage& aMessage);
       
  3344 	TBool DoGetLoadingProgressL(TMMFMessage& aMessage);
       
  3345 	TBool DoPrepareL(TMMFMessage& aMessage);
       
  3346 	TBool DoSetRotationL(TMMFMessage& aMessage);
       
  3347 	TBool DoGetRotationL(TMMFMessage& aMessage);
       
  3348 	TBool DoSetScaleFactorL(TMMFMessage& aMessage);
       
  3349 	TBool DoGetScaleFactorL(TMMFMessage& aMessage);
       
  3350 	TBool DoSetCropRegionL(TMMFMessage& aMessage);
       
  3351 	TBool DoGetCropRegionL(TMMFMessage& aMessage);
       
  3352 
       
  3353 
       
  3354 private:
       
  3355 	/** 
       
  3356 	The object that implements the video record controller interface 
       
  3357 	*/
       
  3358 	MMMFVideoPlayControllerCustomCommandImplementor& iImplementor;
       
  3359 	CMMFVideoFrameMessage* iVideoFrameMessage;
       
  3360 	};
       
  3361 
       
  3362 /**
       
  3363 @publishedAll
       
  3364 @released
       
  3365 
       
  3366 Custom command parser class to be used by controller plugins wishing to support video record 
       
  3367 controller commands.
       
  3368 
       
  3369 The controller plugin must be derived from MMMFVideoRecordControllerCustomCommandImplementor to use 
       
  3370 this class. The controller plugin should create an object of this type and add it to the list of 
       
  3371 custom command parsers in the controller framework.
       
  3372 */
       
  3373 class CMMFVideoRecordControllerCustomCommandParser : public CMMFCustomCommandParserBase
       
  3374 	{
       
  3375 public:
       
  3376 
       
  3377 	/**
       
  3378 	Creates a new custom command parser capable of handling video controller commands.
       
  3379 
       
  3380 	@param  aImplementor
       
  3381 	        A reference to the controller plugin that owns this new object.
       
  3382 
       
  3383 	@return A pointer to the object created.
       
  3384 
       
  3385 	@since  7.0s
       
  3386 	*/
       
  3387 	IMPORT_C static CMMFVideoRecordControllerCustomCommandParser* NewL(MMMFVideoRecordControllerCustomCommandImplementor& aImplementor);
       
  3388 
       
  3389 	/**
       
  3390 	Destructor.
       
  3391 
       
  3392 	@since  7.0s
       
  3393 	*/
       
  3394 	IMPORT_C ~CMMFVideoRecordControllerCustomCommandParser();
       
  3395 
       
  3396 	/**
       
  3397 	Handles a request from the client. Called by the controller framework.
       
  3398 
       
  3399 	@param  aMessage
       
  3400 	        The message to be handled.
       
  3401 
       
  3402 	@since  7.0s
       
  3403 	*/
       
  3404 	void HandleRequest(TMMFMessage& aMessage);
       
  3405 private:
       
  3406 	/**
       
  3407 	Constructor.
       
  3408 
       
  3409 	@param  aImplementor
       
  3410 	        A reference to the controller plugin that owns this new object.
       
  3411 
       
  3412 	@since  7.0s
       
  3413 	*/
       
  3414 	CMMFVideoRecordControllerCustomCommandParser(MMMFVideoRecordControllerCustomCommandImplementor& aImplementor);
       
  3415 	// Internal request handling methods.
       
  3416 	void DoHandleRequestL(TMMFMessage& aMessage);
       
  3417 	TBool DoSetVideoFormatL(TMMFMessage& aMessage);
       
  3418 	TBool DoSetAudioBitRateL(TMMFMessage& aMessage);
       
  3419 	TBool DoSetVideoBitRateL(TMMFMessage& aMessage);
       
  3420 	TBool DoSetVideoCodecL(TMMFMessage& aMessage);
       
  3421 	TBool DoSetAudioCodecL(TMMFMessage& aMessage);
       
  3422 	TBool DoAddMetaDataEntryL(TMMFMessage& aMessage);
       
  3423 	TBool DoRemoveMetaDataEntryL(TMMFMessage& aMessage);
       
  3424 	TBool DoReplaceMetaDataEntryL(TMMFMessage& aMessage);
       
  3425 	TBool DoSetMaxFileSizeL(TMMFMessage& aMessage);
       
  3426 	TBool DoSetAudioEnabledL(TMMFMessage& aMessage);
       
  3427 	TBool DoSetVideoFrameSizeL(TMMFMessage& aMessage);
       
  3428 	TBool DoPrepareL(TMMFMessage& aMessage);
       
  3429 	TBool DoSetCameraHandleL(TMMFMessage& aMessage);
       
  3430 	TBool DoGetRecordTimeAvailableL(TMMFMessage& aMessage);
       
  3431 
       
  3432 	TBool DoGetSupportedSinkAudioTypesL(TMMFMessage& aMessage);
       
  3433 	TBool DoGetSupportedSinkVideoTypesL(TMMFMessage& aMessage);
       
  3434 
       
  3435 	TInt32 DoCreateBufFromCDesC8ArrayL(CDesC8Array& aArray);
       
  3436 	TBool DoCopyCDesC8ArrayDataL(TMMFMessage& aMessage);
       
  3437 
       
  3438 	TBool DoCopyFourCCArrayDataL(TMMFMessage& aMessage);
       
  3439 	void DoCreateBufFromFourCCArrayL(RArray<TFourCC>& aArray);
       
  3440 	TBool DoGetAudioEnabledL(TMMFMessage& aMessage); // (INC23777)
       
  3441 
       
  3442 private:
       
  3443 	/** 
       
  3444 	The object that implements the video record controller interface 
       
  3445 	*/
       
  3446 	MMMFVideoRecordControllerCustomCommandImplementor& iImplementor;
       
  3447 	CBufFlat* iDataCopyBuffer;
       
  3448 	};
       
  3449 
       
  3450 
       
  3451 
       
  3452 /**
       
  3453 @publishedAll
       
  3454 @released
       
  3455 
       
  3456 Client class to allow the client to specify DRM Intent.
       
  3457 
       
  3458 The class uses the custom command function of the controller plugin, and removes the necessity
       
  3459 for the client to formulate the custom commands.
       
  3460 
       
  3461 @since  7.0s
       
  3462 */
       
  3463 class RMMFVideoDRMExtCustomCommands : public RMMFCustomCommandsBase
       
  3464 	{
       
  3465 public:
       
  3466 
       
  3467 	/**
       
  3468 	Constructor.
       
  3469 
       
  3470 	@param  aController
       
  3471 	        The client side controller object to be used by this custom command interface.
       
  3472 
       
  3473 	@since  7.0s
       
  3474 	*/
       
  3475 	IMPORT_C RMMFVideoDRMExtCustomCommands(RMMFController& aController);
       
  3476 
       
  3477 	/**
       
  3478 	Gets a frame previously requested from the controller.
       
  3479 
       
  3480 	@param  aBitmap
       
  3481 	        The handle of bitmap to retrieve frame to.
       
  3482 	@param  aIntent
       
  3483 	        The DRM Intent to pass in.
       
  3484 	@param  aStatus
       
  3485 	        The active object to call back on.
       
  3486 	*/
       
  3487 	IMPORT_C void GetFrame(CFbsBitmap& aBitmap, ContentAccess::TIntent aIntent, TRequestStatus& aStatus);
       
  3488 
       
  3489 private:
       
  3490 	TPckgBuf<TMMFVideoConfig> iConfigPackage;
       
  3491 	TPckgBuf<ContentAccess::TIntent> iIntentPackage;
       
  3492 	};
       
  3493 
       
  3494 
       
  3495 
       
  3496 /**
       
  3497 @publishedAll
       
  3498 @released
       
  3499 
       
  3500 Mixin class to be derived from controller plugins that could support the DRM Intent
       
  3501 custom commands.
       
  3502 */
       
  3503 class MMMFVideoDRMExtCustomCommandImplementor
       
  3504 	{
       
  3505 public:
       
  3506 
       
  3507 	/**
       
  3508 	Gets a frame previously requested from the controller.
       
  3509 
       
  3510 	@param  aVideoFrame
       
  3511 	        The callback interface to allow the caller to retrieve a bitmap.
       
  3512 	@param  aIntent
       
  3513 	        The DRM Intent to supply.
       
  3514 	*/
       
  3515 	virtual void MvdeGetFrameL(MMMFVideoFrameMessage& aVideoFrame, ContentAccess::TIntent aIntent)=0;
       
  3516 	};
       
  3517 
       
  3518 
       
  3519 /**
       
  3520 @publishedAll
       
  3521 @released
       
  3522 
       
  3523 Client class to provide DRM extensions to video controllers.
       
  3524 
       
  3525 The class uses the custom command function of the controller plugin, and removes the necessity
       
  3526 for the client to formulate the custom commands.
       
  3527 */
       
  3528 class CMMFVideoDRMExtCustomCommandParser : public CMMFCustomCommandParserBase
       
  3529 	{
       
  3530 public:
       
  3531 
       
  3532 	/**
       
  3533 	Creates a new custom command parser capable of DRM Intent controller commands.
       
  3534 
       
  3535 	@param  aImplementor
       
  3536 	        A reference to the controller plugin that owns this new object.
       
  3537 
       
  3538 	@return A pointer to the object created.
       
  3539 
       
  3540 	@since  7.0s
       
  3541 	*/
       
  3542 	IMPORT_C static CMMFVideoDRMExtCustomCommandParser* NewL(MMMFVideoDRMExtCustomCommandImplementor& aImplementor);
       
  3543 
       
  3544 	/**
       
  3545 	Destructor.
       
  3546 
       
  3547 	@since  7.0s
       
  3548 	*/
       
  3549 	IMPORT_C ~CMMFVideoDRMExtCustomCommandParser();
       
  3550 
       
  3551 	/**
       
  3552 	Handles a request from the client. Called by the controller framework.
       
  3553 
       
  3554 	@param  aMessage
       
  3555 	        The message to be handled.
       
  3556 
       
  3557 	@since  7.0s
       
  3558 	*/
       
  3559 	void HandleRequest(TMMFMessage& aMessage);
       
  3560 
       
  3561 private:
       
  3562 	/**
       
  3563 	Constructor.
       
  3564 
       
  3565 	@param  aImplementor
       
  3566 	        A reference to the controller plugin that owns this new object.
       
  3567 	@since  7.0s
       
  3568 	*/
       
  3569 	CMMFVideoDRMExtCustomCommandParser(MMMFVideoDRMExtCustomCommandImplementor& aImplementor);
       
  3570 	// Internal request handling methods.
       
  3571 
       
  3572 	void DoGetFrameL(TMMFMessage& aMessage);
       
  3573 
       
  3574 private:
       
  3575 	MMMFVideoDRMExtCustomCommandImplementor& iImplementor;
       
  3576 	CMMFVideoFrameMessage* iVideoFrameMessage;
       
  3577 	};
       
  3578 
       
  3579 /**
       
  3580 @publishedAll
       
  3581 @released
       
  3582 
       
  3583 Client class to allow the client to register notification .
       
  3584 
       
  3585 The class uses the custom command function of the controller plugin, and removes the necessity
       
  3586 for the client to formulate the custom commands.
       
  3587 
       
  3588 @since  7.0s
       
  3589 */
       
  3590 class RMMFResourceNotificationCustomCommands : public RMMFCustomCommandsBase
       
  3591 	{
       
  3592 public:
       
  3593 	/**
       
  3594 	Constructor.
       
  3595 
       
  3596 	@param  aController
       
  3597 	        The client side controller object to be used by this custom command interface.
       
  3598 
       
  3599 	@since  7.0s
       
  3600 	*/
       
  3601 	IMPORT_C RMMFResourceNotificationCustomCommands(RMMFController& aController);
       
  3602 	
       
  3603 	/**
       
  3604 	Registers the Event for Notification when resource is avaliable.
       
  3605 
       
  3606 	@param aEventType
       
  3607 		The Event to notify the client.
       
  3608 		
       
  3609 	@param aNotificationRegistrationData
       
  3610 		Notification registration specific data.
       
  3611 
       
  3612 	@return An error code indicating if the registration was successful. KErrNone on success, 
       
  3613 		otherwise another of the system-wide error codes.
       
  3614 	*/
       
  3615 	IMPORT_C TInt RegisterAsClient(TUid aEventType,const TDesC8& aNotificationRegistrationData);
       
  3616 	
       
  3617 	/**
       
  3618 	Cancels the registered notification event.
       
  3619 
       
  3620 	@param  aEventType
       
  3621 		The Event to notify the client.
       
  3622 		
       
  3623 	@return An error code indicating if the cancel registration was successful. KErrNone on success, 
       
  3624 		otherwise another of the system-wide error codes.
       
  3625 	*/
       
  3626 	IMPORT_C TInt CancelRegisterAsClient(TUid aEventType);
       
  3627 	
       
  3628 	/**
       
  3629 	Gets the notification data for the event.
       
  3630 	
       
  3631 	@param  aEventType
       
  3632 		The Event to notify the client.
       
  3633 		
       
  3634 	@param aNotificationData
       
  3635 		The Notification data for the client to resume the play.
       
  3636 		
       
  3637 	@return An error code indicating if the get notification data was successful. KErrNone on success, 
       
  3638 		otherwise another of the system-wide error codes.
       
  3639 	*/
       
  3640 	IMPORT_C TInt GetResourceNotificationData(TUid aEventType,TDes8& aNotificationData);
       
  3641 	
       
  3642 	/**
       
  3643 	Waits for the client to resume the play even after the default timer expires.
       
  3644 
       
  3645 	@return An error code indicating if the registration was successful. KErrNone on success, 
       
  3646 			otherwise any of the system-wide error codes.
       
  3647 	*/
       
  3648 	IMPORT_C TInt WillResumePlay();
       
  3649 	};
       
  3650 
       
  3651 /**
       
  3652 @publishedAll
       
  3653 @released
       
  3654 
       
  3655 Mixin class to be derived from controller plugins that could support the audio resource notification
       
  3656 custom commands.
       
  3657 */
       
  3658 class MMMFResourceNotificationCustomCommandImplementor
       
  3659 	{
       
  3660 public:
       
  3661 	/**
       
  3662 	Registers the Event for Notification when resource is available.
       
  3663 
       
  3664 	@param aEventType
       
  3665 		The event which the client is notified of.
       
  3666 		
       
  3667 	@param aNotificationRegistrationData
       
  3668 		Notification registration specific data, which has been reserved for future use.
       
  3669 		
       
  3670 	@leave	This method may leave with one of the system-wide error codes.  KErrNotReady if there is no
       
  3671 			data sink.
       
  3672 	*/
       
  3673 	virtual void MarnRegisterAsClientL(TUid aEventType,const TDesC8& aNotificationRegistrationData) = 0;
       
  3674 	
       
  3675 	/**
       
  3676 	Cancels the registered notification event.
       
  3677 
       
  3678 	@param  aEventType
       
  3679 		The event to cancel.
       
  3680 		
       
  3681 	@leave This method may leave with one of the system-wide error codes.  KErrNotReady if there is no
       
  3682 			data sink.
       
  3683 	*/
       
  3684 	virtual void MarnCancelRegisterAsClientL(TUid aEventType) = 0;
       
  3685 	
       
  3686 	/**
       
  3687 	Gets the notification data for the event.
       
  3688 	
       
  3689 	@param  aEventType
       
  3690 		The event which the client is notified of.
       
  3691 		
       
  3692 	@param aNotificationData
       
  3693 		The Notification data for the client to resume playing.
       
  3694 		
       
  3695 	@leave This method may leave with one of the system-wide error codes.  KErrNotReady if there is no
       
  3696 			data sink, KErrArgument if unable to provide the notification data.
       
  3697 	*/
       
  3698 	virtual void MarnGetResourceNotificationDataL(TUid aEventType,TDes8& aNotificationData) = 0;
       
  3699 	
       
  3700 	/**
       
  3701 	Waits for the client to resume the play even after the default timer expires.
       
  3702 		
       
  3703 	@leave This method may leave with one of the system-wide error codes.  KErrNotReady if there is no
       
  3704 			data sink.
       
  3705 	*/
       
  3706 	virtual void MarnWillResumePlayL() = 0;
       
  3707 	};
       
  3708 
       
  3709 /**
       
  3710 @publishedAll
       
  3711 @released
       
  3712 
       
  3713 Client class to provide Audio resource notification controllers.
       
  3714 
       
  3715 The class uses the custom command function of the controller plugin, and removes the necessity
       
  3716 for the client to formulate the custom commands.
       
  3717 */
       
  3718 class CMMFResourceNotificationCustomCommandParser: public CMMFCustomCommandParserBase
       
  3719 	{
       
  3720 public:	
       
  3721 	/**
       
  3722 	Creates a new custom command parser capable of handling resource notification controller commands.
       
  3723 
       
  3724 	@param  aImplementor
       
  3725 	        A reference to the controller plugin that owns this new object.
       
  3726 
       
  3727 	@return A pointer to the object created.
       
  3728 
       
  3729 	@since  7.0s
       
  3730 	*/
       
  3731 	IMPORT_C static CMMFResourceNotificationCustomCommandParser* NewL(MMMFResourceNotificationCustomCommandImplementor& aImplementor);
       
  3732 	
       
  3733 	/**
       
  3734 	Destructor.
       
  3735 
       
  3736 	@since  7.0s
       
  3737 	*/
       
  3738 	IMPORT_C ~CMMFResourceNotificationCustomCommandParser();
       
  3739 	
       
  3740 	/**
       
  3741 	Handles a request from the client. Called by the controller framework.
       
  3742 
       
  3743 	@param  aMessage
       
  3744 	        The message to be handled.
       
  3745 
       
  3746 	@since  7.0s
       
  3747 	*/
       
  3748 	void HandleRequest(TMMFMessage& aMessage);
       
  3749 
       
  3750 private:
       
  3751 	/**
       
  3752 	Constructor.
       
  3753 
       
  3754 	@param  aImplementor
       
  3755 	        A reference to the controller plugin that owns this new object.
       
  3756 
       
  3757 	@since  7.0s
       
  3758 	*/
       
  3759 	CMMFResourceNotificationCustomCommandParser(MMMFResourceNotificationCustomCommandImplementor& aImplementor);
       
  3760 	void DoHandleRequestL(TMMFMessage& aMessage);
       
  3761 	// Internal request handling methods.
       
  3762 	TBool DoRegisterAsClientL(TMMFMessage& aMessage);
       
  3763 	TBool DoCancelRegisterAsClientL(TMMFMessage& aMessage);
       
  3764 	TBool DoGetResourceNotificationDataL(TMMFMessage& aMessage);
       
  3765 	TBool DoWillResumePlayL(TMMFMessage& aMessage);
       
  3766 private:
       
  3767     MMMFResourceNotificationCustomCommandImplementor& iImplementor;
       
  3768 	};
       
  3769 
       
  3770 
       
  3771 
       
  3772 #endif