epoc32/include/mmf/common/mmfstandardcustomcommands.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #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 @internalComponent
    83 */
    84 enum TMMFAudioResourceNotificationMessages
    85 	{
    86 	EMMFAudioResourceRegisterNotification,
    87 	EMMFAudioResourceCancelRegisterNotification,
    88 	EMMFAudioResourceGetNotificationData,
    89 	EMMFAudioResourceWillResumePlay
    90 	};
    91 
    92 /**
    93 @publishedAll
    94 @released
    95 
    96 Interface UID and messages for the Audio Play Device API.
    97 */
    98 const TUid KUidInterfaceMMFAudioPlayDevice = {0x101F76D6};
    99 
   100 /**
   101 @internalComponent
   102 */
   103 enum TMMFAudioPlayDeviceMessages
   104 	{
   105 	EMMFAudioPlayDeviceSetVolume,
   106 	EMMFAudioPlayDeviceGetMaxVolume,
   107 	EMMFAudioPlayDeviceGetVolume,
   108 	EMMFAudioPlayDeviceSetVolumeRamp,
   109 	EMMFAudioPlayDeviceSetBalance,
   110 	EMMFAudioPlayDeviceGetBalance
   111 	};
   112 
   113 /**
   114 @publishedAll
   115 @released
   116 
   117 Interface UID and messages for the Audio Record Device API.
   118 */
   119 const TUid KUidInterfaceMMFAudioRecordDevice = {0x101F76D7};
   120 
   121 /**
   122 @internalComponent
   123 */
   124 enum TMMFAudioRecordDeviceMessage
   125 	{
   126 	EMMFAudioRecordDeviceSetGain,
   127 	EMMFAudioRecordDeviceGetMaxGain,
   128 	EMMFAudioRecordDeviceGetGain,
   129 	EMMFAudioRecordDeviceSetBalance,
   130 	EMMFAudioRecordDeviceGetBalance
   131 	};
   132 
   133 /**
   134 @publishedAll
   135 @released
   136 
   137 Interface UID and messages for the Audio Play Controller API.
   138 */
   139 const TUid KUidInterfaceMMFAudioPlayController = {0x101F76D8};
   140 
   141 /**
   142 @internalComponent
   143 */
   144 enum TMMFAudioPlayControllerMessages
   145 	{
   146 	EMMFAudioPlayControllerSetPlaybackWindow,
   147 	EMMFAudioPlayControllerDeletePlaybackWindow,
   148 	EMMFAudioPlayControllerGetLoadingProgress
   149 	};
   150 
   151 /**
   152 @publishedAll
   153 @released
   154 
   155 Interface UID and messages for the Audio Record Controller API.
   156 */
   157 const TUid KUidInterfaceMMFAudioRecordController = {0x101F76D9};
   158 
   159 /**
   160 @internalComponent
   161 */
   162 enum TMMFAudioRecordControllerMessages
   163 	{
   164 	EMMFAudioRecordControllerGetRecordTimeAvailable,
   165 	EMMFAudioRecordControllerSetMaxDuration,
   166 	EMMFAudioRecordControllerSetMaxFileSize,
   167 	EMMFAudioRecordControllerCrop,
   168 	EMMFAudioRecordControllerAddMetaDataEntry,
   169 	EMMFAudioRecordControllerRemoveMetaDataEntry,
   170 	EMMFAudioRecordControllerReplaceMetaDataEntry
   171 	};
   172 
   173 /**
   174 @publishedAll
   175 @released
   176 
   177 Interface UID and messages for the Audio Controller API.
   178 */
   179 const TUid KUidInterfaceMMFAudioController = {0x101F76DA};
   180 
   181 /**
   182 @internalComponent
   183 */
   184 enum TMMFAudioControllerMessages
   185 	{
   186 	EMMFAudioControllerSetSourceSampleRate,
   187 	EMMFAudioControllerSetSourceNumChannels,
   188 	EMMFAudioControllerSetSourceFormat,
   189 	EMMFAudioControllerSetSourceBitRate,
   190 	EMMFAudioControllerSetSourceDataType,
   191 	EMMFAudioControllerSetSinkSampleRate,
   192 	EMMFAudioControllerSetSinkNumChannels,
   193 	EMMFAudioControllerSetSinkFormat,
   194 	EMMFAudioControllerSetSinkBitRate,
   195 	EMMFAudioControllerSetSinkDataType,
   196 	EMMFAudioControllerGetSourceSampleRate,
   197 	EMMFAudioControllerGetSourceBitRate,
   198 	EMMFAudioControllerGetSourceNumChannels,
   199 	EMMFAudioControllerGetSourceFormat,
   200 	EMMFAudioControllerGetSourceDataType,
   201 	EMMFAudioControllerGetSinkSampleRate,
   202 	EMMFAudioControllerGetSinkBitRate,
   203 	EMMFAudioControllerGetSinkNumChannels,
   204 	EMMFAudioControllerGetSinkFormat,
   205 	EMMFAudioControllerGetSinkDataType,
   206 	EMMFAudioControllerGetSupportedSourceSampleRates,
   207 	EMMFAudioControllerGetSupportedSourceBitRates,
   208 	EMMFAudioControllerGetSupportedSourceNumChannels,
   209 	EMMFAudioControllerGetSupportedSourceDataTypes,
   210 	EMMFAudioControllerGetSupportedSinkSampleRates,
   211 	EMMFAudioControllerGetSupportedSinkBitRates,
   212 	EMMFAudioControllerGetSupportedSinkNumChannels,
   213 	EMMFAudioControllerGetSupportedSinkDataTypes,
   214 	EMMFAudioControllerCopyArrayData,
   215 	EMMFAudioControllerSetCodec
   216 	};
   217 
   218 
   219 /**
   220 @publishedAll
   221 @released
   222 */
   223 const TUid KUidInterfaceMMFVideoController = {0x101F76DB};
   224 
   225 /**
   226 @internalComponent
   227 */
   228 enum TMMFVideoControllerMessages
   229 	{
   230 	EMMFVideoControllerGetAudioCodec,
   231 	EMMFVideoControllerGetVideoBitRate,
   232 	EMMFVideoControllerGetAudioBitRate,
   233 	EMMFVideoControllerGetVideoFrameSize,
   234 	EMMFVideoControllerSetFrameRate,
   235 	EMMFVideoControllerGetFrameRate,
   236 	EMMFVideoControllerGetVideoMimeType
   237 	};
   238 
   239 /**
   240 @publishedAll
   241 @released
   242 */
   243 const TUid KUidInterfaceMMFVideoPlayController = {0x101F7B73};
   244 
   245 /**
   246 @internalComponent
   247 */
   248 enum TMMFVideoPlayControllerMessages
   249 	{
   250 	EMMFVideoPlayControllerPrepare,
   251 	EMMFVideoPlayControllerGetFrame,
   252 	EMMFVideoPlayControllerSetDisplayWindow,
   253 	EMMFVideoPlayControllerGetAudioEnabled,
   254 	EMMFVideoPlayControllerUpdateDisplayRegion,
   255 	EMMFVideoPlayControllerDSAEvent,
   256 	EMMFVideoPlayControllerPlay,
   257 	EMMFVideoPlayControllerRefreshFrame,
   258 	EMMFVideoPlayControllerGetLoadingProgress,
   259 	EMMFVideoPlayControllerSetRotation,
   260 	EMMFVideoPlayControllerGetRotation,
   261 	EMMFVideoPlayControllerSetScaleFactor,
   262 	EMMFVideoPlayControllerGetScaleFactor,
   263 	EMMFVideoPlayControllerSetCropRegion,
   264 	EMMFVideoPlayControllerGetCropRegion
   265 	};
   266 
   267 /**
   268 @publishedAll
   269 @released
   270 */
   271 const TUid KUidInterfaceMMFVideoRecordController = {0x101F7B74};
   272 
   273 /**
   274 @internalComponent
   275 */
   276 enum TMMFVideoRecordControllerMessages
   277 	{
   278 	EMMFVideoRecordControllerSetVideoFormat,
   279 	EMMFVideoRecordControllerSetVideoCodec,
   280 	EMMFVideoRecordControllerSetAudioCodec,
   281 	EMMFVideoRecordControllerSetVideoBitRate,
   282 	EMMFVideoRecordControllerSetAudioBitRate,
   283 	EMMFVideoRecordControllerSetVideoFrameSize,
   284 	EMMFVideoRecordControllerSetMaxFileSize,
   285 	EMMFVideoRecordControllerAddMetaDataEntry,
   286 	EMMFVideoRecordControllerRemoveMetaDataEntry,
   287 	EMMFVideoRecordControllerReplaceMetaDataEntry,
   288 	EMMFVideoRecordControllerSetAudioEnabled,
   289 	EMMFVideoRecordControllerPrepare,
   290 	EMMFVideoRecordControllerSetCameraHandle,
   291 	EMMFVideoRecordControllerGetRecordTimeAvailable,
   292 	EMMFVideoRecordControllerGetSupportedSinkAudioTypes,
   293 	EMMFVideoRecordControllerGetSupportedSinkVideoTypes,
   294 	EMMFVideoRecordControllerCopyDescriptorArrayData,
   295 	EMMFVideoRecordControllerCopyFourCCArrayData,
   296 	EMMFVideoRecordControllerGetAudioEnabled // INC23777
   297 	};
   298 
   299 /**
   300 @publishedAll
   301 @released
   302 */
   303 const TUid KUidInterfaceMMFVideoDRMExt = {0x101F7C23};
   304 
   305 /**
   306 @internalComponent
   307 */
   308 enum TMMFDRMIntentMessages
   309 	{
   310 	EMMFVideoDRMExtGetFrame
   311 	};
   312 
   313 /**
   314 @publishedAll
   315 @released
   316 
   317 Interface UID for the custom command that supports setting the initial screen for video on the controller.
   318 */
   319 const TUid KUidInterfaceMMFVideoSetInitScreen = {0x102825F7};
   320 
   321 /**
   322 @internalComponent
   323 */
   324 enum TMMFVideoScreenDeviceMessages
   325 	{
   326 	EMMFVideoSetInitScreenNumber
   327 	};
   328 
   329 
   330 /**
   331 @publishedAll
   332 @prototype
   333 */
   334 const TUid KUidInterfaceMMFVideoPixelAspectRatio = {0x102831EF};
   335 
   336 /**
   337 @internalComponent
   338 */
   339 enum TMMFVideoPixelAspectRatioMessages
   340 	{
   341 	EMMFVideoGetPixelAspectRatio,
   342 	EMMFVideoSetPixelAspectRatio,
   343 	EMMFVideoGetSupportedPixelAspectRatios,
   344 	EMMFVideoPixelAspectRatioCopyArrayData
   345 	};
   346 
   347 /**
   348 @publishedAll
   349 @prototype
   350 */
   351 const TUid KUidInterfaceMMFVideoAudioSamplingRateAndChannelConfig = {0x102831F0};
   352 
   353 /**
   354 @internalComponent
   355 */
   356 enum TMMFVideoAudioSamplingRateAndChannelConfigMessages
   357 	{
   358 	EMMFVideoGetAudioChannels,
   359 	EMMFVideoSetAudioChannels,
   360 	EMMFVideoGetSupportedAudioChannels,
   361 	EMMFVideoGetAudioSampleRate,
   362 	EMMFVideoSetAudioSampleRate,
   363 	EMMFVideoGetSupportedAudioSampleRates,
   364 	EMMFVideoAudioSamplingRateAndChannelConfigCopyArrayData
   365 	};
   366 
   367 /**
   368 @publishedAll
   369 @released
   370 
   371 Client class to access Audio Play Device functionality.
   372 
   373 The class uses the custom command function of the controller plugin, and removes the necessity
   374 for the client to formulate the custom commands.
   375 @since 7.0s
   376 */
   377 class RMMFAudioPlayDeviceCustomCommands : public RMMFCustomCommandsBase
   378 	{
   379 public:
   380 
   381 	/**
   382 	Constructor.
   383 
   384 	@param  aController
   385 	        The client side controller object to be used by this custom command interface.
   386 
   387 	@since 7.0s
   388 	*/
   389 	IMPORT_C RMMFAudioPlayDeviceCustomCommands(RMMFController& aController);
   390 
   391 	/**
   392 	Sets the volume of the sound device.
   393 
   394 	@param  aVolume
   395 	        The new volume.
   396 
   397 	@return	One of the system-wide error codes.
   398 
   399 	@since 7.0s
   400 	*/
   401 	IMPORT_C TInt SetVolume(TInt aVolume) const;
   402 
   403 	/**
   404 	Gets the maximum volume supported by the sound device.
   405 
   406 	@param  aMaxVolume
   407 	        The maximum volume, filled in by the controller.
   408 
   409 	@return One of the system-wide error codes.
   410 
   411 	@since  7.0s
   412 	*/
   413 	IMPORT_C TInt GetMaxVolume(TInt& aMaxVolume) const;
   414 
   415 	/**
   416 	Gets the current playback volume.
   417 
   418 	@param  aVolume
   419 	        On return contains the current playback volume.
   420 
   421 	@return One of the system-wide error codes.
   422 
   423 	@since  7.0s
   424 	*/
   425 	IMPORT_C TInt GetVolume(TInt& aVolume) const;
   426 
   427 	/**
   428 	Sets a volume ramp.
   429 
   430 	This will cause the sound device to start playing with zero volume,
   431 	increasing the volume over aRampDuration microseconds.
   432 
   433 	The volume ramp can be removed by setting the ramp duration to zero.
   434 
   435 	@param  aRampDuration
   436 	        The duration over which the volume is to be increased, in microseconds.
   437 
   438 	@return One of the system-wide error codes.
   439 
   440 	@since 7.0s
   441 	*/
   442 	IMPORT_C TInt SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampDuration) const;
   443 
   444 	/**
   445 	Sets the balance between the left and right stereo audio channels.
   446 
   447 	@param  aBalance
   448 	        Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be
   449 	        restored by using KMMFBalanceCenter.
   450 
   451 	@return	One of the system-wide error codes.
   452 
   453 	@since 7.0s
   454 	*/
   455 	IMPORT_C TInt SetBalance(TInt aBalance) const;
   456 
   457 	/**
   458 	Gets the balance between the left and right stereo audio channels.
   459 
   460 	@param  aBalance
   461 	        The current balance, filled in by the controller.
   462 
   463 	@return One of the system-wide error codes.
   464 	
   465 	@since 7.0s
   466 	*/
   467 	IMPORT_C TInt GetBalance(TInt& aBalance) const;
   468 	};
   469 
   470 /**
   471 @publishedAll
   472 @released
   473 
   474 Mixin class to be derived from controller plugins that could support the audio play device
   475 custom commands.
   476 */
   477 class MMMFAudioPlayDeviceCustomCommandImplementor
   478 	{
   479 public:
   480 
   481 	/**
   482 	Sets the volume of the sound device.
   483 
   484 	This function can leave with one of the system-wide error codes. The request will be
   485 	completed with the leave code.
   486 
   487 	@param  aVolume
   488 	        The new volume.
   489 
   490 	@since 7.0s
   491 	*/
   492 	virtual void MapdSetVolumeL(TInt aVolume) = 0;
   493 
   494 	/**
   495 	Gets the maximum volume supported by the sound device.
   496 
   497 	This function can leave with one of the system-wide error codes. The request will be
   498 	completed with the leave code.
   499 
   500 	@param  aMaxVolume
   501 	        The maximum volume, to be filled in by the controller plugin.
   502 
   503 	@since 7.0s
   504 	*/
   505 	virtual void MapdGetMaxVolumeL(TInt& aMaxVolume) = 0;
   506 
   507 	/**
   508 	Gets the current playback volume.
   509 
   510 	This function can leave with one of the system-wide error codes. The request will be
   511 	completed with the leave code.
   512 
   513 	@param  aVolume
   514 	        The volume, to be filled in by the controller.
   515 
   516 	@since 7.0s
   517 	*/
   518 	virtual void MapdGetVolumeL(TInt& aVolume) = 0;
   519 
   520 	/**
   521 	Sets a volume ramp.
   522 
   523 	This will cause the sound device to start playing with zero volume,
   524 	increasing the volume over aRampDuration microseconds.
   525 
   526 	The volume ramp can be removed by setting the ramp duration to zero.
   527 
   528 	This function can leave with one of the system-wide error codes. The request will be
   529 	completed with the leave code.
   530 
   531 	@param  aRampDuration
   532 	        The duration over which the volume is to be increased, in microseconds.
   533 
   534 	@since 7.0s
   535 	*/
   536 	virtual void MapdSetVolumeRampL(const TTimeIntervalMicroSeconds& aRampDuration) = 0;
   537 
   538 	/**
   539 	Sets the balance between the left and right stereo audio channels.
   540 
   541 	This function can leave with one of the system-wide error codes. The request will be
   542 	completed with the leave code.
   543 
   544 	@param  aBalance
   545 	        Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be
   546 	        restored by using KMMFBalanceCenter.
   547 
   548 	@since 7.0s
   549 	*/
   550 	virtual void MapdSetBalanceL(TInt aBalance) = 0;
   551 
   552 	/**
   553 	Gets the balance between the left and right stereo audio channels.
   554 
   555 	This function can leave with one of the system-wide error codes. The request will be
   556 	completed with the leave code.
   557 
   558 	@param  aBalance
   559 	        The current balance, filled in by the controller.
   560 
   561 	@since 7.0s
   562 	*/
   563 	virtual void MapdGetBalanceL(TInt& aBalance) = 0;
   564 	};
   565 
   566 /**
   567 @publishedAll
   568 @released
   569 
   570 Custom command parser class to be used by controller plugins wishing to support
   571 audio play device commands.
   572 
   573 The controller plugin must be derived from MMMFAudioPlayDeviceCustomCommandImplementor
   574 to use this class.
   575 
   576 The controller plugin should create an object of this type and add it to the list of custom
   577 command parsers in the controller framework. See the following example code for details.
   578 
   579 @code
   580 void CMMFAudioController::ConstructL()
   581 	{
   582 	// Construct custom command parsers
   583 	CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
   584 	CleanupStack::PushL(audPlayDevParser);
   585 	AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
   586 	CleanupStack::Pop();//audPlayDevParser
   587 
   588 	CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
   589 	CleanupStack::PushL(audRecDevParser);
   590 	AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
   591 	CleanupStack::Pop();//audRecDevParser
   592 
   593 etc.
   594 	}
   595 @endcode
   596 
   597 @since 7.0s
   598 */
   599 class CMMFAudioPlayDeviceCustomCommandParser : public CMMFCustomCommandParserBase
   600 	{
   601 public:
   602 
   603 	/**
   604 	Creates a new custom command parser capable of handling audio play device commands.
   605 
   606 	This function may leave with one of the system-wide error codes.
   607 
   608 	@param  aImplementor
   609 	        A reference to the controller plugin that owns this new object.
   610 
   611 	@return	A pointer to the object created.
   612 
   613 	@since  7.0s
   614 	*/
   615 	IMPORT_C static CMMFAudioPlayDeviceCustomCommandParser* NewL(MMMFAudioPlayDeviceCustomCommandImplementor& aImplementor);
   616 
   617 	/**
   618 	Destructor.
   619 
   620 	@since  7.0s
   621 	*/
   622 	IMPORT_C ~CMMFAudioPlayDeviceCustomCommandParser();
   623 
   624 	/**
   625 	Handles a request from the client. Called by the controller framework.
   626 
   627 	@param  aMessage
   628 	        The message to be handled.
   629 
   630 	@since  7.0s
   631 	*/
   632 	void HandleRequest(TMMFMessage& aMessage);
   633 private:
   634 
   635 	/**
   636 	Constructor.
   637 
   638 	@param  aImplementor
   639 	        A reference to the controller plugin that owns this new object.
   640 
   641 	@since	7.0s
   642 	*/
   643 	CMMFAudioPlayDeviceCustomCommandParser(MMMFAudioPlayDeviceCustomCommandImplementor& aImplementor);
   644 	// Internal request handling methods.
   645 	void DoHandleRequestL(TMMFMessage& aMessage);
   646 	TBool DoSetVolumeL(TMMFMessage& aMessage);
   647 	TBool DoGetMaxVolumeL(TMMFMessage& aMessage);
   648 	TBool DoGetVolumeL(TMMFMessage& aMessage);
   649 	TBool DoSetVolumeRampL(TMMFMessage& aMessage);
   650 	TBool DoSetBalanceL(TMMFMessage& aMessage);
   651 	TBool DoGetBalanceL(TMMFMessage& aMessage);
   652 private:
   653 	/** The object that implements the audio play device interface */
   654 	MMMFAudioPlayDeviceCustomCommandImplementor& iImplementor;
   655 	};
   656 
   657 /**
   658 @publishedAll
   659 @released
   660 
   661 Client class to access Audio Record Device functionality.
   662 
   663 The class uses the custom command function of the controller plugin, and removes the necessity
   664 for the client to formulate the custom commands.
   665 
   666 @since 7.0s
   667 */
   668 class RMMFAudioRecordDeviceCustomCommands : public RMMFCustomCommandsBase
   669 	{
   670 public:
   671 	
   672 	/**
   673 	Constructor.
   674 
   675 	@param  aController
   676 	        The client side controller object to be used by this custom command interface.
   677 
   678 	@since 7.0s
   679 	*/
   680 	IMPORT_C RMMFAudioRecordDeviceCustomCommands(RMMFController& aController);
   681 
   682 	/**
   683 	Sets the gain of the sound device.
   684 
   685 	@param  aGain
   686 	        The new gain.
   687 
   688 	@return One of the system-wide error codes.
   689 
   690 	@since 7.0s
   691 	*/
   692 	IMPORT_C TInt SetGain(TInt aGain) const;
   693 
   694 	/**
   695 	Gets the maximum gain supported by the sound device.
   696 
   697 	@param  aMaxGain
   698 	        The maximum gain, filled in by the controller.
   699 
   700 	@return One of the system-wide error codes.
   701 
   702 	@since 7.0s
   703 	*/
   704 	IMPORT_C TInt GetMaxGain(TInt& aMaxGain) const;
   705 
   706 	/**
   707 	Gets the current recording gain.
   708 
   709 	@param  aGain
   710 	        The gain, filled in by the controller.
   711 
   712 	@return One of the system-wide error codes.
   713 
   714 	@since  7.0s
   715 	*/
   716 	IMPORT_C TInt GetGain(TInt& aGain) const;
   717 
   718 	/**
   719 	Sets the balance between the left and right stereo microphone channels.
   720 
   721 	@param  aBalance
   722 	        Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be 
   723 	        restored by using KMMFBalanceCenter.
   724 
   725 	@return One of the system-wide error codes.
   726 
   727 	@since 7.0s
   728 	*/
   729 	IMPORT_C TInt SetBalance(TInt aBalance) const;
   730 
   731 	/**
   732 	Gets the balance between the left and right stereo microphone channels.
   733 
   734 	@param  aBalance
   735 	        The current balance, filled in by the controller.
   736 
   737 	@return One of the system-wide error codes.
   738 
   739 	@since  7.0s
   740 	*/
   741 	IMPORT_C TInt GetBalance(TInt& aBalance) const;
   742 	};
   743 
   744 /**
   745 @publishedAll
   746 @released
   747 
   748 Mixin class to be derived from controller plugins that could support the audio record device
   749 custom commands.
   750 */
   751 class MMMFAudioRecordDeviceCustomCommandImplementor
   752 	{
   753 public:
   754 
   755 	/**
   756 	Sets the gain of the sound device.
   757 
   758 	This function can leave with one of the system-wide error codes. The request will be
   759 	completed with the leave code.
   760 
   761 	@param  aGain
   762 	        The new gain.
   763 
   764 	@since 7.0s
   765 	*/
   766 	virtual void MardSetGainL(TInt aGain) = 0;
   767 
   768 	/**
   769 	Gets the maximum gain supported by the sound device.
   770 
   771 	This function can leave with one of the system-wide error codes. The request will be
   772 	completed with the leave code.
   773 
   774 	@param  aMaxGain
   775 	        The maximum gain, to be filled in by the controller plugin.
   776 
   777 	@since 7.0s
   778 	*/
   779 	virtual void MardGetMaxGainL(TInt& aMaxGain) = 0;
   780 
   781 	/**
   782 	Gets the current recording gain.
   783 
   784 	This function can leave with one of the system-wide error codes. The request will be
   785 	completed with the leave code.
   786 
   787 	@param  aGain
   788 	        The gain, to be filled in by the controller.
   789 
   790 	@since 7.0s
   791 	*/
   792 	virtual void MardGetGainL(TInt& aGain) = 0;
   793 
   794 	/**
   795 	Sets the balance between the left and right stereo microphone channels.
   796 
   797 	This function can leave with one of the system-wide error codes. The request will be
   798 	completed with the leave code.
   799 
   800 	@param  aBalance
   801 	        Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be
   802 	        restored by using KMMFBalanceCenter.
   803 
   804 	@since 7.0s
   805 	*/
   806 	virtual void MardSetBalanceL(TInt aBalance) = 0;
   807 
   808 	/**
   809 	Gets the balance between the left and right stereo microphone channels.
   810 
   811 	This function can leave with one of the system-wide error codes. The request will be
   812 	completed with the leave code.
   813 
   814 	@param  aBalance
   815 	        The current balance, filled in by the controller.
   816 
   817 	@since 7.0s
   818 	*/
   819 	virtual void MardGetBalanceL(TInt& aBalance) = 0;
   820 	};
   821 
   822 /**
   823 @publishedAll
   824 @released
   825 
   826 Custom command parser class to be used by controller plugins wishing to support
   827 audio record device commands.
   828 
   829 The controller plugin must be derived from MMMFAudioRecordDeviceCustomCommandImplementor
   830 to use this class.
   831 
   832 The controller plugin should create an object of this type and add it to the list of custom
   833 command parsers in the controller framework.  See the following example code for details.
   834 
   835 @code
   836 void CMMFAudioController::ConstructL()
   837 	{
   838 	// Construct custom command parsers
   839 	CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
   840 	CleanupStack::PushL(audPlayDevParser);
   841 	AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
   842 	CleanupStack::Pop();//audPlayDevParser
   843 
   844 	CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
   845 	CleanupStack::PushL(audRecDevParser);
   846 	AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
   847 	CleanupStack::Pop();//audRecDevParser
   848 
   849 etc.
   850 	}
   851 @endcode
   852 
   853 @since 7.0s
   854 */
   855 class CMMFAudioRecordDeviceCustomCommandParser : public CMMFCustomCommandParserBase
   856 	{
   857 public:
   858 
   859 	/**
   860 	Creates a new custom command parser capable of handling audio record device commands.
   861 
   862 	This function may leave with one of the system-wide error codes.
   863 
   864 	@param  aImplementor
   865 	        A reference to the controller plugin that owns this new object.
   866 
   867 	@return A pointer to the object created.
   868 
   869 	@since	7.0s
   870 	*/
   871 	IMPORT_C static CMMFAudioRecordDeviceCustomCommandParser* NewL(MMMFAudioRecordDeviceCustomCommandImplementor& aImplementor);
   872 
   873 	/**
   874 	Destructor.
   875 
   876 	@since  7.0s
   877 	*/
   878 	IMPORT_C ~CMMFAudioRecordDeviceCustomCommandParser();
   879 
   880 	/**
   881 	Handles a request from the client. Called by the controller framework.
   882 
   883 	@param  aMessage
   884 	        The message to be handled.
   885 
   886 	@since	7.0s
   887 	*/
   888 	void HandleRequest(TMMFMessage& aMessage);
   889 private:
   890 
   891 	/**
   892 	Constructor.
   893 
   894 	@param  aImplementor
   895 	        A reference to the controller plugin that owns this new object.
   896 
   897 	@since	7.0s
   898 	*/
   899 	CMMFAudioRecordDeviceCustomCommandParser(MMMFAudioRecordDeviceCustomCommandImplementor& aImplementor);
   900 	// Internal request handling methods.
   901 	void DoHandleRequestL(TMMFMessage& aMessage);
   902 	TBool DoSetGainL(TMMFMessage& aMessage);
   903 	TBool DoGetMaxGainL(TMMFMessage& aMessage);
   904 	TBool DoGetGainL(TMMFMessage& aMessage);
   905 	TBool DoSetBalanceL(TMMFMessage& aMessage);
   906 	TBool DoGetBalanceL(TMMFMessage& aMessage);
   907 private:
   908 	/** The object that implements the audio record device interface */
   909 	MMMFAudioRecordDeviceCustomCommandImplementor& iImplementor;
   910 	};
   911 
   912 
   913 /**
   914 @publishedAll
   915 @released
   916 
   917 Client class to access functionality specific to an audio play controller.
   918 
   919 The class uses the custom command function of the controller plugin, and removes the necessity
   920 for the client to formulate the custom commands.
   921 
   922 @since 7.0s
   923 */
   924 class RMMFAudioPlayControllerCustomCommands : public RMMFCustomCommandsBase
   925 	{
   926 public:
   927 	
   928 	/**
   929 	Constructor.
   930 
   931 	@param  aController
   932 	        The client side controller object to be used by this custom command interface.
   933 
   934 	@since  7.0s
   935 	*/
   936 	IMPORT_C RMMFAudioPlayControllerCustomCommands(RMMFController& aController);
   937 
   938 	/**
   939 	Sets a playback window.  The controller will start playing from the start of the window,
   940 	and finish playing at the end of the window.
   941 
   942 	@param  aStart
   943 	        The start of the window, in microseconds.
   944 	@param  aEnd
   945 	        The end of the window, in microseconds.
   946 
   947 	@return One of the system-wide error codes.
   948 
   949 	@since 7.0s
   950 	*/
   951 	IMPORT_C TInt SetPlaybackWindow(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) const;
   952 
   953 	/**
   954 	Removes a previously defined playback window.
   955 
   956 	@return One of the system-wide error codes.
   957 	@since 7.0s
   958 	*/
   959 	IMPORT_C TInt DeletePlaybackWindow();
   960 
   961 	/**
   962 	Gets the audio loading progress as a percentage.
   963 
   964 	@param  aPercentageProgress
   965 	        The progress loading the clip, as a percentage.
   966 
   967 	@return One of the system-wide error codes.
   968 
   969 	@since 7.0s
   970 	*/
   971 	IMPORT_C TInt GetLoadingProgress(TInt& aPercentageProgress) const;
   972 	};
   973 
   974 
   975 /**
   976 @publishedAll
   977 @released
   978 
   979 Mixin class to be derived from controller plugins that could support the audio play controller
   980 custom commands.
   981 */
   982 class MMMFAudioPlayControllerCustomCommandImplementor
   983 	{
   984 public:
   985 
   986 	/**
   987 	Sets a playback window. The controller will start playing from the start of the window,
   988 	and finish playing at the end of the window.
   989 
   990 	This function can leave with one of the system-wide error codes. The request will be
   991 	completed with the leave code.
   992 
   993 	@param  aStart
   994 	        The start of the window, in microseconds.
   995 	@param  aEnd
   996 	        The end of the window, in microseconds.
   997 
   998 	@since 7.0s
   999 	*/
  1000 	virtual void MapcSetPlaybackWindowL(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) = 0;
  1001 
  1002 	/**
  1003 	Removes a previously defined playback window.
  1004 
  1005 	This function can leave with one of the system-wide error codes. The request will be
  1006 	completed with the leave code.
  1007 
  1008 	@since 7.0s
  1009 	*/
  1010 	virtual void MapcDeletePlaybackWindowL() = 0;
  1011 
  1012 	/**
  1013 	Gets the completion status of loading/rebuffering the current audio clip.
  1014 
  1015 	This function can leave with one of the system-wide error codes. The request will be
  1016 	completed with the leave code.
  1017 
  1018 	@param  aPercentageComplete
  1019 	        The status of loading as a percentage completed.
  1020 
  1021 	@since 7.0s
  1022 	*/
  1023 	virtual void MapcGetLoadingProgressL(TInt& aPercentageComplete) = 0;
  1024 	};
  1025 
  1026 /**
  1027 @publishedAll
  1028 @released
  1029 
  1030 Custom command parser class to be used by controller plugins wishing to support
  1031 audio play controller commands.
  1032 
  1033 The controller plugin must be derived from MMMFAudioPlayControllerCustomCommandImplementor to use 
  1034 this class.
  1035 
  1036 The controller plugin should create an object of this type and add it to the list of custom
  1037 command parsers in the controller framework. See the following example code for details.
  1038 
  1039 @code
  1040 void CMMFAudioController::ConstructL()
  1041 	{
  1042 	// Construct custom command parsers
  1043 	CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
  1044 	CleanupStack::PushL(audPlayDevParser);
  1045 	AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
  1046 	CleanupStack::Pop();//audPlayDevParser
  1047 
  1048 	CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
  1049 	CleanupStack::PushL(audRecDevParser);
  1050 	AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
  1051 	CleanupStack::Pop();//audRecDevParser
  1052 
  1053 etc.
  1054 	}
  1055 @endcode
  1056 
  1057 @since  7.0s
  1058 */
  1059 class CMMFAudioPlayControllerCustomCommandParser : public CMMFCustomCommandParserBase
  1060 	{
  1061 public:
  1062 
  1063 	/**
  1064 	Creates a new custom command parser capable of handling audio play controller commands.
  1065 
  1066 	@param  aImplementor
  1067 	        A reference to the controller plugin that owns this new object.
  1068 
  1069 	@return A pointer to the object created.
  1070 
  1071 	@since	7.0s
  1072 	*/
  1073 	IMPORT_C static CMMFAudioPlayControllerCustomCommandParser* NewL(MMMFAudioPlayControllerCustomCommandImplementor& aImplementor);
  1074 
  1075 	/**
  1076 	Destructor.
  1077 
  1078 	@since 7.0s
  1079 	*/
  1080 	IMPORT_C ~CMMFAudioPlayControllerCustomCommandParser();
  1081 
  1082 	/**
  1083 	Handles a request from the client. Called by the controller framework.
  1084 
  1085 	@param  aMessage
  1086 	        The message to be handled.
  1087 
  1088 	@since  7.0s
  1089 	*/
  1090 	void HandleRequest(TMMFMessage& aMessage);
  1091 private:
  1092 
  1093 	/**
  1094 	Constructor.
  1095 
  1096 	@param  aImplementor
  1097 	        A reference to the controller plugin that owns this new object.
  1098 
  1099 	@since	7.0s
  1100 	*/
  1101 	CMMFAudioPlayControllerCustomCommandParser(MMMFAudioPlayControllerCustomCommandImplementor& aImplementor);
  1102 	// Internal request handling methods.
  1103 	void DoHandleRequestL(TMMFMessage& aMessage);
  1104 	TBool DoSetPlaybackWindowL(TMMFMessage& aMessage);
  1105 	TBool DoDeletePlaybackWindowL(TMMFMessage& aMessage);
  1106 	TBool DoGetLoadingProgressL(TMMFMessage& aMessage);
  1107 private:
  1108 	/** 
  1109 	The object that implements the audio play controller interface 
  1110 	*/
  1111 	MMMFAudioPlayControllerCustomCommandImplementor& iImplementor;
  1112 	};
  1113 
  1114 
  1115 
  1116 
  1117 /**
  1118 @publishedAll
  1119 @released
  1120 
  1121 Client class to access functionality specific to an audio record controller.
  1122 
  1123 The class uses the custom command function of the controller plugin, and removes the necessity
  1124 for the client to formulate the custom commands.
  1125 
  1126 @since  7.0s
  1127 */
  1128 class RMMFAudioRecordControllerCustomCommands : public RMMFCustomCommandsBase
  1129 	{
  1130 public:
  1131 
  1132 	/**
  1133 	Constructor.
  1134 
  1135 	@param  aController
  1136 	        The client side controller object to be used by this custom command	interface.
  1137 
  1138 	@since  7.0s
  1139 	*/
  1140 	IMPORT_C RMMFAudioRecordControllerCustomCommands(RMMFController& aController);
  1141 
  1142 	/**
  1143 	Gets the (possibly estimated) record time left in the clip.
  1144 
  1145 	@param  aTime
  1146 	        The record time available, in microseconds.
  1147 
  1148 	@return One of the system-wide error codes.
  1149 
  1150 	@since 7.0s
  1151 	*/
  1152 	IMPORT_C TInt GetRecordTimeAvailable(TTimeIntervalMicroSeconds& aTime) const;
  1153 
  1154 	/**
  1155 	Sets the maximum duration of the recorded clip, in microseconds.
  1156 
  1157 	@param  aMaxDuration
  1158 	        The maximum duration of the recorded clip, in microseconds.
  1159 
  1160 	@return One of the system-wide error codes.
  1161 
  1162 	@since 7.0s
  1163 	*/
  1164 	IMPORT_C TInt SetMaxDuration(const TTimeIntervalMicroSeconds& aMaxDuration) const;
  1165 
  1166 	/**
  1167 	Sets the maximum size of the recorded clip, in bytes.
  1168 
  1169 	@param  aMaxSize
  1170 	        The maximum size of the recorded clip, in bytes.
  1171 
  1172 	@return One of the system-wide error codes.
  1173 
  1174 	@since 7.0s
  1175 	*/
  1176 	IMPORT_C TInt SetMaxFileSize(TInt aMaxSize) const;
  1177 
  1178 	/**
  1179 	Removes a portion from the clip, either from the current position to the beginning or the 
  1180 	current position to the end.
  1181 
  1182 	@param  aToEnd
  1183 	        A boolean indicating whether to crop to the end. Crops to the end if set to ETrue, to 
  1184 			the beginning set to EFalse.
  1185 
  1186 	@return One of the system-wide error codes.
  1187 
  1188 	@since  7.0s
  1189 	*/
  1190 	IMPORT_C TInt Crop(TBool aToEnd);
  1191 
  1192 	/**
  1193 	Adds meta data to the clip.
  1194 
  1195 	@param  aNewEntry
  1196 	        The details of the new entry to be added.
  1197 
  1198 	@since 7.0s
  1199 	*/
  1200 	IMPORT_C void AddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry);
  1201 
  1202 	/**
  1203 	Removes a meta data entry from the clip.
  1204 
  1205 	@param  aIndex
  1206 	        The ID of the meta data entry to delete.
  1207 
  1208 	@return One of the system-wide error codes.
  1209 
  1210 	@since  7.0s
  1211 	*/
  1212 	IMPORT_C TInt RemoveMetaDataEntry(TInt aIndex);
  1213 
  1214 	/**
  1215 	Replaces a meta data in the clip.
  1216 
  1217 	@param  aIndex
  1218 	        The ID of the meta data entry to replace.
  1219 	@param  aNewEntry
  1220 	        The details of the new entry to be added.
  1221 
  1222 	@since 7.0s
  1223 	*/
  1224 	IMPORT_C void ReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry);
  1225 	};
  1226 
  1227 /**
  1228 @publishedAll
  1229 @released
  1230 
  1231 Mixin class to be derived from controller plugins that could support the audio record controller
  1232 custom commands.
  1233 */
  1234 class MMMFAudioRecordControllerCustomCommandImplementor
  1235 	{
  1236 public:
  1237 
  1238 	/**
  1239 	Gets the (possibly estimated) record time left in the clip.
  1240 
  1241 	This function can leave with one of the system-wide error codes. The request will be
  1242 	completed with the leave code.
  1243 
  1244 	@param  aTime
  1245 	        The record time available, in microseconds.
  1246 
  1247 	@since 7.0s
  1248 	*/
  1249 	virtual void MarcGetRecordTimeAvailableL(TTimeIntervalMicroSeconds& aTime) = 0;
  1250 
  1251 	/**
  1252 	Sets the maximum duration of the recorded clip, in microseconds.
  1253 
  1254 	This function can leave with one of the system-wide error codes. The request will be
  1255 	completed with the leave code.
  1256 
  1257 	@param  aMaxDuration
  1258 	        The maximum duration of the recorded clip, in microseconds.
  1259 
  1260 	@since 7.0s
  1261 	*/
  1262 	virtual void MarcSetMaxDurationL(const TTimeIntervalMicroSeconds& aMaxDuration) = 0;
  1263 
  1264 	/**
  1265 	Sets the maximum size of the recorded clip, in bytes.
  1266 
  1267 	This function can leave with one of the system-wide error codes. The request will be
  1268 	completed with the leave code.
  1269 
  1270 	@param  aMaxSize
  1271 	        The maximum size of the recorded clip, in bytes.
  1272 
  1273 	@since 7.0s
  1274 	*/
  1275 	virtual void MarcSetMaxFileSizeL(TInt aMaxSize) = 0;
  1276 
  1277 	/**
  1278 	Removes a portion from the clip, either from the current position to the beginning
  1279 	or the current position to the end.
  1280 
  1281 	This function can leave with one of the system-wide error codes. The request will be
  1282 	completed with the leave code.
  1283 
  1284 	@param  aToEnd
  1285 	        A boolean indicating whether to crop to the end or the beginning. ETrue to crop to the
  1286 	        end, EFalse to the beginning.
  1287 
  1288 	@since 7.0s
  1289 	*/
  1290 	virtual void MarcCropL(TBool aToEnd) = 0;
  1291 
  1292 	/**
  1293 	Adds meta data to the clip.
  1294 
  1295 	@param  aNewEntry
  1296 	        The details of the new entry to be added.
  1297 
  1298 	@since 7.0s
  1299 	*/
  1300 	virtual void MarcAddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry) = 0;
  1301 
  1302 	/**
  1303 	Removes a meta data entry from the clip.
  1304 
  1305 	@param  aIndex
  1306 	        The ID of the meta data entry to delete.
  1307 
  1308 	@since 7.0s
  1309 	*/
  1310 	virtual void MarcRemoveMetaDataEntryL(TInt aIndex) = 0;
  1311 
  1312 	/**
  1313 	Replaces a meta data entry in the clip.
  1314 
  1315 	@param  aIndex
  1316 	        The ID of the meta data entry to replace.
  1317 	@param  aNewEntry
  1318 	        The details of the new entry to be added.
  1319 
  1320 	@since 7.0s
  1321 	*/
  1322 	virtual void MarcReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry) = 0;
  1323 	};
  1324 
  1325 /**
  1326 @publishedAll
  1327 @released
  1328 
  1329 Custom command parser class to be used by controller plugins wishing to support
  1330 audio record controller commands.
  1331 
  1332 The controller plugin must be derived from MMMFAudioRecordControllerCustomCommandImplementor
  1333 to use this class.
  1334 
  1335 The controller plugin should create an object of this type and add it to the list of custom
  1336 command parsers in the controller framework.  See the following example code for details.
  1337 
  1338 @code
  1339 void CMMFAudioController::ConstructL()
  1340 	{
  1341 	// Construct custom command parsers
  1342 	CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
  1343 	CleanupStack::PushL(audPlayDevParser);
  1344 	AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
  1345 	CleanupStack::Pop();//audPlayDevParser
  1346 
  1347 	CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
  1348 	CleanupStack::PushL(audRecDevParser);
  1349 	AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
  1350 	CleanupStack::Pop();//audRecDevParser
  1351 
  1352 etc.
  1353 	}
  1354 @endcode
  1355 
  1356 @since 7.0s
  1357 */
  1358 class CMMFAudioRecordControllerCustomCommandParser : public CMMFCustomCommandParserBase
  1359 	{
  1360 public:
  1361 
  1362 	/**
  1363 	Creates a new custom command parser capable of handling audio record controller commands.
  1364 
  1365 	@param  aImplementor
  1366 	        A reference to the controller plugin that owns this new object.
  1367 
  1368 	@return A pointer to the object created.
  1369 
  1370 	@since  7.0s
  1371 	*/
  1372 	IMPORT_C static CMMFAudioRecordControllerCustomCommandParser* NewL(MMMFAudioRecordControllerCustomCommandImplementor& aImplementor);
  1373 
  1374 	/**
  1375 	Destructor.
  1376 
  1377 	@since  7.0s
  1378 	*/
  1379 	IMPORT_C ~CMMFAudioRecordControllerCustomCommandParser();
  1380 
  1381 	/**
  1382 	Handles a request from the client. Called by the controller framework.
  1383 	
  1384 	@param  aMessage
  1385 	        The message to be handled.
  1386 
  1387 	@since	7.0s
  1388 	*/
  1389 	void HandleRequest(TMMFMessage& aMessage);
  1390 private:
  1391 
  1392 	/**
  1393 	Constructor.
  1394 
  1395 	@param  aImplementor
  1396 	        A reference to the controller plugin that owns this new object.
  1397 
  1398 	@since  7.0s
  1399 	*/
  1400 	CMMFAudioRecordControllerCustomCommandParser(MMMFAudioRecordControllerCustomCommandImplementor& aImplementor);
  1401 	// Internal request handling methods.
  1402 	void DoHandleRequestL(TMMFMessage& aMessage);
  1403 	TBool DoGetRecordTimeAvailableL(TMMFMessage& aMessage);
  1404 	TBool DoSetMaxDurationL(TMMFMessage& aMessage);
  1405 	TBool DoSetMaxFileSizeL(TMMFMessage& aMessage);
  1406 	TBool DoCropL(TMMFMessage& aMessage);
  1407 	TBool DoAddMetaDataEntryL(TMMFMessage& aMessage);
  1408 	TBool DoRemoveMetaDataEntryL(TMMFMessage& aMessage);
  1409 	TBool DoReplaceMetaDataEntryL(TMMFMessage& aMessage);
  1410 private:
  1411 	/**	
  1412 	The object that implements the audio record controller interface.
  1413 	*/
  1414 	MMMFAudioRecordControllerCustomCommandImplementor& iImplementor;
  1415 	};
  1416 
  1417 
  1418 /**
  1419 @publishedAll
  1420 @released
  1421 
  1422 Client class to access functionality specific to an audio controller.
  1423 
  1424 The class uses the custom command function of the controller plugin, and removes the necessity
  1425 for the client to formulate the custom commands.
  1426 
  1427 @since  7.0s
  1428 */
  1429 class RMMFAudioControllerCustomCommands : public RMMFCustomCommandsBase
  1430 	{
  1431 public:
  1432 
  1433 	/**
  1434 	Constructor.
  1435 
  1436 	@param  aController
  1437 	        The client side controller object to be used by this custom command
  1438 	        interface.
  1439 
  1440 	@since  7.0s
  1441 	*/
  1442 	IMPORT_C RMMFAudioControllerCustomCommands(RMMFController& aController);
  1443 
  1444 	/**
  1445 	Sets the sample rate of the data source in samples per second.
  1446 
  1447 	@param  aSampleRate
  1448 	        The sample rate, in samples per second.
  1449 
  1450 	@return One of the system-wide error codes.
  1451 
  1452 	@since  7.0s
  1453 	*/
  1454 	IMPORT_C TInt SetSourceSampleRate(TUint aSampleRate) const;
  1455 
  1456 	/**
  1457 	Sets the bit rate of the data source in bits per second.
  1458 
  1459 	@param  aRate
  1460 	        The bit rate, in bits per second.
  1461 
  1462 	@return One of the system-wide error codes.
  1463 
  1464 	@since 7.0s
  1465 	*/
  1466 	IMPORT_C TInt SetSourceBitRate(TUint aRate) const;
  1467 
  1468 	/**
  1469 	Sets the number of channels in the data source.	For example, one channel for mono, two channels 
  1470 	for stereo etc.
  1471 
  1472 	@param  aNumChannels
  1473 	        The number of channels.
  1474 
  1475 	@return One of the system-wide error codes.
  1476 
  1477 	@since 7.0s
  1478 	*/
  1479 	IMPORT_C TInt SetSourceNumChannels(TUint aNumChannels) const;
  1480 
  1481 	/**
  1482 	Sets the format of the data source.
  1483 
  1484 	The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin to be used.
  1485 
  1486 	@param  aFormatUid
  1487 	        The format plugin to be used.
  1488 
  1489 	@return One of the system-wide error codes.
  1490 
  1491 	@since  7.0s
  1492 	*/
  1493 	IMPORT_C TInt SetSourceFormat(TUid aFormatUid) const;
  1494 
  1495 	/**
  1496 	Sets the fourCC code of the source.
  1497 
  1498 	@param  aDataType
  1499 	        The fourCC code.
  1500 
  1501 	@return One of the system-wide error codes.
  1502 
  1503 	@since  7.0s
  1504 	*/
  1505 	IMPORT_C TInt SetSourceDataType(TFourCC aDataType) const;
  1506 
  1507 	/**
  1508 	Sets the sample rate of the data sink in samples per second.
  1509 
  1510 	@param  aSampleRate
  1511 	        The sample rate, in samples per second.
  1512 
  1513 	@return One of the system-wide error codes.
  1514 
  1515 	@since 7.0s
  1516 	*/
  1517 	IMPORT_C TInt SetSinkSampleRate(TUint aSampleRate) const;
  1518 
  1519 	/**
  1520 	Set the bit rate of the data sink in bits per second.
  1521 
  1522 	@param  aRate
  1523 	        The bit rate, in bits per second.
  1524 
  1525 	@return One of the system-wide error codes.
  1526 
  1527 	@since 7.0s
  1528 	*/
  1529 	IMPORT_C TInt SetSinkBitRate(TUint aRate) const;
  1530 
  1531 	/**
  1532 	Sets the number of channels in the data sink. For example, one channel for mono, two channels 
  1533 	for stereo etc.
  1534 
  1535 	@param  aNumChannels
  1536 	        The number of channels.
  1537 
  1538 	@return One of the system-wide error codes.
  1539 
  1540 	@since  7.0s
  1541 	*/
  1542 	IMPORT_C TInt SetSinkNumChannels(TUint aNumChannels) const;
  1543 
  1544 	/**
  1545 	Sets the format of the data sink.
  1546 
  1547 	The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin to be used.
  1548 
  1549 	@param  aFormatUid
  1550 	        The format plugin to be used.
  1551 
  1552 	@return One of the system-wide error codes.
  1553 
  1554 	@since  7.0s
  1555 	*/
  1556 	IMPORT_C TInt SetSinkFormat(TUid aFormatUid) const;
  1557 
  1558 	/**
  1559 	Set the fourCC code of the sink.
  1560 
  1561 	@param  aDataType
  1562 	        The fourCC code.
  1563 
  1564 	@return One of the system-wide error codes.
  1565 
  1566 	@since 7.0s
  1567 	*/
  1568 	IMPORT_C TInt SetSinkDataType(TFourCC aDataType) const;
  1569 
  1570 	/**
  1571 	Sets the codec to be used. Useful when recording data.
  1572 
  1573 	@param  aSourceDataType
  1574 	        The data type of the source of the codec.
  1575 	@param  aSinkDataType
  1576 	        The data type of the sink of the codec.
  1577 
  1578 	@return One of the system-wide error codes.
  1579 
  1580 	@since  7.0s
  1581 	*/
  1582 	IMPORT_C TInt SetCodec(TFourCC aSourceDataType, TFourCC aSinkDataType) const;
  1583 
  1584 	/**
  1585 	Gets the sample rate of the data source in samples per second.
  1586 
  1587 	@param  aRate
  1588 	        The sample rate, in samples per second.
  1589 
  1590 	@return One of the system-wide error codes.
  1591 
  1592 	@since  7.0s
  1593 	*/
  1594 	IMPORT_C TInt GetSourceSampleRate(TUint& aRate) const;
  1595 
  1596 	/**
  1597 	Gets the bit rate of the data source in bits per second.
  1598 
  1599 	@param  aRate
  1600 	        The bit rate, in bits per second.
  1601 	
  1602 	@return One of the system-wide error codes.
  1603 
  1604 	@since  7.0s
  1605 	*/
  1606 	IMPORT_C TInt GetSourceBitRate(TUint& aRate) const;
  1607 
  1608 	/**
  1609 	Gets the number of channels in the data source. For example, one channel for mono, two channels 
  1610 	for stereo etc.
  1611 
  1612 	@param  aNumChannels
  1613 	        The number of channels.
  1614 
  1615 	@return One of the system-wide error codes.
  1616 
  1617 	@since  7.0s
  1618 	*/
  1619 	IMPORT_C TInt GetSourceNumChannels(TUint& aNumChannels) const;
  1620 
  1621 	/**
  1622 	Gets the format of the data source.
  1623 
  1624 	The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin being used.
  1625 
  1626 	@param  aFormat
  1627 	        The format plugin being used.
  1628 
  1629 	@return One of the system-wide error codes.
  1630 
  1631 	@since  7.0s
  1632 	*/
  1633 	IMPORT_C TInt GetSourceFormat(TUid& aFormat) const;
  1634 
  1635 	/**
  1636 	Get the fourCC code of the source.
  1637 
  1638 	@param  aDataType
  1639 	        The fourCC code.
  1640 
  1641 	@return One of the system-wide error codes.
  1642 
  1643 	@since  7.0s
  1644 	*/
  1645 	IMPORT_C TInt GetSourceDataType(TFourCC& aDataType) const;
  1646 
  1647 	/**
  1648 	Gets the sample rate of the data sink in samples per second.
  1649 
  1650 	@param  aRate
  1651 	        The sample rate, in samples per second.
  1652 
  1653 	@return One of the system-wide error codes.
  1654 
  1655 	@since  7.0s
  1656 	*/
  1657 	IMPORT_C TInt GetSinkSampleRate(TUint& aRate) const;
  1658 
  1659 	/**
  1660 	Gets the bit rate of the data sink in bits per second.
  1661 
  1662 	@param  aRate
  1663 	        The bit rate, in bits per second.
  1664 
  1665 	@return One of the system-wide error codes.
  1666 
  1667 	@since  7.0s
  1668 	*/
  1669 	IMPORT_C TInt GetSinkBitRate(TUint& aRate) const;
  1670 
  1671 	/**
  1672 	Gets the number of channels in the data sink. For example, one channel for mono, two channels 
  1673 	for stereo etc.
  1674 
  1675 	@param  aNumChannels
  1676 	        The number of channels.
  1677 
  1678 	@return One of the system-wide error codes.
  1679 
  1680 	@since  7.0s
  1681 	*/
  1682 	IMPORT_C TInt GetSinkNumChannels(TUint& aNumChannels) const;
  1683 
  1684 	/**
  1685 	Gets the format of the data sink.
  1686 
  1687 	The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin being used.
  1688 
  1689 	@param  aFormat
  1690 	        The format plugin being used.
  1691 
  1692 	@return One of the system-wide error codes.
  1693 
  1694 	@since  7.0s
  1695 	*/
  1696 	IMPORT_C TInt GetSinkFormat(TUid& aFormat) const;
  1697 
  1698 	/**
  1699 	Gets the fourCC code of the sink.
  1700 
  1701 	@param  aDataType
  1702 	        The fourCC code.
  1703 
  1704 	@return One of the system-wide error codes.
  1705 
  1706 	@since 7.0s
  1707 	*/
  1708 	IMPORT_C TInt GetSinkDataType(TFourCC& aDataType) const;
  1709 
  1710 	/**
  1711 	Gets the list of sample rates supported by the data source.
  1712 
  1713 	Warning: Existing objects in this array will be removed by this function.
  1714 
  1715 	@param  aSupportedRates
  1716 	        The supported rates.
  1717 
  1718 	@return One of the system-wide error codes.
  1719 
  1720 	@since  7.0s
  1721 	*/
  1722 	IMPORT_C void GetSupportedSourceSampleRatesL(RArray<TUint>& aSupportedRates) const;
  1723 
  1724 	/**
  1725 	Gets the list of bit rates supported by the data source.
  1726 
  1727 	Warning: Existing objects in this array will be removed by this function.
  1728 
  1729 	@param  aSupportedRates
  1730 	        The supported rates.
  1731 
  1732 	@return One of the system-wide error codes.
  1733 
  1734 	@since 7.0s
  1735 	*/
  1736 	IMPORT_C void GetSupportedSourceBitRatesL(RArray<TUint>& aSupportedRates) const;
  1737 
  1738 	/**
  1739 	Gets the list of channels supported by the data source (ie mono, stereo etc).
  1740 
  1741 	Warning: Existing objects in this array will be removed by this method.
  1742 
  1743 	@param  aSupportedChannels
  1744 	        The supported channels.
  1745 
  1746 	@return One of the system-wide error codes.
  1747 
  1748 	@since 7.0s
  1749 	*/
  1750 	IMPORT_C void GetSupportedSourceNumChannelsL(RArray<TUint>& aSupportedChannels) const;
  1751 
  1752 	/**
  1753 	Gets the list of fourCC codes supported by the data source.
  1754 
  1755 	Warning: Existing objects in this array will be removed by this method.
  1756 
  1757 	@param  aSupportedDataTypes
  1758 	        The supported data types.
  1759 
  1760 	@return One of the system-wide error codes.
  1761 
  1762 	@since  7.0s
  1763 	*/
  1764 	IMPORT_C void GetSupportedSourceDataTypesL(RArray<TFourCC>& aSupportedDataTypes) const;
  1765 
  1766 	/**
  1767 	Gets the list of sample rates supported by the data sink.
  1768 
  1769 	Warning: Existing objects in this array will be removed by this method.
  1770 
  1771 	@param  aSupportedRates
  1772 	        The supported rates.
  1773 
  1774 	@return One of the system-wide error codes.
  1775 
  1776 	@since  7.0s
  1777 	*/
  1778 	IMPORT_C void GetSupportedSinkSampleRatesL(RArray<TUint>& aSupportedRates) const;
  1779 
  1780 	/**
  1781 	Gets the list of bit rates supported by the data sink.
  1782 
  1783 	Warning: Existing objects in this array will be removed by this method.
  1784 
  1785 	@param  aSupportedRates
  1786 	        The supported rates.
  1787 
  1788 	@return One of the system-wide error codes.
  1789 
  1790 	@since  7.0s
  1791 	*/
  1792 	IMPORT_C void GetSupportedSinkBitRatesL(RArray<TUint>& aSupportedRates) const;
  1793 
  1794 	/**
  1795 	Gets the list of channels supported by the data sink (ie mono, stereo etc).
  1796 
  1797 	Warning: Existing objects in this array will be removed by this method.
  1798 
  1799 	@param  aSupportedChannels
  1800 	        The supported channels.
  1801 
  1802 	@return One of the system-wide error codes.
  1803 
  1804 	@since  7.0s
  1805 	*/
  1806 	IMPORT_C void GetSupportedSinkNumChannelsL(RArray<TUint>& aSupportedChannels) const;
  1807 
  1808 	/**
  1809 	Gets the list of fourCC codes supported by the data sink.
  1810 
  1811 	Warning: Existing objects in this array will be removed by this method.
  1812 
  1813 	@param  aSupportedDataTypes
  1814 	        The supported data types.
  1815 
  1816 	@return One of the system-wide error codes.
  1817 
  1818 	@since  7.0s
  1819 	*/
  1820 	IMPORT_C void GetSupportedSinkDataTypesL(RArray<TFourCC>& aSupportedDataTypes) const;
  1821 
  1822 private:
  1823 	void DoGetUintArrayL(RArray<TUint>& aArray, TMMFAudioControllerMessages aIpc) const;
  1824 	void DoGetFourCCArrayL(RArray<TFourCC>& aArray, TMMFAudioControllerMessages aIpc) const;
  1825 	};
  1826 
  1827 
  1828 /**
  1829 @publishedAll
  1830 @released
  1831 
  1832 Mixin class to be derived from controller plugins that could support the audio record controller
  1833 custom commands.
  1834 */
  1835 class MMMFAudioControllerCustomCommandImplementor
  1836 	{
  1837 public:
  1838 
  1839 	/**
  1840 	Sets the sample rate of the data source in samples per second.
  1841 
  1842 	@param  aSampleRate
  1843 	        The sample rate, in samples per second.
  1844 
  1845 	@since 7.0s
  1846 	*/
  1847 	virtual void MacSetSourceSampleRateL(TUint aSampleRate) = 0;
  1848 
  1849 	/**
  1850 	Sets the bit rate of the data source in bits per second.
  1851 
  1852 	@param  aBitRate
  1853 	        The bit rate, in bits per second.
  1854 
  1855 	@since  7.0s
  1856 	*/
  1857 	virtual void MacSetSourceBitRateL(TUint aBitRate) = 0;
  1858 
  1859 	/**
  1860 	Sets the number of channels in the data source.	For example, one channel for mono, two channels 
  1861 	for stereo etc.
  1862 
  1863 	@param  aNumChannels
  1864 	        The number of channels.
  1865 
  1866 	@since  7.0s
  1867 	*/
  1868 	virtual void MacSetSourceNumChannelsL(TUint aNumChannels) = 0;
  1869 
  1870 	/**
  1871 	Sets the format of the data source.	The UID corresponds to the UID of the CMMFFormat-derived 
  1872 	ECOM plugin to be used.
  1873 
  1874 	@param  aFormatUid
  1875 	        The format plugin to be used.
  1876 
  1877 	@since 7.0s
  1878 	*/
  1879 	virtual void MacSetSourceFormatL(TUid aFormatUid) = 0;
  1880 
  1881 	/**
  1882 	Sets the fourCC code of the source.
  1883 
  1884 	@param  aDataType
  1885 	        The fourCC code.
  1886 
  1887 	@since 7.0s
  1888 	*/
  1889 	virtual void MacSetSourceDataTypeL(TFourCC aDataType) = 0;
  1890 
  1891 	/**
  1892 	Sets the sample rate of the data sink in samples per second.
  1893 
  1894 	@param  aSampleRate
  1895 	        The sample rate, in samples per second.
  1896 
  1897 	@since  7.0s
  1898 	*/
  1899 	virtual void MacSetSinkSampleRateL(TUint aSampleRate) = 0;
  1900 
  1901 	/**
  1902 	Sets the bit rate of the data sink in bits per second.
  1903 
  1904 	@param  aRate
  1905 	        The bit rate, in bits per second.
  1906 
  1907 	@since  7.0s
  1908 	*/
  1909 	virtual void MacSetSinkBitRateL(TUint aRate) = 0;
  1910 
  1911 	/**
  1912 	Sets the number of channels in the data sink. For example, one channel for mono, two channels 
  1913 	for stereo etc.
  1914 
  1915 	@param  aNumChannels
  1916 	        The number of channels.
  1917 
  1918 	@since  7.0s
  1919 	*/
  1920 	virtual void MacSetSinkNumChannelsL(TUint aNumChannels) = 0;
  1921 
  1922 	/**
  1923 	Sets the format of the data sink. The UID corresponds to the uid of the CMMFFormat-derived ECOM 
  1924 	plugin to be used.
  1925 
  1926 	@param  aFormatUid
  1927 	        The format plugin to be used.
  1928 
  1929 	@since  7.0s
  1930 	*/
  1931 	virtual void MacSetSinkFormatL(TUid aFormatUid) = 0;
  1932 
  1933 	/**
  1934 	Sets the fourCC code of the sink.
  1935 
  1936 	@param  aDataType
  1937 	        The fourCC code.
  1938 
  1939 	@since  7.0s
  1940 	*/
  1941 	virtual void MacSetSinkDataTypeL(TFourCC aDataType) = 0;
  1942 
  1943 	/**
  1944 	Sets the codec to be used.  Useful when recording data.
  1945 
  1946 	@param  aSourceDataType
  1947 	        The data type of the source of the codec.
  1948 	@param  aSinkDataType
  1949 	        The data type of the sink of the codec.
  1950 
  1951 	@since  7.0s
  1952 	*/
  1953 	virtual void MacSetCodecL(TFourCC aSourceDataType, TFourCC aSinkDataType) = 0;
  1954 
  1955 
  1956 	/**
  1957 	Gets the sample rate of the data source in samples per second.
  1958 
  1959 	@param  aRate	
  1960 	        The sample rate, in samples per second.
  1961 
  1962 	@since  7.0s
  1963 	*/
  1964 	virtual void MacGetSourceSampleRateL(TUint& aRate) = 0;
  1965 
  1966 	/**
  1967 	Gets the bit rate of the data source in bits per second.
  1968 
  1969 	@param  aRate
  1970 	        The bit rate, in bits per second.
  1971 
  1972 	@since  7.0s
  1973 	*/
  1974 	virtual void MacGetSourceBitRateL(TUint& aRate) = 0;
  1975 
  1976 	/**
  1977 	Gets the number of channels in the data source.	For example, one channel for mono, two channels 
  1978 	for stereo etc.
  1979 
  1980 	@param  aNumChannels
  1981 	        The number of channels.
  1982 
  1983 	@since  7.0s
  1984 	*/
  1985 	virtual void MacGetSourceNumChannelsL(TUint& aNumChannels) = 0;
  1986 
  1987 	/**
  1988 	Gets the format of the data source.	The UID corresponds to the uid of the CMMFFormat-derived 
  1989 	ECOM plugin being used.
  1990 
  1991 	@param  aFormat
  1992 	        The format plugin being used.
  1993 
  1994 	@since  7.0s
  1995 	*/
  1996 	virtual void MacGetSourceFormatL(TUid& aFormat) = 0;
  1997 
  1998 	/**
  1999 	Gets the fourCC code of the source.
  2000 
  2001 	@param  aDataType
  2002 	        The fourCC code.
  2003 
  2004 	@since  7.0s
  2005 	*/
  2006 	virtual void MacGetSourceDataTypeL(TFourCC& aDataType) = 0;
  2007 
  2008 	/**
  2009 	Gets the sample rate of the data sink in samples per second.
  2010 
  2011 	@param  aRate
  2012 	        The sample rate, in samples per second.
  2013 
  2014 	@since  7.0s
  2015 	*/
  2016 	virtual void MacGetSinkSampleRateL(TUint& aRate) = 0;
  2017 
  2018 	/**
  2019 	Gets the bit rate of the data sink in bits per second.
  2020 
  2021 	@param  aRate
  2022 	        The bit rate, in bits per second.
  2023 
  2024 	@since  7.0s
  2025 	*/
  2026 	virtual void MacGetSinkBitRateL(TUint& aRate) = 0;
  2027 
  2028 	/**
  2029 	Gets the number of channels in the data sink. For example, one channel for mono, two channels 
  2030 	for stereo etc.
  2031 
  2032 	@param  aNumChannels
  2033 	        The number of channels.
  2034 
  2035 	@since  7.0s
  2036 	*/
  2037 	virtual void MacGetSinkNumChannelsL(TUint& aNumChannels) = 0;
  2038 
  2039 	/**
  2040 	Gets the format of the data sink. The UID corresponds to the uid of the CMMFFormat-derived ECOM 
  2041 	plugin being used.
  2042 
  2043 	@param  aFormat
  2044 	        The format plugin being used.
  2045 
  2046 	@since  7.0s
  2047 	*/
  2048 	virtual void MacGetSinkFormatL(TUid& aFormat) = 0;
  2049 
  2050 	/**
  2051 	Gets the fourCC code of the sink.
  2052 
  2053 	@param  aDataType
  2054 	        The fourCC code.
  2055 
  2056 	@since  7.0s
  2057 	*/
  2058 	virtual void MacGetSinkDataTypeL(TFourCC& aDataType) = 0;
  2059 
  2060 	/**
  2061 	Gets the list of sample rates supported by the data source.
  2062 
  2063 	@param  aSupportedRates
  2064 	        The supported rates.  Warning: Existing objects in this array will be removed by this method.
  2065 
  2066 	@since  7.0s
  2067 	*/
  2068 	virtual void MacGetSupportedSourceSampleRatesL(RArray<TUint>& aSupportedRates) = 0;
  2069 
  2070 	/**
  2071 	Gets the list of bit rates supported by the data source.
  2072 
  2073 	Warning: Existing objects in this array will be removed by this method.
  2074 
  2075 	@param  aSupportedRates
  2076 	        The supported rates.
  2077 
  2078 	@since  7.0s
  2079 	*/
  2080 	virtual void MacGetSupportedSourceBitRatesL(RArray<TUint>& aSupportedRates) = 0;
  2081 
  2082 	/**
  2083 	Gets the list of channels supported by the data source (ie mono, stereo etc).
  2084 
  2085 	Warning: Existing objects in this array will be removed by this method.
  2086 
  2087 	@param  aSupportedChannels
  2088 	        The supported channels.
  2089 
  2090 	@since  7.0s
  2091 	*/
  2092 	virtual void MacGetSupportedSourceNumChannelsL(RArray<TUint>& aSupportedChannels) = 0;
  2093 
  2094 	/**
  2095 	Gets the list of fourCC codes supported by the data source.
  2096 
  2097 	Warning: Existing objects in this array will be removed by this method.
  2098 
  2099 	@param  aSupportedDataTypes
  2100 	        The supported data types.
  2101 
  2102 	@since  7.0s
  2103 	*/
  2104 	virtual void MacGetSupportedSourceDataTypesL(RArray<TFourCC>& aSupportedDataTypes) = 0;
  2105 
  2106 	/**
  2107 	Gets the list of sample rates supported by the data sink.
  2108 
  2109 	Warning: Existing objects in this array will be removed by this method.
  2110 
  2111 	@param  aSupportedRates
  2112 	        The supported rates.
  2113 
  2114 	@since  7.0s
  2115 	*/
  2116 	virtual void MacGetSupportedSinkSampleRatesL(RArray<TUint>& aSupportedRates) = 0;
  2117 
  2118 	/**
  2119 	Gets the list of bit rates supported by the data sink.
  2120 
  2121 	Warning: Existing objects in this array will be removed by this method.
  2122 
  2123 	@param  aSupportedRates
  2124 	        The supported rates.
  2125 
  2126 	@since  7.0s
  2127 	*/
  2128 	virtual void MacGetSupportedSinkBitRatesL(RArray<TUint>& aSupportedRates) = 0;
  2129 
  2130 	/**
  2131 	Gets the list of channels supported by the data sink (ie mono, stereo etc).
  2132 
  2133 	Warning: Existing objects in this array will be removed by this method.
  2134 
  2135 	@param  aSupportedChannels
  2136 	        The supported channels.
  2137 
  2138 	@since  7.0s
  2139 	*/
  2140 	virtual void MacGetSupportedSinkNumChannelsL(RArray<TUint>& aSupportedChannels) = 0;
  2141 
  2142 	/**
  2143 	Gets the list of fourCC codes supported by the data sink.
  2144 
  2145 	Warning: Existing objects in this array will be removed by this method.
  2146 
  2147 	@param  aSupportedDataTypes
  2148 	        The supported data types.
  2149 
  2150 	@since  7.0s
  2151 	*/
  2152 	virtual void MacGetSupportedSinkDataTypesL(RArray<TFourCC>& aSupportedDataTypes) = 0;
  2153 	};
  2154 
  2155 /**
  2156 @publishedAll
  2157 @released
  2158 
  2159 Custom command parser class to be used by controller plugins wishing to support
  2160 audio controller commands.
  2161 
  2162 The controller plugin must be derived from MMMFAudioControllerCustomCommandImplementor
  2163 to use this class.
  2164 
  2165 The controller plugin should create an object of this type and add it to the list of custom
  2166 command parsers in the controller framework. See the following example code for details.
  2167 
  2168 @code
  2169 void CMMFAudioController::ConstructL()
  2170 	{
  2171 	// Construct custom command parsers
  2172 	CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
  2173 	CleanupStack::PushL(audPlayDevParser);
  2174 	AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
  2175 	CleanupStack::Pop();//audPlayDevParser
  2176 
  2177 	CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
  2178 	CleanupStack::PushL(audRecDevParser);
  2179 	AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
  2180 	CleanupStack::Pop();//audRecDevParser
  2181 
  2182 etc.
  2183 	}
  2184 @endcode
  2185 
  2186 @since  7.0s
  2187 */
  2188 class CMMFAudioControllerCustomCommandParser : public CMMFCustomCommandParserBase
  2189 	{
  2190 public:
  2191 
  2192 	/**
  2193 	Creates a new custom command parser capable of handling audio controller commands.
  2194 
  2195 	@param  aImplementor
  2196 	        A reference to the controller plugin that owns this new object.
  2197 
  2198 	@return A pointer to the object created.
  2199 
  2200 	@since  7.0s
  2201 	*/
  2202 	IMPORT_C static CMMFAudioControllerCustomCommandParser* NewL(MMMFAudioControllerCustomCommandImplementor& aImplementor);
  2203 
  2204 	/**
  2205 	Destructor.
  2206 
  2207 	@since 7.0s
  2208 	*/
  2209 	IMPORT_C ~CMMFAudioControllerCustomCommandParser();
  2210 
  2211 	/**
  2212 	Handles a request from the client. Called by the controller framework.
  2213 
  2214 	@param  aMessage
  2215 	        The message to be handled.
  2216 
  2217 	@since  7.0s
  2218 	*/
  2219 	void HandleRequest(TMMFMessage& aMessage);
  2220 private:
  2221 	/**
  2222 	Constructor.
  2223 
  2224 	@param  aImplementor
  2225 	        A reference to the controller plugin that owns this new object.
  2226 
  2227 	@since  7.0s
  2228 	*/
  2229 	CMMFAudioControllerCustomCommandParser(MMMFAudioControllerCustomCommandImplementor& aImplementor);
  2230 	// Internal request handling methods.
  2231 	void DoHandleRequestL(TMMFMessage& aMessage);
  2232 
  2233 	TBool DoSetSourceSampleRateL(TMMFMessage& aMessage);
  2234 	TBool DoSetSourceNumChannelsL(TMMFMessage& aMessage);
  2235 	TBool DoSetSourceFormatL(TMMFMessage& aMessage);
  2236 	TBool DoSetSinkSampleRateL(TMMFMessage& aMessage);
  2237 	TBool DoSetSinkNumChannelsL(TMMFMessage& aMessage);
  2238 	TBool DoSetSinkFormatL(TMMFMessage& aMessage);
  2239 	TBool DoSetCodecL(TMMFMessage& aMessage);
  2240 	TBool DoSetSourceBitRateL(TMMFMessage& aMessage);
  2241 	TBool DoSetSourceDataTypeL(TMMFMessage& aMessage);
  2242 	TBool DoSetSinkBitRateL(TMMFMessage& aMessage);
  2243 	TBool DoSetSinkDataTypeL(TMMFMessage& aMessage);
  2244 	TBool DoGetSourceSampleRateL(TMMFMessage& aMessage);
  2245 	TBool DoGetSourceBitRateL(TMMFMessage& aMessage);
  2246 	TBool DoGetSourceNumChannelsL(TMMFMessage& aMessage);
  2247 	TBool DoGetSourceFormatL(TMMFMessage& aMessage);
  2248 	TBool DoGetSourceDataTypeL(TMMFMessage& aMessage);
  2249 	TBool DoGetSinkSampleRateL(TMMFMessage& aMessage);
  2250 	TBool DoGetSinkBitRateL(TMMFMessage& aMessage);
  2251 	TBool DoGetSinkNumChannelsL(TMMFMessage& aMessage);
  2252 	TBool DoGetSinkFormatL(TMMFMessage& aMessage);
  2253 	TBool DoGetSinkDataTypeL(TMMFMessage& aMessage);
  2254 	TBool DoGetSupportedSourceSampleRatesL(TMMFMessage& aMessage);
  2255 	TBool DoGetSupportedSourceBitRatesL(TMMFMessage& aMessage);
  2256 	TBool DoGetSupportedSourceNumChannelsL(TMMFMessage& aMessage);
  2257 	TBool DoGetSupportedSourceDataTypesL(TMMFMessage& aMessage);
  2258 	TBool DoGetSupportedSinkSampleRatesL(TMMFMessage& aMessage);
  2259 	TBool DoGetSupportedSinkBitRatesL(TMMFMessage& aMessage);
  2260 	TBool DoGetSupportedSinkNumChannelsL(TMMFMessage& aMessage);
  2261 	TBool DoGetSupportedSinkDataTypesL(TMMFMessage& aMessage);
  2262 	TBool DoCopyArrayDataL(TMMFMessage& aMessage);
  2263 
  2264 	void DoCreateBufFromUintArrayL(RArray<TUint>& aArray);
  2265 	void DoCreateBufFromFourCCArrayL(RArray<TFourCC>& aArray);
  2266 private:
  2267 	/** 
  2268 	The object that implements the audio record controller interface 
  2269 	*/
  2270 	MMMFAudioControllerCustomCommandImplementor& iImplementor;
  2271 
  2272 	CBufFlat* iDataCopyBuffer;
  2273 	};
  2274 
  2275 
  2276 class RWindow;
  2277 
  2278 /**
  2279 @publishedAll
  2280 @released
  2281 
  2282 Client class to access functionality specific to a video controller.
  2283 
  2284 The class uses the custom command function of the controller plugin, and removes the necessity
  2285 for the client to formulate the custom commands.
  2286 
  2287 @since  7.0s
  2288 */
  2289 class RMMFVideoControllerCustomCommands : public RMMFCustomCommandsBase
  2290 	{
  2291 public:
  2292 
  2293 	/**
  2294 	Constructor.
  2295 
  2296 	@param  aController
  2297 	        The client side controller object to be used by this custom command interface.
  2298 
  2299 	@since  7.0s
  2300 	*/
  2301 	IMPORT_C RMMFVideoControllerCustomCommands(RMMFController& aController);
  2302 
  2303 	/**
  2304 	Gets the frame size of the clip.
  2305 
  2306 	@param  aVideoFrameSize
  2307 	        The frame size, in pixels.
  2308 
  2309 	@return One of the system-wide error codes.
  2310 
  2311 	@since 7.0s
  2312 	*/
  2313 	IMPORT_C TInt GetVideoFrameSize(TSize& aVideoFrameSize) const;
  2314 
  2315 	/**
  2316 	Gets the audio type.
  2317 
  2318 	@param  aCodec
  2319 	        The FourCC of the audio codec.
  2320 
  2321 	@return One of the system-wide error codes.
  2322 
  2323 	@since  7.0s
  2324 	*/
  2325 	IMPORT_C TInt GetAudioCodec(TFourCC& aCodec) const;
  2326 
  2327 	/**
  2328 	Gets the video bit rate.
  2329 
  2330 	@param  aBitRate	
  2331 	        The bit rate of the video stream. If this value is KMMFVariableVideoBitRate it signifies
  2332 	        a variable bit rate.
  2333 
  2334 	@return One of the system-wide error codes.
  2335 
  2336 	@since  7.0s
  2337 	*/
  2338 	IMPORT_C TInt GetVideoBitRate(TInt& aBitRate) const;
  2339 
  2340 	/**
  2341 	Gets the audio bit rate.
  2342 
  2343 	@param aBitRate
  2344 	       The bit rate of the audio stream.
  2345 
  2346 	@return One of the system-wide error codes.
  2347 
  2348 	@since  7.0s
  2349 	*/
  2350 	IMPORT_C TInt GetAudioBitRate(TInt& aBitRate) const;
  2351 
  2352 	/**
  2353 	Sets the frame rate of the clip.
  2354 
  2355 	@param  aFramesPerSecond
  2356 	        The number of frames per second.
  2357 
  2358 	@return One of the system-wide error codes.
  2359 
  2360 	@since  7.0s
  2361 	*/
  2362 	IMPORT_C TInt SetFrameRate(TReal32 aFramesPerSecond) const;
  2363 
  2364 	/**
  2365 	Gets the frame rate of the clip.
  2366 
  2367 	@param  aFramesPerSecond
  2368 	        The number of frames per second, filled in by the controller plugin.
  2369 
  2370 	@return One of the system-wide error codes.
  2371 
  2372 	@since  7.0s
  2373 	*/
  2374 	IMPORT_C TInt GetFrameRate(TReal32& aFramesPerSecond) const;
  2375 
  2376 	/**
  2377 	Gets the video clip MIME type.
  2378 
  2379 	@param  aMimeType
  2380 	        The Mime type of the current clip.
  2381 
  2382 	@since  7.0s
  2383 	*/
  2384 	IMPORT_C TInt GetVideoMimeType(TDes8& aMimeType) const;
  2385 	};
  2386 
  2387 /**
  2388 @publishedAll
  2389 @released
  2390 
  2391 Client class to access functionality specific to a video playback controller.
  2392 
  2393 The class uses the custom command function of the controller plugin, and removes the necessity
  2394 for the client to formulate the custom commands.
  2395 
  2396 @since  7.0s
  2397 */
  2398 class RMMFVideoPlayControllerCustomCommands : public RMMFCustomCommandsBase
  2399 	{
  2400 public:
  2401 
  2402 	/**
  2403 	Constructor.
  2404 
  2405 	@param  aController
  2406 	        The client side controller object to be used by this custom command interface.
  2407 
  2408 	@since  7.0s
  2409 	*/
  2410 	IMPORT_C RMMFVideoPlayControllerCustomCommands(RMMFController& aController);
  2411 
  2412 	/**
  2413 	Prepares the video clip to be accessed.
  2414 
  2415 	A call to this function tells the loaded controller plugin to finalise its configuration
  2416 	and to prepare to start reading the video clip.  It is not possible to play the video clip
  2417 	or query any of its properties (e.g. duration, meta data etc.) until the controller plugin
  2418 	has signified the completion of this method by generating a KMMFEventCategoryVideoPrepareComplete
  2419 	event.
  2420 
  2421 	@since  7.0s
  2422 	*/
  2423 	IMPORT_C TInt Prepare();
  2424 
  2425 	/**
  2426 	Asks the controller to store the current frame to a bitmap. 
  2427 
  2428 	The video play controller will send an event to the client on completion of the task.
  2429 
  2430 	@param  aBitmap
  2431 	        The handle of the CFbsBitmap object to retrieve the frame to.
  2432 	@param  aStatus
  2433 	        The active object to call back on.
  2434 
  2435 	@return One of the system-wide error codes.
  2436 
  2437 	@since  7.0s
  2438 	*/
  2439 	IMPORT_C void GetFrame(CFbsBitmap& aBitmap, TRequestStatus& aStatus);
  2440 
  2441 	/**
  2442 	Sets the screen region to be used to display the video.
  2443 
  2444 	@param  aWindowRect
  2445 	        The window rectangle.
  2446 	@param  aClipRect
  2447 	        The clip rectangle.
  2448 
  2449 	@return One of the system-wide error codes.
  2450 
  2451 	@since  7.0s
  2452 	*/
  2453 	IMPORT_C TInt SetDisplayWindow(const TRect& aWindowRect, const TRect& aClipRect) const;
  2454 
  2455 	/**
  2456 	Updates the display region.
  2457 
  2458 	@param  aRegion
  2459 	        The valid region to display to.
  2460 
  2461 	@return One of the system-wide error codes.
  2462 
  2463 	@since  7.0s
  2464 	*/
  2465 	IMPORT_C TInt UpdateDisplayRegion(const TRegion& aRegion) const;
  2466 
  2467 	/**
  2468 	Queries whether audio is enabled.
  2469 
  2470 	@param  aEnabled
  2471 	        A boolean indicating whether audio is enabled.
  2472 
  2473 	@return One of the system-wide error codes.
  2474 
  2475 	@since  7.0s
  2476 	*/
  2477 	IMPORT_C TInt GetAudioEnabled(TBool& aEnabled) const;
  2478 
  2479 	/**
  2480 	Sends a direct screen access event to controller.
  2481 
  2482 	@param  aDSAEvent
  2483 	        The direct screen access event.
  2484 
  2485 	@return One of the system-wide error codes.
  2486 
  2487 	@since  7.0s
  2488 	*/
  2489 	IMPORT_C TInt DirectScreenAccessEvent(const TMMFDSAEvent aDSAEvent) const;
  2490 
  2491 	/**
  2492  	Sets a time window for video playback.
  2493 
  2494  	@param  aStart
  2495 	        The start time in milliseconds relative to the start of the video clip.
  2496   	@param  aEnd
  2497 	        The end time in milliseconds relative to the start of the video clip.
  2498 
  2499   	@return One of the system-wide error codes.
  2500 
  2501   	@since  7.0s
  2502 	*/
  2503 	IMPORT_C TInt Play(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) const;
  2504 
  2505 	/**
  2506   	Requests the controller to redraw the current frame.
  2507 
  2508   	@return One of the system-wide error codes.
  2509 
  2510   	@since  7.0s
  2511 	*/
  2512 	IMPORT_C TInt RefreshFrame() const;
  2513 
  2514 	/**
  2515 	Gets the video loading progress as a percentage.
  2516 
  2517 	@param  aPercentageProgress
  2518 	        The progress loading the clip, as a percentage.
  2519 
  2520 	@return One of the system-wide error codes.
  2521 
  2522 	@since  7.0s
  2523 	*/
  2524 	IMPORT_C TInt GetLoadingProgress(TInt& aPercentageProgress) const;
  2525 
  2526 	/**
  2527 	Rotates the video image on the screen.
  2528 
  2529 	@param  aRotation
  2530 	        The desired rotation to apply.
  2531 
  2532 	@return One of the system-wide error codes.
  2533 
  2534 	@since  7.0s
  2535 	*/
  2536 	IMPORT_C TInt SetRotation(TVideoRotation aRotation) const;
  2537 
  2538 	/**
  2539 	Queries the rotation that is currently applied to the video image.
  2540 
  2541 	@param  aRotation
  2542 	        The applied rotation.
  2543 
  2544 	@return One of the system wide error codes.
  2545 
  2546 	@since  7.0s
  2547 	*/
  2548 	IMPORT_C TInt GetRotation(TVideoRotation& aRotation) const;
  2549 
  2550 	/**
  2551 	Scales the video image to a specified percentage of its original size.
  2552 
  2553 	@param  aWidthPercentage
  2554 	        The percentage (100 = original size) to be used to scale the width of the video image.
  2555 	@param  aHeightPercentage
  2556 	        The percentage (100 = original size) to be used to scale the height of the video image. 
  2557 	        If this is not equal to aWidthPercentage then the image may be distorted.
  2558 	@param  aAntiAliasFiltering
  2559 	        True if anti-aliasing filtering should be used. If the plugin does not
  2560 	        support this kind of processing, this value will be ignored.
  2561 
  2562 	@return One of the system wide error codes.
  2563 
  2564 	@since 7.0s
  2565 	*/
  2566 	IMPORT_C TInt SetScaleFactor(TReal32 aWidthPercentage, TReal32 aHeightPercentage, TBool aAntiAliasFiltering) const;
  2567 
  2568 	/**
  2569 	Gets the scale factor currently applied to the video image.
  2570 
  2571 	@param  aWidthPercentage
  2572 	        On return, will contain the percentage (100 = original size) used to scale the width
  2573 	        of the video image.
  2574 	@param  aHeightPercentage
  2575 	        On return. will contain the percentage (100 = original size) used to scale the height 
  2576 	        of the video image.
  2577 	@param  aAntiAliasFiltering
  2578 	        True if anti-aliasing filtering is being used
  2579 
  2580 	@return One of the system wide error codes.
  2581 
  2582 	@since  7.0s
  2583 	*/
  2584 	IMPORT_C TInt GetScaleFactor(TReal32& aWidthPercentage, TReal32& aHeightPercentage, TBool& aAntiAliasFiltering) const;
  2585 
  2586 	/**
  2587 	Selects a region of the video image to be displayed.
  2588 
  2589 	@param  aCropRegion
  2590 	        The dimensions of the crop region, relative to the video image.
  2591 
  2592 	@return One of the system wide error codes.
  2593 
  2594 	@since 7.0s
  2595 	*/
  2596 	IMPORT_C TInt SetCropRegion(const TRect& aCropRegion) const;
  2597 
  2598 	/**
  2599 	Gets the crop region currently applied to the image.
  2600 
  2601 	@param  aCropRegion
  2602 	        The dimensions of the crop region, relative to the video image. If no crop region has
  2603 	        been applied, the full dimensions of the video image will be returned.
  2604 	
  2605 	@return One of the system-wide error codes.
  2606 
  2607 	@since  7.0s
  2608 	*/
  2609 	IMPORT_C TInt GetCropRegion(TRect& aCropRegion) const;
  2610 
  2611 
  2612 private:
  2613 	TPckgBuf<TMMFVideoConfig> iConfigPackage;
  2614 	};
  2615 
  2616 /**
  2617 @publishedAll
  2618 @released
  2619 
  2620 Client class to access functionality specific to a video recorder controller.
  2621 
  2622 The class uses the custom command function of the controller plugin, and removes the necessity
  2623 for the client to formulate the custom commands.
  2624 
  2625 @since  7.0s
  2626 */
  2627 class RMMFVideoRecordControllerCustomCommands : public RMMFCustomCommandsBase
  2628 	{
  2629 public:
  2630 
  2631 	/**
  2632 	Constructor.
  2633 
  2634 	@param  aController
  2635 	        The client side controller object to be used by this custom command interface.
  2636 
  2637 	@since 7.0s
  2638 	*/
  2639 	IMPORT_C RMMFVideoRecordControllerCustomCommands(RMMFController& aController);
  2640 
  2641 	/**
  2642 	Sets the format for the video to record.
  2643 
  2644 	@param  aVideoFormatUid
  2645 	        The UID of the video format.
  2646 
  2647 	@return This method will return with one of the system-wide error codes.
  2648 
  2649 	@since  7.0s
  2650 	*/
  2651 	IMPORT_C TInt SetVideoFormat(TUid aVideoFormatUid) const;
  2652 
  2653 	/**
  2654 	Sets the video codec for recording.
  2655 
  2656 	@param  aVideoCodec
  2657 	        The MIME type of the video codec.
  2658 
  2659 	@return	One of the system-wide error codes.
  2660 
  2661 	@since  7.0s
  2662 	*/
  2663 	IMPORT_C TInt SetVideoCodec(const TDesC8& aVideoCodec) const;
  2664 
  2665 	/**
  2666 	Sets the video bit rate.
  2667 
  2668 	@param  aBitRate
  2669 	        The bit rate of the video stream.
  2670 
  2671 	@return One of the system-wide error codes.
  2672 
  2673 	@since  7.0s
  2674 	*/
  2675 	IMPORT_C TInt SetVideoBitRate(TInt aBitRate) const;
  2676 
  2677 	/**
  2678 	Sets the audio bit rate.
  2679 
  2680 	@param  aBitRate
  2681 	        The bit rate of the audio stream.
  2682 
  2683 	@return One of the system-wide error codes.
  2684 
  2685 	@since  7.0s
  2686 	*/
  2687 	IMPORT_C TInt SetAudioBitRate(TInt aBitRate) const;
  2688 
  2689 	/**
  2690 	Sets the audio codec for recording.
  2691 
  2692 	@param  aAudioCodec
  2693 	        The FourCC code of the audio codec.
  2694 
  2695 	@return	One of the system-wide error codes.
  2696 
  2697 	@since  7.0s
  2698 	*/
  2699 	IMPORT_C TInt SetAudioCodec(TFourCC aAudioCodec) const;
  2700 
  2701 	/**
  2702 	Sets the frame size of the clip.
  2703 
  2704 	@param  aVideoFrameSize
  2705 	        The frame size, in pixels.
  2706 
  2707 	@return One of the system-wide error codes.
  2708 
  2709 	@since  7.0s
  2710 	*/
  2711 	IMPORT_C TInt SetVideoFrameSize(TSize aVideoFrameSize) const;
  2712 
  2713 	/**
  2714 	Sets the maximum size of the recorded clip, in bytes.
  2715 
  2716 	@param  aMaxSize
  2717 	        The maximum size of the recorded clip, in bytes. This can be called with the parameter 
  2718 	        KMMFNoMaxClipSize which signifies no maximum file size.
  2719 
  2720 	@return	One of the system-wide error codes.
  2721 
  2722 	@since  7.0s
  2723 	*/
  2724 	IMPORT_C TInt SetMaxFileSize(TInt aMaxSize) const;
  2725 
  2726 	/**
  2727 	Adds meta data to the clip.
  2728 
  2729 	@param  aNewEntry
  2730 	        The details of the new entry to be added.
  2731 
  2732 	@return One of the system-wide error codes.
  2733 
  2734 	@since  7.0s
  2735 	*/
  2736 	IMPORT_C void AddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry)const;
  2737 
  2738 	/**
  2739 	Removes a meta data entry from the clip.
  2740 
  2741 	@param  aIndex
  2742 	        The ID of the meta data entry to delete.
  2743 
  2744 	@return One of the system-wide error codes.
  2745 
  2746 	@since  7.0s
  2747 	*/
  2748 	IMPORT_C TInt RemoveMetaDataEntry(TInt aIndex)const;
  2749 
  2750 	/**
  2751 	Replaces a meta data in the clip.
  2752 
  2753 	@param  aIndex
  2754 	        The ID of the meta data entry to replace.
  2755 	@param  aNewEntry
  2756 	        The details of the new entry to be added.
  2757 
  2758 	@since  7.0s
  2759 	*/
  2760 	IMPORT_C void ReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry)const;
  2761 
  2762 	/**
  2763 	Sets whether audio is enabled.
  2764 
  2765 	@param  aEnable
  2766 	        A boolean indicating if audio should be enabled.
  2767 
  2768 	@return One of the system-wide error codes.
  2769 
  2770 	@since  7.0s
  2771 	*/
  2772 	IMPORT_C TInt SetAudioEnabled(TBool aEnable) const;
  2773 
  2774 	/**
  2775 	Prepares the controller for recording. This should be called before the first attempt to record 
  2776 	with the controller.
  2777 
  2778 	@return One of the system-wide error codes.
  2779 
  2780 	@since  7.0s
  2781 	*/
  2782 	IMPORT_C TInt Prepare() const;
  2783 
  2784 	/**
  2785 	Sets the handle of the camera to use.
  2786 
  2787 	@param  aCameraHandle
  2788 	        The handle of the camera to use.
  2789 
  2790 	@return One of the system-wide error codes.
  2791 
  2792 	@since  7.0s
  2793 	*/
  2794 	IMPORT_C TInt SetCameraHandle(TInt aCameraHandle) const;
  2795 
  2796 	/**
  2797 	Gets the (possibly estimated) record time left in the clip.
  2798 
  2799 	@param  aTime
  2800 	        The record time available, in microseconds.
  2801 
  2802 	@return One of the system-wide error codes.
  2803 
  2804 	@since  7.0s
  2805 	*/
  2806 	IMPORT_C TInt GetRecordTimeAvailable(TTimeIntervalMicroSeconds& aTime) const;
  2807 
  2808 	/**
  2809 	Gets the supported sink audio types.
  2810 
  2811 	@param  aSupportedDataTypes
  2812 	        The supported data types.
  2813 
  2814 	@since  7.0s
  2815 	*/
  2816 	IMPORT_C TInt GetSupportedSinkAudioTypes(RArray<TFourCC>& aSupportedDataTypes) const;
  2817 
  2818 	/**
  2819 	Gets the supported sink video types.
  2820 
  2821 	@param  aDataTypes
  2822 	        The supported data types.
  2823 
  2824 	@since  7.0s
  2825 	*/
  2826 	IMPORT_C TInt GetSupportedSinkVideoTypes(CDesC8Array& aDataTypes) const;
  2827 
  2828 	// INC23777
  2829 	/**
  2830 	Retrieves whether audio is enabled.
  2831 
  2832 	@param  aEnabled
  2833 	        A boolean indicating whether audio is enabled.
  2834 
  2835 	@return One of the system-wide error codes.
  2836 
  2837 	@since  7.0s
  2838 	*/
  2839 	IMPORT_C TInt GetAudioEnabled(TBool& aEnabled) const;
  2840 
  2841 private:
  2842 	void DoGetCDesC8ArrayL(CDesC8Array& aArray, TMMFVideoRecordControllerMessages aIpc) const;
  2843 	void DoGetFourCCArrayL(RArray<TFourCC>& aArray) const;
  2844 	};
  2845 
  2846 
  2847 /**
  2848 @publishedAll
  2849 @released
  2850 
  2851 Mixin class to be derived from controller plugins that could support the video record controller 
  2852 custom commands.
  2853 */
  2854 class MMMFVideoRecordControllerCustomCommandImplementor
  2855 	{
  2856 public:
  2857 
  2858 	/**
  2859 	Sets the format for the video to record.
  2860 
  2861 	@param  aVideoFormatUid
  2862 	        The UID of the video format.
  2863 
  2864 	@return One of the system-wide error codes.
  2865 
  2866 	@since  7.0s
  2867 	*/
  2868 	virtual void MvrcSetVideoFormatL(TUid aVideoFormatUid)=0;
  2869 
  2870 	/**
  2871 	Sets the video codec for recording.
  2872 
  2873 	@param  aVideoCodec
  2874 	        The MIME type of the video codec.
  2875 
  2876 	@return One of the system-wide error codes.
  2877 
  2878 	@since 7.0s
  2879 	*/
  2880 	virtual void MvrcSetVideoCodecL(const TDesC8& aVideoCodec)=0;
  2881 
  2882 	/**
  2883 	Sets the audio codec for recording.
  2884 
  2885 	@param  aAudioCodec
  2886 	        The FourCC code of the audio codec.
  2887 
  2888 	@return One of the system-wide error codes.
  2889 
  2890 	@since  7.0s
  2891 	*/
  2892 	virtual void MvrcSetAudioCodecL(TFourCC aAudioCodec)=0;
  2893 
  2894 	/**
  2895 	Sets the video bit rate.
  2896 
  2897 	@param  aBitRate
  2898 	        The bit rate of the video stream. This can be called with the parameter 
  2899 	        KMMFVariableVideoBitRate which specifies a variable bit rate.
  2900 
  2901 	@return One of the system-wide error codes.
  2902 
  2903 	@since  7.0s
  2904 	*/
  2905 	virtual void MvrcSetVideoBitRateL(TInt& aBitRate)=0;
  2906 
  2907 	/**
  2908 	Sets the audio bit rate.
  2909 
  2910 	@param  aBitRate
  2911 	        The bit rate of the audio stream.
  2912 
  2913 	@return One of the system-wide error codes.
  2914 
  2915 	@since  7.0s
  2916 	*/
  2917 	virtual void MvrcSetAudioBitRateL(TInt& aBitRate)=0;
  2918 
  2919 	/**
  2920 	Adds meta data to the clip.
  2921 
  2922 	@param  aNewEntry
  2923 	        The details of the new entry to be added.
  2924 
  2925 	@since  7.0s
  2926 	*/
  2927 	virtual void MvrcAddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry)=0;
  2928 
  2929 	/**
  2930 	Removes a meta data entry from the clip.
  2931 
  2932 	@param  aIndex
  2933 	        The ID of the meta data entry to delete.
  2934 
  2935 	@since  7.0s
  2936 	*/
  2937 	virtual void MvrcRemoveMetaDataEntryL(TInt aIndex)=0;
  2938 
  2939 	/**
  2940 	Replaces a meta data in the clip.
  2941 
  2942 	@param  aIndex
  2943 	        The ID of the meta data entry to replace.
  2944 	@param  aNewEntry
  2945 	        The details of the new entry to be added.
  2946 
  2947 	@since  7.0s
  2948 	*/
  2949 	virtual void MvrcReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry)=0;
  2950 
  2951 	/**
  2952 	Sets the maximum file size.
  2953 
  2954 	@param  aMaxFileSize
  2955 	        The maximum file size allowed for recording. This can be called with the parameter
  2956 	        KMMFNoMaxClipSize which signifies no maximum file size.
  2957 
  2958 	@since  7.0s
  2959 	*/
  2960 	virtual void MvrcSetMaxFileSizeL(TInt aMaxFileSize)=0;
  2961 
  2962 	/**
  2963 	Sets whether audio is enabled.
  2964 
  2965 	@param  aEnable
  2966 	        A boolean indicating if audio is enabled.
  2967 
  2968 	@since  7.0s
  2969 	*/
  2970 	virtual void MvrcSetAudioEnabledL(TBool aEnable)=0;
  2971 
  2972 	/**
  2973 	Sets the frame size for the video recording.
  2974 
  2975 	@param  aFrameSize
  2976 	        The frame size for recording.
  2977 
  2978 	@since  7.0s
  2979 	*/
  2980 	virtual void MvrcSetVideoFrameSizeL(TSize aFrameSize)=0;
  2981 
  2982 	/**
  2983 	Prepares the controller for recording. This needs to be called before
  2984 	the first call to Record().
  2985 
  2986 	@since  7.0s
  2987 	*/
  2988 	virtual void MvrcPrepareL()=0;
  2989 
  2990 	/**
  2991 	Sets the handle of the camera to use for recording.
  2992 
  2993 	@since  7.0s
  2994 	*/
  2995 	virtual void MvrcSetCameraHandleL(TInt aCameraHandle)=0;
  2996 
  2997 	/**
  2998 	Gets the (possibly estimated) record time left in the clip.
  2999 
  3000 	@param  aTime
  3001 	        The record time available, in microseconds.
  3002 
  3003 	@since  7.0s
  3004 	*/
  3005 	virtual void MvrcGetRecordTimeAvailableL(TTimeIntervalMicroSeconds& aTime) = 0;
  3006 
  3007 	/**
  3008 	Gets the supported sink audio types.
  3009 
  3010 	@param  aDataTypes
  3011 	        The supported data types.
  3012 
  3013 	@return One of the system-wide error codes.
  3014 
  3015 	@since  7.0s
  3016 	*/
  3017 	virtual void MvrcGetSupportedSinkAudioTypesL(RArray<TFourCC>& aDataTypes)=0;
  3018 
  3019 	/**
  3020 	Gets the supported sink video types.
  3021 
  3022 	@param  aDataTypes
  3023 	        The supported data types.
  3024 
  3025 	@return One of the system-wide error codes.
  3026 
  3027 	@since  7.0s
  3028 	*/
  3029 	virtual void MvrcGetSupportedSinkVideoTypesL(CDesC8Array& aDataTypes)=0;
  3030 
  3031 	//INC23777
  3032 	/**
  3033 	Indicates if the audio is enabled.
  3034 
  3035 	@param  aEnabled
  3036 	        A boolean indicating if the audio is enabled.
  3037 
  3038 	@since  7.0s
  3039 	*/
  3040 	virtual void MvrcGetAudioEnabledL(TBool& aEnabled)=0;
  3041 	};
  3042 
  3043 
  3044 /**
  3045 @publishedAll
  3046 @released
  3047 
  3048 Client class to access functionality specific to a video playback controller.
  3049 
  3050 The class uses the custom command function of the controller plugin, and removes the necessity
  3051 for the client to formulate the custom commands.
  3052 
  3053 @since  7.0s
  3054 */
  3055 class MMMFVideoPlayControllerCustomCommandImplementor
  3056 	{
  3057 public:
  3058 
  3059 	/**
  3060 	Prepares the video clip to be accessed.
  3061 
  3062 	A call to this method tells the controller plugin to finalise its configuration
  3063 	and to prepare to start reading the video clip.  It is not possible to play the video clip
  3064 	or query any of its properties (e.g. duration, meta data etc.) until the controller plugin
  3065 	has signified the completion of this method by generating a 
  3066 	KMMFEventCategoryVideoPrepareComplete event.
  3067 
  3068 	@since  7.0s
  3069 	*/
  3070 	virtual void MvpcPrepare()=0;
  3071 
  3072 	/**
  3073 	Gets a frame previously requested from the controller.
  3074 
  3075 	@param  aVideoFrame
  3076 	        The handle of bitmap to retrieve frame to.
  3077 
  3078 	@since  7.0s
  3079 	*/
  3080 	virtual void MvpcGetFrameL(MMMFVideoFrameMessage& aVideoFrame)=0;
  3081 
  3082 	/**
  3083 	Indicates whether audio is enabled.
  3084 
  3085 	@param  aEnabled
  3086 	        On return, contains a boolean indicating whether audio is enabled.
  3087 
  3088 	@since  7.0s
  3089 	*/
  3090 	virtual void MvpcGetAudioEnabledL(TBool& aEnabled)=0;
  3091 
  3092 	/**
  3093 	Sets the screen region to be used to display the video.
  3094 
  3095 	@param  aClipRect
  3096 	        The clip rect used to display the video.
  3097 
  3098 	@since  7.0s
  3099 	*/
  3100 	virtual void MvpcSetDisplayWindowL(const TRect& aWindowRect, const TRect& aClipRect) = 0;
  3101 
  3102 	/**
  3103 	Updates the region to display.
  3104 
  3105 	@param  aRegion
  3106 	        A TRegion containing the current display regions, ownership of the TRegion is not
  3107 	        transferred.
  3108 
  3109 	@since  7.0s
  3110 	*/
  3111 	virtual void MvpcUpdateDisplayRegionL(const TRegion& aRegion) = 0;
  3112 
  3113 	/**
  3114 	Pauses/Resumes video playback. This is to be used with direct screen access
  3115 	to indicate that the display has changed and should not be written to. This
  3116 	does not affect audio playback.
  3117 
  3118 	@param  aDSAEvent
  3119 	        Whether the video display should be active.
  3120 
  3121 	@since  7.0s
  3122 	*/
  3123 	virtual void MvpcDirectScreenAccessEventL(const TMMFDSAEvent aDSAEvent) = 0;
  3124 
  3125 	/**
  3126  	Sets a time window for video playback.
  3127 
  3128  	@param  aStart
  3129 	        Start time in milliseconds relative to the start of the video clip.
  3130   	@param  aEnd
  3131 	        End time in milliseconds relative to the start of the video clip.
  3132 
  3133   	@since 7.0s
  3134 	*/
  3135 	virtual void MvpcPlayL(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) = 0;
  3136 	
  3137 	/**
  3138   	Requests the controller to redraw the current frame.
  3139 
  3140   	@since  7.0s
  3141 	*/
  3142 	virtual void MvpcRefreshFrameL() = 0;
  3143 
  3144 	/**
  3145 	Gets the progress of loading a video clip.
  3146 
  3147 	@param  aPercentageComplete
  3148 	        The progress loading the clip, as a percentage.
  3149 
  3150 	@since  7.0s
  3151 	*/
  3152 	virtual void MvpcGetLoadingProgressL(TInt& aPercentageComplete) = 0;
  3153 
  3154 	/**
  3155 	Rotates the video image on the screen.
  3156 
  3157 	@param  aRotation
  3158 	        The desired rotation to apply.
  3159 
  3160 	@since  7.0s
  3161 	*/
  3162 	virtual void MvpcSetRotationL(TVideoRotation aRotation) = 0;
  3163 
  3164 	/**
  3165 	Queries the rotation that is currently applied to the video image.
  3166 
  3167 	@param  aRotation
  3168 	        The applied rotation.
  3169 
  3170 	@since  7.0s
  3171 	*/
  3172 	virtual void MvpcGetRotationL(TVideoRotation& aRotation) = 0;
  3173 
  3174 	/**
  3175 	Scales the video image to a specified percentage of its original size.
  3176 
  3177 	@param  aWidthPercentage
  3178 	        The percentage (100 = original size) to be used to scale the width of the video image.
  3179 	@param  aHeightPercentage
  3180 	        The percentage (100 = original size) to be used to scale the height of the video image. 
  3181 	        If this is not equal to aWidthPercentage then the image may be distorted.
  3182 	@param  aAntiAliasFiltering
  3183 	        A boolean indicating if anit-aliasing filtering should be used. ETrue if anti-aliasing 
  3184 	        should be used.  If the plugin does not support this kind of processing, this value will 
  3185 	        be ignored.
  3186 
  3187 	@since  7.0s
  3188 	*/
  3189 	virtual void MvpcSetScaleFactorL(TReal32 aWidthPercentage, TReal32 aHeightPercentage, TBool aAntiAliasFiltering) = 0;
  3190 
  3191 	/**
  3192 	Gets the scale factor currently applied to the video image.
  3193 
  3194 	@param  aWidthPercentage
  3195 	        The percentage (100 = original size) used to scale the width of the video image will be 
  3196 	        copied into here.
  3197 	@param  aHeightPercentage
  3198 	        The percentage (100 = original size) used to scale the height of the video image will be 
  3199 	        copied into here.
  3200 	@param  aAntiAliasFiltering
  3201 	        A boolean indicating if anti-aliasing filtering should be used. ETrue if anti-aliasing 
  3202 	        filtering is being used, EFalse if not.
  3203 
  3204 	@since 7.0s
  3205 	*/
  3206 	virtual void MvpcGetScaleFactorL(TReal32& aWidthPercentage, TReal32& aHeightPercentage, TBool& aAntiAliasFiltering) = 0;
  3207 
  3208 	/**
  3209 	Selects a region of the video image to be displayed.
  3210 
  3211 	@param  aCropRegion
  3212 	        The dimensions of the crop region, relative to the video image.
  3213 
  3214 	@since  7.0s
  3215 	*/
  3216 	virtual void MvpcSetCropRegionL(const TRect& aCropRegion) = 0;
  3217 
  3218 	/**
  3219 	Gets the crop region currently applied to the image
  3220 
  3221 	@param  aCropRegion
  3222 	        The dimensions of the crop region, relative to the video image. If no crop region has 
  3223 	        been applied, the full dimensions of the video image will be returned.
  3224 
  3225 	@since  7.0s
  3226 	*/
  3227 	virtual void MvpcGetCropRegionL(TRect& aCropRegion) = 0;
  3228 	};
  3229 
  3230 /**
  3231 @publishedAll
  3232 @released
  3233 
  3234 Mixin class to be derived from controller plugins that could support the video record controller
  3235 custom commands.
  3236 */
  3237 class MMMFVideoControllerCustomCommandImplementor
  3238 	{
  3239 public:
  3240 
  3241 	/**
  3242 	Gets the frame size of the clip.
  3243 
  3244 	@param  aVideoFrameSize
  3245 	        The frame size, in pixels.
  3246 
  3247 	@since  7.0s
  3248 	*/
  3249 	virtual void MvcGetVideoFrameSizeL(TSize& aVideoFrameSize)=0;
  3250 
  3251 	/**
  3252 	Gets the audio type.
  3253 
  3254 	@param  aCodec
  3255 	        The FourCC of the audio codec.
  3256 
  3257 	@since  7.0s
  3258 	*/
  3259 	virtual void MvcGetAudioCodecL(TFourCC& aCodec)=0;
  3260 
  3261 	/**
  3262 	Gets the video bit rate.
  3263 
  3264 	@param  aBitRate
  3265 	        The bit rate of the video stream. If this value is KMMFVariableVideoBitRate it signifies
  3266 	        a variable bit rate.
  3267 
  3268 	@since  7.0s
  3269 	*/
  3270 	virtual void MvcGetVideoBitRateL(TInt& aBitRate)=0;
  3271 
  3272 	/**
  3273 	Gets the audio bit rate.
  3274 
  3275 	@param  aBitRate
  3276 	        The bit rate of the audio stream.
  3277 
  3278 	@since  7.0s
  3279 	*/
  3280 	virtual void MvcGetAudioBitRateL(TInt& aBitRate)=0;
  3281 
  3282 	/**
  3283 	Sets the frame rate of the clip.
  3284 
  3285 	@param  aFramesPerSecond
  3286 	        The number of frames per second.
  3287 
  3288 	@since  7.0s
  3289 	*/
  3290 	virtual void MvcSetFrameRateL(TReal32 aFramesPerSecond)=0;
  3291 
  3292 	/**
  3293 	Gets the frame rate of the clip.
  3294 
  3295 	@param  aFramesPerSecond
  3296 	        The number of frames per second, filled in by the controller plugin.
  3297 
  3298 	@since  7.0s
  3299 	*/
  3300 	virtual void MvcGetFrameRateL(TReal32& aFramesPerSecond)=0;
  3301 
  3302 	/**
  3303 	Gets the supported sink video types.
  3304 
  3305 	@param  aMimeType
  3306 	        The supported data types.
  3307 
  3308 	@since  7.0s
  3309 	*/
  3310 	virtual void MvcGetVideoMimeTypeL(TDes8& aMimeType)=0;
  3311 	};
  3312 
  3313 
  3314 /**
  3315 @publishedAll
  3316 @released
  3317 
  3318 Custom command parser class to be used by controller plugins wishing to support
  3319 video controller commands.
  3320 
  3321 The controller plugin must be derived from MMMFVideoControllerCustomCommandImplementor
  3322 to use this class.
  3323 
  3324 The controller plugin should create an object of this type and add it to the list of custom
  3325 command parsers in the controller framework.  See the following example code for details.
  3326 
  3327 @code
  3328 void CMMFAudioController::ConstructL()
  3329 	{
  3330 	// Construct custom command parsers
  3331 	CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
  3332 	CleanupStack::PushL(audPlayDevParser);
  3333 	AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
  3334 	CleanupStack::Pop();//audPlayDevParser
  3335 
  3336 	CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
  3337 	CleanupStack::PushL(audRecDevParser);
  3338 	AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
  3339 	CleanupStack::Pop();//audRecDevParser
  3340 
  3341 etc.
  3342 	}
  3343 @endcode
  3344 
  3345 @since 7.0s
  3346 
  3347 */
  3348 class CMMFVideoControllerCustomCommandParser : public CMMFCustomCommandParserBase
  3349 	{
  3350 public:
  3351 
  3352 	/**
  3353 	Creates a new custom command parser capable of handling video controller commands.
  3354 
  3355 	@param  aImplementor
  3356 	        A reference to the controller plugin that owns this new object.
  3357 
  3358 	@return	A pointer to the object created.
  3359 
  3360 	@since  7.0s
  3361 	*/
  3362 	IMPORT_C static CMMFVideoControllerCustomCommandParser* NewL(MMMFVideoControllerCustomCommandImplementor& aImplementor);
  3363 
  3364 	/**
  3365 	Destructor.
  3366 
  3367 	@since  7.0s
  3368 	*/
  3369 	IMPORT_C ~CMMFVideoControllerCustomCommandParser();
  3370 
  3371 	/**
  3372 	Handles a request from the client. Called by the controller framework.
  3373 
  3374 	@param  aMessage
  3375 	        The message to be handled.
  3376 
  3377 	@since  7.0s
  3378 	*/
  3379 	void HandleRequest(TMMFMessage& aMessage);
  3380 private:
  3381 
  3382 	/**
  3383 	Constructor.
  3384 
  3385 	@param  aImplementor
  3386 	        A reference to the controller plugin that owns this new object.
  3387 
  3388 	@since  7.0s
  3389 	*/
  3390 	CMMFVideoControllerCustomCommandParser(MMMFVideoControllerCustomCommandImplementor& aImplementor);
  3391 	// Internal request handling methods.
  3392 	void DoHandleRequestL(TMMFMessage& aMessage);
  3393 	TBool DoGetAudioCodecL(TMMFMessage& aMessage);
  3394 
  3395 	TBool DoGetAudioBitRateL(TMMFMessage& aMessage);
  3396 	TBool DoGetVideoBitRateL(TMMFMessage& aMessage);
  3397 	TBool DoGetVideoFrameSizeL(TMMFMessage& aMessage);
  3398 	TBool DoSetFrameRateL(TMMFMessage& aMessage);
  3399 	TBool DoGetFrameRateL(TMMFMessage& aMessage);
  3400 	TBool DoGetVideoMimeTypeL(TMMFMessage& aMessage);
  3401 private:
  3402 	/** 
  3403 	The object that implements the video record controller interface 
  3404 	*/
  3405 	MMMFVideoControllerCustomCommandImplementor& iImplementor;
  3406 	};
  3407 
  3408 /**
  3409 @publishedAll
  3410 @released
  3411 
  3412 Custom command parser class to be used by controller plugins wishing to support video play 
  3413 controller commands.
  3414 
  3415 The controller plugin must be derived from MMMFVideoPlayControllerCustomCommandImplementor to use 
  3416 this class. The controller plugin should create an object of this type and add it to the list of 
  3417 custom command parsers in the controller framework.
  3418 */
  3419 class CMMFVideoPlayControllerCustomCommandParser : public CMMFCustomCommandParserBase
  3420 	{
  3421 public:
  3422 
  3423 	/**
  3424 	Creates a new custom command parser capable of handling video controller commands.
  3425 
  3426 	@param  aImplementor
  3427 	        A reference to the controller plugin that owns this new object.
  3428 
  3429 	@return A pointer to the object created.
  3430 
  3431 	@since  7.0s
  3432 	*/
  3433 	IMPORT_C static CMMFVideoPlayControllerCustomCommandParser* NewL(MMMFVideoPlayControllerCustomCommandImplementor& aImplementor);
  3434 
  3435 	/**
  3436 	Destructor.
  3437 
  3438 	@since  7.0s
  3439 	*/
  3440 	IMPORT_C ~CMMFVideoPlayControllerCustomCommandParser();
  3441 
  3442 	/**
  3443 	Handles a request from the client. Called by the controller framework.
  3444 
  3445 	@param  aMessage
  3446 	        The message to be handled.
  3447 
  3448 	@since  7.0s
  3449 	*/
  3450 	void HandleRequest(TMMFMessage& aMessage);
  3451 private:
  3452 	/**
  3453 	Constructor.
  3454 
  3455 	@param  aImplementor
  3456 	        A reference to the controller plugin that owns this new object.
  3457 
  3458 	@since  7.0s
  3459 	*/
  3460 	CMMFVideoPlayControllerCustomCommandParser(MMMFVideoPlayControllerCustomCommandImplementor& aImplementor);
  3461 	// Internal request handling methods.
  3462 	void DoHandleRequestL(TMMFMessage& aMessage);
  3463 	TBool DoRequestFrameL(TMMFMessage& aMessage);
  3464 	TBool DoGetFrameL(TMMFMessage& aMessage);
  3465 	TBool DoSetDisplayWindowL(TMMFMessage& aMessage);
  3466 	TBool DoUpdateDisplayRegionL(TMMFMessage& aMessage);
  3467 	TBool DoGetAudioEnabledL(TMMFMessage& aMessage);
  3468 	TBool DoDirectScreenAccessEventL(TMMFMessage& aMessage);
  3469 	TBool DoPlayL(TMMFMessage& aMessage);
  3470 	TBool DoRefreshFrameL(TMMFMessage& aMessage);
  3471 	TBool DoGetLoadingProgressL(TMMFMessage& aMessage);
  3472 	TBool DoPrepareL(TMMFMessage& aMessage);
  3473 	TBool DoSetRotationL(TMMFMessage& aMessage);
  3474 	TBool DoGetRotationL(TMMFMessage& aMessage);
  3475 	TBool DoSetScaleFactorL(TMMFMessage& aMessage);
  3476 	TBool DoGetScaleFactorL(TMMFMessage& aMessage);
  3477 	TBool DoSetCropRegionL(TMMFMessage& aMessage);
  3478 	TBool DoGetCropRegionL(TMMFMessage& aMessage);
  3479 
  3480 
  3481 private:
  3482 	/** 
  3483 	The object that implements the video record controller interface 
  3484 	*/
  3485 	MMMFVideoPlayControllerCustomCommandImplementor& iImplementor;
  3486 	CMMFVideoFrameMessage* iVideoFrameMessage;
  3487 	};
  3488 
  3489 /**
  3490 @publishedAll
  3491 @released
  3492 
  3493 Custom command parser class to be used by controller plugins wishing to support video record 
  3494 controller commands.
  3495 
  3496 The controller plugin must be derived from MMMFVideoRecordControllerCustomCommandImplementor to use 
  3497 this class. The controller plugin should create an object of this type and add it to the list of 
  3498 custom command parsers in the controller framework.
  3499 */
  3500 class CMMFVideoRecordControllerCustomCommandParser : public CMMFCustomCommandParserBase
  3501 	{
  3502 public:
  3503 
  3504 	/**
  3505 	Creates a new custom command parser capable of handling video controller commands.
  3506 
  3507 	@param  aImplementor
  3508 	        A reference to the controller plugin that owns this new object.
  3509 
  3510 	@return A pointer to the object created.
  3511 
  3512 	@since  7.0s
  3513 	*/
  3514 	IMPORT_C static CMMFVideoRecordControllerCustomCommandParser* NewL(MMMFVideoRecordControllerCustomCommandImplementor& aImplementor);
  3515 
  3516 	/**
  3517 	Destructor.
  3518 
  3519 	@since  7.0s
  3520 	*/
  3521 	IMPORT_C ~CMMFVideoRecordControllerCustomCommandParser();
  3522 
  3523 	/**
  3524 	Handles a request from the client. Called by the controller framework.
  3525 
  3526 	@param  aMessage
  3527 	        The message to be handled.
  3528 
  3529 	@since  7.0s
  3530 	*/
  3531 	void HandleRequest(TMMFMessage& aMessage);
  3532 private:
  3533 	/**
  3534 	Constructor.
  3535 
  3536 	@param  aImplementor
  3537 	        A reference to the controller plugin that owns this new object.
  3538 
  3539 	@since  7.0s
  3540 	*/
  3541 	CMMFVideoRecordControllerCustomCommandParser(MMMFVideoRecordControllerCustomCommandImplementor& aImplementor);
  3542 	// Internal request handling methods.
  3543 	void DoHandleRequestL(TMMFMessage& aMessage);
  3544 	TBool DoSetVideoFormatL(TMMFMessage& aMessage);
  3545 	TBool DoSetAudioBitRateL(TMMFMessage& aMessage);
  3546 	TBool DoSetVideoBitRateL(TMMFMessage& aMessage);
  3547 	TBool DoSetVideoCodecL(TMMFMessage& aMessage);
  3548 	TBool DoSetAudioCodecL(TMMFMessage& aMessage);
  3549 	TBool DoAddMetaDataEntryL(TMMFMessage& aMessage);
  3550 	TBool DoRemoveMetaDataEntryL(TMMFMessage& aMessage);
  3551 	TBool DoReplaceMetaDataEntryL(TMMFMessage& aMessage);
  3552 	TBool DoSetMaxFileSizeL(TMMFMessage& aMessage);
  3553 	TBool DoSetAudioEnabledL(TMMFMessage& aMessage);
  3554 	TBool DoSetVideoFrameSizeL(TMMFMessage& aMessage);
  3555 	TBool DoPrepareL(TMMFMessage& aMessage);
  3556 	TBool DoSetCameraHandleL(TMMFMessage& aMessage);
  3557 	TBool DoGetRecordTimeAvailableL(TMMFMessage& aMessage);
  3558 
  3559 	TBool DoGetSupportedSinkAudioTypesL(TMMFMessage& aMessage);
  3560 	TBool DoGetSupportedSinkVideoTypesL(TMMFMessage& aMessage);
  3561 
  3562 	TInt32 DoCreateBufFromCDesC8ArrayL(CDesC8Array& aArray);
  3563 	TBool DoCopyCDesC8ArrayDataL(TMMFMessage& aMessage);
  3564 
  3565 	TBool DoCopyFourCCArrayDataL(TMMFMessage& aMessage);
  3566 	void DoCreateBufFromFourCCArrayL(RArray<TFourCC>& aArray);
  3567 	TBool DoGetAudioEnabledL(TMMFMessage& aMessage); // (INC23777)
  3568 
  3569 private:
  3570 	/** 
  3571 	The object that implements the video record controller interface 
  3572 	*/
  3573 	MMMFVideoRecordControllerCustomCommandImplementor& iImplementor;
  3574 	CBufFlat* iDataCopyBuffer;
  3575 	};
  3576 
  3577 
  3578 
  3579 /**
  3580 @publishedAll
  3581 @released
  3582 
  3583 Client class to allow the client to specify DRM Intent.
  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 RMMFVideoDRMExtCustomCommands : public RMMFCustomCommandsBase
  3591 	{
  3592 public:
  3593 
  3594 	/**
  3595 	Constructor.
  3596 
  3597 	@param  aController
  3598 	        The client side controller object to be used by this custom command interface.
  3599 
  3600 	@since  7.0s
  3601 	*/
  3602 	IMPORT_C RMMFVideoDRMExtCustomCommands(RMMFController& aController);
  3603 
  3604 	/**
  3605 	Gets a frame previously requested from the controller.
  3606 
  3607 	@param  aBitmap
  3608 	        The handle of bitmap to retrieve frame to.
  3609 	@param  aIntent
  3610 	        The DRM Intent to pass in.
  3611 	@param  aStatus
  3612 	        The active object to call back on.
  3613 	*/
  3614 	IMPORT_C void GetFrame(CFbsBitmap& aBitmap, ContentAccess::TIntent aIntent, TRequestStatus& aStatus);
  3615 
  3616 private:
  3617 	TPckgBuf<TMMFVideoConfig> iConfigPackage;
  3618 	TPckgBuf<ContentAccess::TIntent> iIntentPackage;
  3619 	};
  3620 
  3621 
  3622 
  3623 /**
  3624 @publishedAll
  3625 @released
  3626 
  3627 Mixin class to be derived from controller plugins that could support the DRM Intent
  3628 custom commands.
  3629 */
  3630 class MMMFVideoDRMExtCustomCommandImplementor
  3631 	{
  3632 public:
  3633 
  3634 	/**
  3635 	Gets a frame previously requested from the controller.
  3636 
  3637 	@param  aVideoFrame
  3638 	        The callback interface to allow the caller to retrieve a bitmap.
  3639 	@param  aIntent
  3640 	        The DRM Intent to supply.
  3641 	*/
  3642 	virtual void MvdeGetFrameL(MMMFVideoFrameMessage& aVideoFrame, ContentAccess::TIntent aIntent)=0;
  3643 	};
  3644 
  3645 
  3646 /**
  3647 @publishedAll
  3648 @released
  3649 
  3650 Client class to provide DRM extensions to video controllers.
  3651 
  3652 The class uses the custom command function of the controller plugin, and removes the necessity
  3653 for the client to formulate the custom commands.
  3654 */
  3655 class CMMFVideoDRMExtCustomCommandParser : public CMMFCustomCommandParserBase
  3656 	{
  3657 public:
  3658 
  3659 	/**
  3660 	Creates a new custom command parser capable of DRM Intent controller commands.
  3661 
  3662 	@param  aImplementor
  3663 	        A reference to the controller plugin that owns this new object.
  3664 
  3665 	@return A pointer to the object created.
  3666 
  3667 	@since  7.0s
  3668 	*/
  3669 	IMPORT_C static CMMFVideoDRMExtCustomCommandParser* NewL(MMMFVideoDRMExtCustomCommandImplementor& aImplementor);
  3670 
  3671 	/**
  3672 	Destructor.
  3673 
  3674 	@since  7.0s
  3675 	*/
  3676 	IMPORT_C ~CMMFVideoDRMExtCustomCommandParser();
  3677 
  3678 	/**
  3679 	Handles a request from the client. Called by the controller framework.
  3680 
  3681 	@param  aMessage
  3682 	        The message to be handled.
  3683 
  3684 	@since  7.0s
  3685 	*/
  3686 	void HandleRequest(TMMFMessage& aMessage);
  3687 
  3688 private:
  3689 	/**
  3690 	Constructor.
  3691 
  3692 	@param  aImplementor
  3693 	        A reference to the controller plugin that owns this new object.
  3694 	@since  7.0s
  3695 	*/
  3696 	CMMFVideoDRMExtCustomCommandParser(MMMFVideoDRMExtCustomCommandImplementor& aImplementor);
  3697 	// Internal request handling methods.
  3698 
  3699 	void DoGetFrameL(TMMFMessage& aMessage);
  3700 
  3701 private:
  3702 	MMMFVideoDRMExtCustomCommandImplementor& iImplementor;
  3703 	CMMFVideoFrameMessage* iVideoFrameMessage;
  3704 	};
  3705 
  3706 /**
  3707 @publishedAll
  3708 @released
  3709 
  3710 Client class to allow the client to register notification .
  3711 
  3712 The class uses the custom command function of the controller plugin, and removes the necessity
  3713 for the client to formulate the custom commands.
  3714 
  3715 @since  7.0s
  3716 */
  3717 class RMMFResourceNotificationCustomCommands : public RMMFCustomCommandsBase
  3718 	{
  3719 public:
  3720 	/**
  3721 	Constructor.
  3722 
  3723 	@param  aController
  3724 	        The client side controller object to be used by this custom command interface.
  3725 
  3726 	@since  7.0s
  3727 	*/
  3728 	IMPORT_C RMMFResourceNotificationCustomCommands(RMMFController& aController);
  3729 	
  3730 	/**
  3731 	Registers the Event for Notification when resource is avaliable.
  3732 
  3733 	@param aEventType
  3734 		The Event to notify the client.
  3735 		
  3736 	@param aNotificationRegistrationData
  3737 		Notification registration specific data.
  3738 
  3739 	@return An error code indicating if the registration was successful. KErrNone on success, 
  3740 		otherwise another of the system-wide error codes.
  3741 	*/
  3742 	IMPORT_C TInt RegisterAsClient(TUid aEventType,const TDesC8& aNotificationRegistrationData);
  3743 	
  3744 	/**
  3745 	Cancels the registered notification event.
  3746 
  3747 	@param  aEventType
  3748 		The Event to notify the client.
  3749 		
  3750 	@return An error code indicating if the cancel registration was successful. KErrNone on success, 
  3751 		otherwise another of the system-wide error codes.
  3752 	*/
  3753 	IMPORT_C TInt CancelRegisterAsClient(TUid aEventType);
  3754 	
  3755 	/**
  3756 	Gets the notification data for the event.
  3757 	
  3758 	@param  aEventType
  3759 		The Event to notify the client.
  3760 		
  3761 	@param aNotificationData
  3762 		The Notification data for the client to resume the play.
  3763 		
  3764 	@return An error code indicating if the get notification data was successful. KErrNone on success, 
  3765 		otherwise another of the system-wide error codes.
  3766 	*/
  3767 	IMPORT_C TInt GetResourceNotificationData(TUid aEventType,TDes8& aNotificationData);
  3768 	
  3769 	/**
  3770 	Waits for the client to resume the play even after the default timer expires.
  3771 
  3772 	@return An error code indicating if the registration was successful. KErrNone on success, 
  3773 			otherwise any of the system-wide error codes.
  3774 	*/
  3775 	IMPORT_C TInt WillResumePlay();
  3776 	};
  3777 
  3778 /**
  3779 @publishedAll
  3780 @released
  3781 
  3782 Mixin class to be derived from controller plugins that could support the audio resource notification
  3783 custom commands.
  3784 */
  3785 class MMMFResourceNotificationCustomCommandImplementor
  3786 	{
  3787 public:
  3788 	/**
  3789 	Registers the Event for Notification when resource is available.
  3790 
  3791 	@param aEventType
  3792 		The event which the client is notified of.
  3793 		
  3794 	@param aNotificationRegistrationData
  3795 		Notification registration specific data, which has been reserved for future use.
  3796 		
  3797 	@leave	This method may leave with one of the system-wide error codes.  KErrNotReady if there is no
  3798 			data sink.
  3799 	*/
  3800 	virtual void MarnRegisterAsClientL(TUid aEventType,const TDesC8& aNotificationRegistrationData) = 0;
  3801 	
  3802 	/**
  3803 	Cancels the registered notification event.
  3804 
  3805 	@param  aEventType
  3806 		The event to cancel.
  3807 		
  3808 	@leave This method may leave with one of the system-wide error codes.  KErrNotReady if there is no
  3809 			data sink.
  3810 	*/
  3811 	virtual void MarnCancelRegisterAsClientL(TUid aEventType) = 0;
  3812 	
  3813 	/**
  3814 	Gets the notification data for the event.
  3815 	
  3816 	@param  aEventType
  3817 		The event which the client is notified of.
  3818 		
  3819 	@param aNotificationData
  3820 		The Notification data for the client to resume playing.
  3821 		
  3822 	@leave This method may leave with one of the system-wide error codes.  KErrNotReady if there is no
  3823 			data sink, KErrArgument if unable to provide the notification data.
  3824 	*/
  3825 	virtual void MarnGetResourceNotificationDataL(TUid aEventType,TDes8& aNotificationData) = 0;
  3826 	
  3827 	/**
  3828 	Waits for the client to resume the play even after the default timer expires.
  3829 		
  3830 	@leave This method may leave with one of the system-wide error codes.  KErrNotReady if there is no
  3831 			data sink.
  3832 	*/
  3833 	virtual void MarnWillResumePlayL() = 0;
  3834 	};
  3835 
  3836 /**
  3837 @publishedAll
  3838 @released
  3839 
  3840 Client class to provide Audio resource notification controllers.
  3841 
  3842 The class uses the custom command function of the controller plugin, and removes the necessity
  3843 for the client to formulate the custom commands.
  3844 */
  3845 class CMMFResourceNotificationCustomCommandParser: public CMMFCustomCommandParserBase
  3846 	{
  3847 public:	
  3848 	/**
  3849 	Creates a new custom command parser capable of handling resource notification controller commands.
  3850 
  3851 	@param  aImplementor
  3852 	        A reference to the controller plugin that owns this new object.
  3853 
  3854 	@return A pointer to the object created.
  3855 
  3856 	@since  7.0s
  3857 	*/
  3858 	IMPORT_C static CMMFResourceNotificationCustomCommandParser* NewL(MMMFResourceNotificationCustomCommandImplementor& aImplementor);
  3859 	
  3860 	/**
  3861 	Destructor.
  3862 
  3863 	@since  7.0s
  3864 	*/
  3865 	IMPORT_C ~CMMFResourceNotificationCustomCommandParser();
  3866 	
  3867 	/**
  3868 	Handles a request from the client. Called by the controller framework.
  3869 
  3870 	@param  aMessage
  3871 	        The message to be handled.
  3872 
  3873 	@since  7.0s
  3874 	*/
  3875 	void HandleRequest(TMMFMessage& aMessage);
  3876 
  3877 private:
  3878 	/**
  3879 	Constructor.
  3880 
  3881 	@param  aImplementor
  3882 	        A reference to the controller plugin that owns this new object.
  3883 
  3884 	@since  7.0s
  3885 	*/
  3886 	CMMFResourceNotificationCustomCommandParser(MMMFResourceNotificationCustomCommandImplementor& aImplementor);
  3887 	void DoHandleRequestL(TMMFMessage& aMessage);
  3888 	// Internal request handling methods.
  3889 	TBool DoRegisterAsClientL(TMMFMessage& aMessage);
  3890 	TBool DoCancelRegisterAsClientL(TMMFMessage& aMessage);
  3891 	TBool DoGetResourceNotificationDataL(TMMFMessage& aMessage);
  3892 	TBool DoWillResumePlayL(TMMFMessage& aMessage);
  3893 private:
  3894     MMMFResourceNotificationCustomCommandImplementor& iImplementor;
  3895 	};
  3896 
  3897 /**
  3898 @publishedPartner
  3899 @prototype
  3900 
  3901 Client class to allow setting the initial screen for video display.
  3902 
  3903 */
  3904 class RMMFVideoSetInitScreenCustomCommands : public RMMFCustomCommandsBase
  3905 	{
  3906 public:
  3907 
  3908 	/**
  3909 	Constructor.
  3910 
  3911 	@param  aController
  3912 	        The client side controller object to be used by this custom command interface.
  3913 
  3914 	*/
  3915 	IMPORT_C RMMFVideoSetInitScreenCustomCommands(RMMFController& aController);
  3916 
  3917 	/**
  3918 	Sets the initial screen number for the video display on the controller.
  3919 
  3920 	@param  aScreenNumber
  3921 	        The screen number
  3922 	
  3923 	*/
  3924 	IMPORT_C TInt SetInitScreenNumber(TInt aScreenNumber);
  3925 	};
  3926 
  3927 
  3928 
  3929 /**
  3930 @publishedPartner
  3931 @prototype
  3932 
  3933 Mixin class to be derived from controller plugins that could support setting the initial screen for displaying video.
  3934 */
  3935 class MMMFVideoSetInitScreenCustomCommandImplementor
  3936 	{
  3937 public:
  3938 
  3939 	/**
  3940 	Sets the initial screen number.
  3941 
  3942 	@param  aScreenNumber
  3943 	        The screen number
  3944 	*/
  3945 	virtual void MvsdSetInitScreenNumber(TInt aScreenNumber)=0;
  3946 	};
  3947 
  3948 
  3949 /**
  3950 @publishedPartner
  3951 @prototype
  3952 
  3953 Custom command parser class to be used by controller plugins wishing to support setting the initial screen
  3954 number for the video display.
  3955 
  3956 The controller plugin should create an object of this type and add it to the list of custom command parsers 
  3957 in the controller framework. The controller plugin must be derived from MMMFVideoSetInitScreenCustomCommandImplementor 
  3958 to use this class. 
  3959 */
  3960 class CMMFVideoSetInitScreenCustomCommandParser : public CMMFCustomCommandParserBase
  3961 	{
  3962 public:
  3963 
  3964 	/**
  3965 	Creates a new custom command parser that supports setting screen device for video dusplay.
  3966 
  3967 	@param  aImplementor
  3968 	        A reference to the controller plugin that owns this new object.
  3969 
  3970 	@return A pointer to the object created.
  3971 
  3972 	*/
  3973 	IMPORT_C static CMMFVideoSetInitScreenCustomCommandParser* NewL(MMMFVideoSetInitScreenCustomCommandImplementor& aImplementor);
  3974 
  3975 	/**
  3976 	Destructor.
  3977 
  3978 	*/
  3979 	IMPORT_C ~CMMFVideoSetInitScreenCustomCommandParser();
  3980 
  3981 	/**
  3982 	Handles a request from the client. Called by the controller framework.
  3983 
  3984 	@param  aMessage
  3985 	        The message to be handled.
  3986 
  3987 	*/
  3988 	void HandleRequest(TMMFMessage& aMessage);
  3989 
  3990 private:
  3991 	/**
  3992 	Constructor.
  3993 
  3994 	@param  aImplementor
  3995 	        A reference to the controller plugin that owns this new object.
  3996 	*/
  3997 	CMMFVideoSetInitScreenCustomCommandParser(MMMFVideoSetInitScreenCustomCommandImplementor& aImplementor);
  3998 	void DoHandleRequestL(TMMFMessage& aMessage);
  3999 	TBool DoSetInitScreenNumberL(TMMFMessage& aMessage);
  4000 
  4001 private:
  4002 	MMMFVideoSetInitScreenCustomCommandImplementor& iImplementor;
  4003 	};
  4004 
  4005 
  4006 /**
  4007 @publishedPartner
  4008 @prototype
  4009 
  4010 Client class to allow setting and getting the pixel aspect ratio for video recording.
  4011 
  4012 */
  4013 class RMMFVideoPixelAspectRatioCustomCommands : public RMMFCustomCommandsBase
  4014 	{
  4015 public:
  4016 
  4017 	/**
  4018 	Constructor.
  4019 
  4020 	@param  aController
  4021 	        The client side controller object to be used by this custom command interface.
  4022 
  4023 	*/
  4024 	IMPORT_C RMMFVideoPixelAspectRatioCustomCommands(RMMFController& aController);
  4025 
  4026 	/**
  4027 	Sets the pixel aspect ratio for the video recording on the controller.
  4028 
  4029 	@param  aAspectRatio
  4030 	        The new pixel aspect ratio. The default pixel aspect ratio is 1:1.
  4031 	
  4032 	@return One of the system-wide error codes.
  4033 	
  4034 	*/
  4035 	IMPORT_C TInt SetPixelAspectRatio(const TVideoAspectRatio& aAspectRatio);
  4036 	
  4037 	/**
  4038 	Gets the current pixel aspect ratio for the video recording on the controller.
  4039 
  4040 	@param  aAspectRatio
  4041 	        The current video pixel aspect ratio.
  4042 
  4043 	@return One of the system-wide error codes.	
  4044 	*/
  4045 	IMPORT_C TInt GetPixelAspectRatio(TVideoAspectRatio& aAspectRatio) const;
  4046 	
  4047 	/**
  4048 	Gets the list of supported pixel aspect ratios for the video recording on the controller.
  4049 
  4050 	@param  aAspectRatios
  4051 	        The supported pixel aspect ratios.
  4052 	
  4053 	@leave	This method may leave with one of the system-wide error codes.
  4054 	*/
  4055 	IMPORT_C void GetSupportedPixelAspectRatiosL(RArray<TVideoAspectRatio>& aAspectRatios) const;
  4056 
  4057 private:
  4058 	void DoGetVideoPixelAspectRatioArrayL(RArray<TVideoAspectRatio>& aArray, TMMFVideoPixelAspectRatioMessages aIpc) const;
  4059 	};
  4060 
  4061 
  4062 /**
  4063 @publishedPartner
  4064 @prototype
  4065 
  4066 Mixin class to be derived from controller plug-ins that could support setting and getting the pixel aspect ratio for video recording. 
  4067 */
  4068 class MMMFVideoPixelAspectRatioCustomCommandImplementor
  4069 	{
  4070 public:
  4071 
  4072 	/**
  4073 	Sets the pixel aspect ratio.
  4074 
  4075 	@param  aAspectRatio
  4076 	        The pixel aspect ratio to use.
  4077 	*/
  4078 	virtual void MvparSetPixelAspectRatioL(const TVideoAspectRatio& aAspectRatio) = 0;
  4079 
  4080 	/**
  4081 	Gets the current pixel aspect ratio.
  4082 
  4083 	@param  aAspectRatio
  4084 	        The current pixel aspect ratio.
  4085 	*/
  4086 	virtual void MvparGetPixelAspectRatioL(TVideoAspectRatio& aAspectRatio) = 0;
  4087 	
  4088 	/**
  4089 	Gets the list of supported pixel aspect ratios.
  4090 
  4091 	@param  aAspectRatios
  4092 	        The list of supported pixel aspect ratios.
  4093 	*/
  4094 	virtual void MvparGetSupportedPixelAspectRatiosL(RArray<TVideoAspectRatio>& aAspectRatios) = 0;
  4095 	};
  4096 
  4097 
  4098 /**
  4099 @publishedPartner
  4100 @prototype
  4101 
  4102 Custom command parser class to be used by controller plug-ins wishing to support setting and getting the pixel aspect 
  4103 ratio for the video recording.
  4104 
  4105 The controller plug-in should create an object of this type and add it to the list of custom command parsers 
  4106 in the controller framework. The controller plug-in must be derived from MMMFVideoPixelAspectRatioCustomCommandImplementor 
  4107 to use this class. 
  4108 */
  4109 class CMMFVideoPixelAspectRatioCustomCommandParser : public CMMFCustomCommandParserBase
  4110 	{
  4111 public:
  4112 
  4113 	/**
  4114 	Creates a new custom command parser that supports setting and getting pixel aspect ratio for video recording.
  4115 
  4116 	@param  aImplementor
  4117 	        A reference to the controller plug-in that owns this new object.
  4118 
  4119 	@return A pointer to the object created.
  4120 
  4121 	*/
  4122 	IMPORT_C static CMMFVideoPixelAspectRatioCustomCommandParser* NewL(MMMFVideoPixelAspectRatioCustomCommandImplementor& aImplementor);
  4123 
  4124 	/**
  4125 	Destructor.
  4126 
  4127 	*/
  4128 	IMPORT_C ~CMMFVideoPixelAspectRatioCustomCommandParser();
  4129 
  4130 	/**
  4131 	Handles a request from the client. Called by the controller framework.
  4132 
  4133 	@param  aMessage
  4134 	        The message to be handled.
  4135 
  4136 	*/
  4137 	void HandleRequest(TMMFMessage& aMessage);
  4138 
  4139 private:
  4140 	CMMFVideoPixelAspectRatioCustomCommandParser(MMMFVideoPixelAspectRatioCustomCommandImplementor& aImplementor);
  4141 	void DoHandleRequestL(TMMFMessage& aMessage);
  4142 	TBool DoSetPixelAspectRatioL(TMMFMessage& aMessage);
  4143 	TBool DoGetPixelAspectRatioL(TMMFMessage& aMessage);
  4144 	TBool DoGetSupportedPixelAspectRatiosL(TMMFMessage& aMessage);
  4145 	TBool DoCopyArrayDataL(TMMFMessage& aMessage);
  4146 	void DoCreateBufFromVideoAspectRatioArrayL(RArray<TVideoAspectRatio>& aArray);
  4147 
  4148 private:
  4149 	MMMFVideoPixelAspectRatioCustomCommandImplementor& iImplementor;
  4150 	
  4151 	CBufFlat* iDataCopyBuffer;
  4152 	};
  4153 
  4154 
  4155 /**
  4156 @publishedPartner
  4157 @prototype
  4158 
  4159 Client class to allow the audio sampling rate and channels configuration for video recording.
  4160 
  4161 */
  4162 class RMMFVideoAudioSamplingRateAndChannelConfigCustomCommands : public RMMFCustomCommandsBase
  4163 	{
  4164 public:
  4165 
  4166 	/**
  4167 	Constructor.
  4168 
  4169 	@param  aController
  4170 	        The client side controller object to be used by this custom command interface.
  4171 
  4172 	*/
  4173 	IMPORT_C RMMFVideoAudioSamplingRateAndChannelConfigCustomCommands(RMMFController& aController);
  4174 
  4175 	/**
  4176 	Sets the number of audio channels to record (1 for mono, 2 for stereo).
  4177 
  4178 	@param  aChannels
  4179 	        The number of audio channels to record.
  4180 
  4181 	@return One of the system-wide error codes.
  4182 	
  4183 	*/
  4184 	IMPORT_C TInt SetAudioChannels(const TUint aChannels);
  4185 
  4186 	/**
  4187 	Gets the current number of audio channels to record (1 for mono, 2 for stereo).
  4188 
  4189 	@param  aChannels
  4190 	        The current number of audio channels to record.
  4191 
  4192 	@return One of the system-wide error codes.
  4193 	
  4194 	*/
  4195 	IMPORT_C TInt GetAudioChannels(TUint& aChannels) const;
  4196 
  4197 	/**
  4198 	Gets the list of supported number of audio channels for video recording.
  4199 
  4200 	@param  aChannels
  4201 	        The supported numbers of audio channels.
  4202 	
  4203 	@leave	This method may leave with one of the system-wide error codes.
  4204 	*/
  4205 	IMPORT_C void GetSupportedAudioChannelsL(RArray<TUint>& aChannels) const;
  4206 	
  4207 	/**
  4208 	Sets the audio sample rate for video recording.
  4209 
  4210 	@param  aSampleRate
  4211 	        The sample rate for audio recording.
  4212 
  4213 	@return One of the system-wide error codes.
  4214 	
  4215 	*/
  4216 	IMPORT_C TInt SetAudioSampleRate(const TUint aSampleRate);
  4217 
  4218 	/**
  4219 	Gets the current audio sample rate for recording.
  4220 
  4221 	@param  aSampleRate
  4222 	        The current audio sample rate for recording.
  4223 
  4224 	@return One of the system-wide error codes.
  4225 	
  4226 	*/
  4227 	IMPORT_C TInt GetAudioSampleRate(TUint& aSampleRate) const;
  4228 
  4229 	/**
  4230 	Gets the list of supported audio sample rates for video recording.
  4231 
  4232 	@param  aSampleRates
  4233 	        The supported audio sample rates.
  4234 	
  4235 	@leave	This method may leave with one of the system-wide error codes.
  4236 	*/
  4237 	IMPORT_C void GetSupportedAudioSampleRatesL(RArray<TUint>& aSampleRates) const;
  4238 	
  4239 private:
  4240 	void DoGetUintArrayL(RArray<TUint>& aArray, TMMFVideoAudioSamplingRateAndChannelConfigMessages aIpc) const;
  4241 	};
  4242 
  4243 
  4244 /**
  4245 @publishedPartner
  4246 @prototype
  4247 
  4248 Mixin class to be derived from controller plug-ins that could support the audio sampling rate and channels configuration. 
  4249 */
  4250 class MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor
  4251 	{
  4252 public:
  4253 
  4254 	/**
  4255 	Sets the number of audio channels.
  4256 
  4257 	@param  aChannels
  4258 	        The number of audio channels to use.
  4259 	*/
  4260 	virtual void MvasrccSetAudioChannelsL(const TUint aChannels) = 0;
  4261 
  4262 	/**
  4263 	Gets the current number of audio channels.
  4264 
  4265 	@param  aChannels
  4266 	        The current number of audio channels.
  4267 	*/
  4268 	virtual void MvasrccGetAudioChannelsL(TUint& aChannels) = 0;
  4269 
  4270 	/**
  4271 	Gets the list of supported number of audio channels.
  4272 
  4273 	@param  aChannels
  4274 	        The list of supported number of audio channels.
  4275 	*/
  4276 	virtual void MvasrccGetSupportedAudioChannelsL(RArray<TUint>& aChannels) = 0;
  4277 	
  4278 	/**
  4279 	Sets the audio sample rate.
  4280 
  4281 	@param  aSampleRate
  4282 	        The audio sample rate to use.
  4283 	*/
  4284 	virtual void MvasrccSetAudioSampleRateL(const TUint aSampleRate) = 0;
  4285 
  4286 	/**
  4287 	Gets the current audio sample rate.
  4288 
  4289 	@param  aSampleRate
  4290 	        The current audio sample rate.
  4291 	*/
  4292 	virtual void MvasrccGetAudioSampleRateL(TUint& aSampleRate) = 0;
  4293 
  4294 	/**
  4295 	Gets the list of supported audio sample rates.
  4296 
  4297 	@param  aSampleRates
  4298 	        The list of supported audio sample rates.
  4299 	*/
  4300 	virtual void MvasrccGetSupportedAudioSampleRatesL(RArray<TUint>& aSampleRates) = 0;
  4301 	};
  4302 
  4303 /**
  4304 @publishedPartner
  4305 @prototype
  4306 
  4307 Custom command parser class to be used by controller plug-ins wishing to support the audio sampling rate and channels
  4308 configuration for the video recording.
  4309 
  4310 The controller plug-in should create an object of this type and add it to the list of custom command parsers 
  4311 in the controller framework. The controller plug-in must be derived from MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor 
  4312 to use this class. 
  4313 */
  4314 class CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser : public CMMFCustomCommandParserBase
  4315 	{
  4316 public:
  4317 
  4318 	/**
  4319 	Creates a new custom command parser that supports the audio sampling rate and channels configuration for video recording.
  4320 
  4321 	@param  aImplementor
  4322 	        A reference to the controller plug-in that owns this new object.
  4323 
  4324 	@return A pointer to the object created.
  4325 
  4326 	*/
  4327 	IMPORT_C static CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser* NewL(MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor& aImplementor);
  4328 
  4329 	/**
  4330 	Destructor.
  4331 
  4332 	*/
  4333 	IMPORT_C ~CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser();
  4334 
  4335 	/**
  4336 	Handles a request from the client. Called by the controller framework.
  4337 
  4338 	@param  aMessage
  4339 	        The message to be handled.
  4340 
  4341 	*/
  4342 	void HandleRequest(TMMFMessage& aMessage);
  4343 
  4344 private:
  4345 	CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser(MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor& aImplementor);
  4346 	void DoHandleRequestL(TMMFMessage& aMessage);
  4347 	TBool DoSetAudioChannelsL(TMMFMessage& aMessage);
  4348 	TBool DoGetAudioChannelsL(TMMFMessage& aMessage);
  4349 	TBool DoGetSupportedAudioChannelsL(TMMFMessage& aMessage);
  4350 	
  4351 	TBool DoSetAudioSampleRateL(TMMFMessage& aMessage);
  4352 	TBool DoGetAudioSampleRateL(TMMFMessage& aMessage);
  4353 	TBool DoGetSupportedAudioSampleRatesL(TMMFMessage& aMessage);
  4354 	
  4355 	TBool DoCopyArrayDataL(TMMFMessage& aMessage);
  4356 	
  4357 	void DoCreateBufFromUintArrayL(RArray<TUint>& aArray);
  4358 
  4359 private:
  4360 	MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor& iImplementor;
  4361 	
  4362 	CBufFlat* iDataCopyBuffer;
  4363 	};
  4364 
  4365 /**
  4366 @publishedPartner
  4367 @prototype
  4368 */
  4369 const TUid KUidInterfaceMMFVideoPlayExt = {0x10283437};	
  4370 
  4371 /**
  4372 Mixin class to be derived from controller plug-ins that could support
  4373 play velocity, enabling/disabling audio/video, and auto scaling.
  4374 
  4375 @publishedPartner
  4376 @prototype
  4377 */	
  4378 class MMMFVideoPlayControllerExtCustomCommandImplementor
  4379 	{
  4380 public:
  4381 
  4382 	/**
  4383 	Sets play velocity. 
  4384 	Behaviour is same as CVideoPlayerUtility::SetPlayVelocityL
  4385 	
  4386 	@see CVideoPlayerUtility::SetPlayVelocityL
  4387 	*/
  4388 	virtual void MvpecSetPlayVelocityL(TInt aVelocity)=0;
  4389 	
  4390 	/**
  4391 	Gets play velocity.
  4392 	Behaviour is same as CVideoPlayerUtility::PlayVelocityL	
  4393 	
  4394 	@see CVideoPlayerUtility::PlayVelocityL
  4395 	*/
  4396 	virtual TInt MvpecPlayVelocityL()=0;
  4397 	
  4398 	/**
  4399 	Steps through frames in pause mode.
  4400 	Behaviour is same as CVideoPlayerUtility::StepFrameL	
  4401 		
  4402 	@see CVideoPlayerUtility::StepFrameL
  4403 	*/
  4404 	virtual void MvpecStepFrameL(TInt aStep)=0;
  4405 	
  4406 	/**
  4407 	Gets play rate capabilities.
  4408 	Behaviour is same as CVideoPlayerUtility::GetPlayRateCapabilitiesL	
  4409 		
  4410 	@see CVideoPlayerUtility::GetPlayRateCapabilitiesL
  4411 	*/
  4412 	virtual void MvpecGetPlayRateCapabilitiesL(TVideoPlayRateCapabilities& aCapabilities)=0;
  4413 	
  4414 	/**
  4415 	Enables/Disables video playback.
  4416 	Behaviour is same as CVideoPlayerUtility::SetVideoEnabledL	
  4417 	
  4418 	@see CVideoPlayerUtility::SetVideoEnabledL
  4419 	*/
  4420 	virtual void MvpecSetVideoEnabledL(TBool aVideoEnabled)=0;
  4421 	
  4422 	/**
  4423     Queries whether video playback is currently enabled or not.
  4424 	Behaviour is same as CVideoPlayerUtility::VideoEnabledL	
  4425 	
  4426 	@see CVideoPlayerUtility::VideoEnabledL
  4427 	*/
  4428 	virtual TBool MvpecVideoEnabledL()=0;
  4429 	
  4430 	/**
  4431 	Enables or disables audio playback.
  4432 	Behaviour is same as CVideoPlayerUtility::SetAudioEnabled	
  4433 	
  4434 	@see CVideoPlayerUtility::SetAudioEnabled
  4435 	*/
  4436 	virtual void MvpecSetAudioEnabledL(TBool aAudioEnabled)=0;
  4437 	
  4438 	/**
  4439 	Sets Auto scale mode.
  4440 	Behaviour is same as CVideoPlayerUtility::SetAutoScaleL	
  4441 	
  4442 	@see CVideoPlayerUtility::SetAutoScaleL
  4443 	*/
  4444 	virtual void MvpecSetAutoScaleL(TAutoScaleType aScaleType, TInt aHorizPos, TInt aVertPos)=0;
  4445 	};
  4446 
  4447 /**
  4448 Used for commands between RMMFVideoPlayControllerExtCustomCommands and 
  4449 CMMFVideoPlayControllerExtCustomCommandParser classes.
  4450 
  4451 @internalComponent
  4452 */
  4453 enum TMMFVideoPlayControllerExtCustomCommandConfigMessages
  4454 	{
  4455 	EMMFVideoPlayControllerSetPlayVelocity = 0,
  4456 	EMMFVideoPlayControllerPlayVelocity,
  4457 	EMMFVideoPlayControllerStepFrame,
  4458 	EMMFVideoPlayControllerGetPlayRateCapabilities,
  4459 	EMMFVideoPlayControllerSetVideoEnabled,
  4460 	EMMFVideoPlayControllerVideoEnabled,
  4461 	EMMFVideoPlayControllerSetAudioEnabled,
  4462 	EMMFVideoPlayControllerSetAutoScale
  4463 	};
  4464 /**
  4465 @internalComponent
  4466 */
  4467 class TMMFVideoPlayAutoScaleParams
  4468 	{
  4469 public:
  4470 	TAutoScaleType iScaleType;
  4471 	TInt iHorizPos;
  4472 	TInt iVertPos;
  4473 	};
  4474 	
  4475 /**
  4476 Custom command parser class to be used by controller plug-ins wishing to support play velocity, 
  4477 enabling/disabling audio/video, and auto scaling.
  4478 
  4479 The controller plug-in should create an object of this type and add it to the list of custom command parsers 
  4480 in the controller framework. The controller plug-in must be derived from MMMFVideoPlayControllerExtCustomCommandImplementor 
  4481 to use this class. 
  4482 
  4483 @publishedPartner
  4484 @prototype
  4485 */
  4486 class CMMFVideoPlayControllerExtCustomCommandParser : public CMMFCustomCommandParserBase
  4487 	{
  4488 public:
  4489 
  4490 	/**
  4491 	Creates a new custom command parser that supports the video rate control and auto scaling.
  4492 
  4493 	@param  aImplementor
  4494 	        A reference to the controller plug-in that owns this new object.
  4495 
  4496 	@return A pointer to the object created.
  4497 
  4498 	*/
  4499 	IMPORT_C static CMMFVideoPlayControllerExtCustomCommandParser* NewL(MMMFVideoPlayControllerExtCustomCommandImplementor& aImplementor);
  4500 
  4501 	/**
  4502 	Destructor.
  4503 
  4504 	*/
  4505 	IMPORT_C ~CMMFVideoPlayControllerExtCustomCommandParser();
  4506 
  4507 	/**
  4508 	Handles a request from the client. Called by the controller framework.
  4509 
  4510 	@param  aMessage
  4511 	        The message to be handled.
  4512 
  4513 	*/
  4514 	void HandleRequest(TMMFMessage& aMessage);
  4515 
  4516 private:
  4517 	CMMFVideoPlayControllerExtCustomCommandParser(MMMFVideoPlayControllerExtCustomCommandImplementor& aImplementor);
  4518 	void DoHandleRequestL(TMMFMessage& aMessage);
  4519 	TBool DoSetPlayVelocityL(TMMFMessage& aMessage);
  4520 	TBool DoPlayVelocityL(TMMFMessage& aMessage);
  4521 	TBool DoStepFrameL(TMMFMessage& aMessage);
  4522 	TBool DoGetPlayRateCapabilitiesL(TMMFMessage& aMessage);
  4523 	TBool DoSetVideoEnabledL(TMMFMessage& aMessage);
  4524 	TBool DoVideoEnabledL(TMMFMessage& aMessage);
  4525 	TBool DoSetAudioEnabledL(TMMFMessage& aMessage);
  4526 	TBool DoSetAutoScaleL(TMMFMessage& aMessage);
  4527 private:
  4528 	MMMFVideoPlayControllerExtCustomCommandImplementor& iImplementor;
  4529 	};
  4530 
  4531 /**
  4532 Resource class to be used by player utility for sending custom commands.
  4533 
  4534 @publishedPartner
  4535 @prototype
  4536 */	
  4537 class RMMFVideoPlayControllerExtCustomCommands: public RMMFCustomCommandsBase
  4538 	{
  4539 public:
  4540 	/**
  4541 	Constructor.
  4542 
  4543 	@param  aController
  4544 	        The client side controller object to be used by this custom command interface.
  4545 	*/
  4546 	IMPORT_C RMMFVideoPlayControllerExtCustomCommands(RMMFController& aController);
  4547 	
  4548 	/**
  4549 	Sets play velocity.
  4550 	Behaviour is same as CVideoPlayerUtility::SetPlayVelocityL
  4551 		
  4552 	@param  aVelocity 
  4553 			Velocity of the playback.
  4554 
  4555 	@return One of the system-wide error codes.	
  4556 
  4557 	@see CVideoPlayerUtility::SetPlayVelocityL	
  4558 	*/
  4559 	IMPORT_C TInt SetPlayVelocity(TInt aVelocity);
  4560 
  4561 	/**
  4562 	Gets play velocity.
  4563 	Behaviour is same as CVideoPlayerUtility::PlayVelocityL	
  4564 
  4565 	@param  aVelocity 
  4566 			Velocity of the playback.
  4567 
  4568 	@return One of the system-wide error codes.	
  4569 		
  4570 	@see CVideoPlayerUtility::PlayVelocityL
  4571 	*/
  4572 	IMPORT_C TInt PlayVelocity(TInt &aVelocity)const;
  4573 
  4574 	/**
  4575 	Steps through frames in pause mode.
  4576 	Behaviour is same as CVideoPlayerUtility::StepFrameL	
  4577 
  4578 	@param  aStep 
  4579 			Count indicating number of frames to step playback position.
  4580 
  4581 	@return One of the system-wide error codes.
  4582 
  4583 	@see CVideoPlayerUtility::StepFrameL
  4584 	*/
  4585 	IMPORT_C TInt StepFrame(TInt aStep);
  4586 	
  4587 	/**
  4588 	Gets play rate capabilities.
  4589 	Behaviour is same as CVideoPlayerUtility::GetPlayRateCapabilitiesL	
  4590 
  4591     @param aCapabilities Playback rate capabilities
  4592 
  4593 	@return One of the system-wide error codes.
  4594 		
  4595 	@see CVideoPlayerUtility::GetPlayRateCapabilitiesL
  4596 	*/
  4597 	IMPORT_C TInt GetPlayRateCapabilities(TVideoPlayRateCapabilities& aCapabilities)const;
  4598 
  4599 	/**
  4600 	Enables/Disables video playback.
  4601 	Behaviour is same as CVideoPlayerUtility::SetVideoEnabledL	
  4602     
  4603     @param aVideoEnabled ETrue to enable video playback, EFalse to disable
  4604 
  4605 	@return One of the system-wide error codes.    	
  4606 
  4607 	@see CVideoPlayerUtility::SetVideoEnabledL
  4608 	*/
  4609 	IMPORT_C TInt SetVideoEnabled(TBool aVideoEnabled);
  4610 	
  4611 	/**
  4612     Queries whether video playback is currently enabled or not.
  4613 	Behaviour is same as CVideoPlayerUtility::VideoEnabledL
  4614 
  4615     @param aVideoEnabled 
  4616     	   Out parameter returns ETrue if video playback is enabled, EFalse if not.
  4617 
  4618 	@return One of the system-wide error codes.
  4619 	
  4620 	@see CVideoPlayerUtility::VideoEnabledL
  4621 	*/
  4622 	IMPORT_C TInt VideoEnabled(TBool &aVideoEnabled)const;
  4623 	
  4624 	/**
  4625 	Enables or disables audio playback.
  4626 	Behaviour is same as CVideoPlayerUtility::SetAudioEnabledL
  4627 
  4628     @param aVideoEnabled ETrue to enable audio playback, EFalse to disable		
  4629 
  4630 	@return One of the system-wide error codes.
  4631 
  4632 	@see CVideoPlayerUtility::SetAudioEnabledL
  4633 	*/
  4634 	IMPORT_C TInt SetAudioEnabled(TBool aAudioEnabled);
  4635 
  4636 	/**
  4637 	Sets Auto scale mode.
  4638  	Behaviour is same as CVideoPlayerUtility::SetAutoScaleL
  4639 	
  4640     @param aScaleType Automatic scaling type
  4641     @param aHorizPos Video picture horizontal position, relative to the
  4642                      video window.
  4643     @param aVertPos Video picture vertical position, relative to the
  4644                      video window.
  4645 	@return One of the system-wide error codes.
  4646 		
  4647 	@see CVideoPlayerUtility::SetAutoScaleL
  4648 	*/
  4649 	IMPORT_C TInt SetAutoScale(TAutoScaleType aScaleType, TInt aHorizPos, TInt aVertPos);
  4650 	};
  4651 
  4652 /**
  4653 @publishedPartner
  4654 @prototype
  4655 */
  4656 const TUid KUidInterfaceMMFVideoRecorderExt = {0x10283438};
  4657 
  4658 /**
  4659 Mixin class to be derived from controller plug-ins that could support quality and enabling video. 
  4660 
  4661 @publishedPartner
  4662 @prototype
  4663 */	
  4664 class MMMFVideoRecordControllerExtCustomCommandImplementor
  4665 	{
  4666 public:
  4667 
  4668 	/**
  4669 	Enabled or disables video in recorder.
  4670 	Behaviour is same as CVideoRecorderUtility::SetVideoEnabledL	
  4671 
  4672 	@see CVideoRecorderUtility::SetVideoEnabledL
  4673 	*/
  4674     virtual void MvrecSetVideoEnabledL(TBool aEnabled)=0;
  4675 	/**
  4676 	Gets the flag that indicates video enabled or not.
  4677 	Behaviour is same as CVideoRecorderUtility::VideoEnabledL	
  4678 
  4679 	@see CVideoRecorderUtility::VideoEnabledL
  4680 	*/
  4681     virtual TBool MvrecVideoEnabledL() const=0;
  4682 	/**
  4683 	Sets the quality of video being recorded.
  4684 	Behaviour is same as CVideoRecorderUtility::SetVideoQualityL	
  4685 
  4686 	@see CVideoRecorderUtility::SetVideoQualityL
  4687 	*/
  4688     virtual void MvrecSetVideoQualityL(TInt aQuality)=0;
  4689 	/**
  4690 	Gets video quality level set using SetVideoQualityL.
  4691 	Behaviour is same as CVideoRecorderUtility::VideoQualityL	
  4692 
  4693 	@see CVideoRecorderUtility::VideoQualityL
  4694 	*/
  4695     virtual TInt MvrecVideoQualityL() const=0;
  4696 	/**
  4697 	Sets the video framerate to fixed.
  4698 	Behaviour is same as CVideoRecorderUtility::SetVideoFrameRateFixedL	
  4699 
  4700 	@see CVideoRecorderUtility::SetVideoFrameRateFixedL
  4701 	*/
  4702     virtual void MvrecSetVideoFrameRateFixedL(TBool aFixedFrameRate)=0;
  4703 	/**
  4704 	Gets FrameRateFixed flag set using SetVideoFrameRateFixedL.
  4705 	Behaviour is same as CVideoRecorderUtility::VideoFrameRateFixedL	
  4706 
  4707 	@see CVideoRecorderUtility::VideoFrameRateFixedL
  4708 	*/
  4709     virtual TBool MvrecVideoFrameRateFixedL() const=0;
  4710 	};
  4711 
  4712 /**
  4713 @internalComponent
  4714 */
  4715 enum TMMFVideoRecorderExtCustomCommandConfigMessages
  4716 	{
  4717 	EMMFVideoRecordControllerSetVideoEnabled = 0,
  4718 	EMMFVideoRecordControllerVideoEnabled,
  4719 	EMMFVideoRecordControllerSetVideoQuality,	
  4720 	EMMFVideoRecordControllerVideoQuality,
  4721 	EMMFVideoRecordControllerSetVideoFrameRateFixed,
  4722 	EMMFVideoRecordControllerVideoFrameRateFixed
  4723 	};
  4724 
  4725 /**
  4726 Custom command parser class to be used by controller plug-ins wishing to implement VideoRecorderExt custom commands.
  4727 
  4728 The controller plug-in should create an object of this type and add it to the list of custom command parsers 
  4729 in the controller framework. The controller plug-in must be derived from MMMFVideoRecordControllerExtCustomCommandImplementor
  4730 to use this class.
  4731 
  4732 @publishedPartner
  4733 @prototype
  4734 */
  4735 class CMMFVideoRecordControllerExtCustomCommandParser : public CMMFCustomCommandParserBase
  4736 	{
  4737 public:
  4738 
  4739 	/**
  4740 	Creates a new custom command parser that supports the video rate control and auto scaling.
  4741 
  4742 	@param  aImplementor A reference to the controller plug-in that owns this new object.
  4743 	@return A pointer to the object created.
  4744 	*/
  4745 	IMPORT_C static CMMFVideoRecordControllerExtCustomCommandParser* NewL(MMMFVideoRecordControllerExtCustomCommandImplementor& aImplementor);
  4746 
  4747 	/**
  4748 	Destructor.
  4749 	*/
  4750 	IMPORT_C ~CMMFVideoRecordControllerExtCustomCommandParser();
  4751 
  4752 	/**
  4753 	Handles a request from the client. Called by the controller framework.
  4754 
  4755 	@param  aMessage The message to be handled.
  4756 	*/
  4757 	void HandleRequest(TMMFMessage& aMessage);
  4758 
  4759 private:
  4760 	CMMFVideoRecordControllerExtCustomCommandParser(MMMFVideoRecordControllerExtCustomCommandImplementor& aImplementor);
  4761 	void DoHandleRequestL(TMMFMessage& aMessage);
  4762 	TBool DoSetVideoEnabledL(TMMFMessage& aMessage);
  4763 	TBool DoVideoEnabledL(TMMFMessage& aMessage);
  4764 	TBool DoSetVideoQualityL(TMMFMessage& aMessage);
  4765 	TBool DoVideoQualityL(TMMFMessage& aMessage);
  4766 	TBool DoSetVideoFrameRateFixedL(TMMFMessage& aMessage);
  4767 	TBool DoVideoFrameRateFixedL(TMMFMessage& aMessage);
  4768 private:
  4769 	MMMFVideoRecordControllerExtCustomCommandImplementor& iImplementor;
  4770 	};
  4771 
  4772 /**
  4773 Resource class to be used by Recorder utility for sending custom commands.
  4774 
  4775 @publishedPartner
  4776 @prototype
  4777 */	
  4778 class RMMFVideoRecordControllerExtCustomCommands: public RMMFCustomCommandsBase
  4779 	{
  4780 public:
  4781 	/**
  4782 	Constructor.
  4783 
  4784 	@param  aController
  4785 	        The client side controller object to be used by this custom command interface.
  4786 	@return One of the system-wide error codes.
  4787 	*/
  4788 	IMPORT_C RMMFVideoRecordControllerExtCustomCommands(RMMFController& aController);
  4789 	
  4790 	/**
  4791 	Enabled or disables video in recorder.
  4792 	Behaviour is same as CVideoRecorderUtility::SetVideoEnabledL	
  4793 
  4794     @param aEnabled ETrue to enable video recording, EFalse to enable it
  4795 
  4796 	@return One of the system-wide error codes.	
  4797 	@see CVideoRecorderUtility::SetVideoEnabledL
  4798 	*/
  4799     IMPORT_C TInt SetVideoEnabled(TBool aEnabled);
  4800     
  4801 	/**
  4802 	Gets the flag that indicates video enabled or not.
  4803 	Behaviour is same as CVideoRecorderUtility::VideoEnabledL	
  4804 
  4805     @param aEnabled 
  4806     	   Out parameter returns ETrue if video recording is enabled , EFalse otherwise.
  4807 
  4808 	@return One of the system-wide error codes.	
  4809 	@see CVideoRecorderUtility::VideoEnabledL
  4810 	*/
  4811     IMPORT_C TInt VideoEnabled(TBool &aEnabled) const;
  4812     
  4813 	/**
  4814 	Sets the quality of video being recorded.
  4815 	Behaviour is same as CVideoRecorderUtility::SetVideoQualityL	
  4816 
  4817     @param aQuality Video quality, in the range of 0 to 100, inclusive.
  4818 
  4819 	@return One of the system-wide error codes.	
  4820 	@see CVideoRecorderUtility::SetVideoQualityL
  4821 	*/
  4822     IMPORT_C TInt SetVideoQuality(TInt aQuality);
  4823     
  4824 	/**
  4825 	Gets video quality level set using SetVideoQualityL.
  4826 	Behaviour is same as CVideoRecorderUtility::VideoQualityL	
  4827     
  4828     @param aQuality Out parameter returning Video quality in the range 0-100.
  4829     
  4830     @return One of the system-wide error codes.	
  4831 	@see CVideoRecorderUtility::VideoQualityL
  4832 	*/
  4833     IMPORT_C TInt VideoQuality(TInt &aQuality) const;
  4834     
  4835 	/**
  4836 	Sets the video framerate to fixed.
  4837 	Behaviour is same as CVideoRecorderUtility::SetVideoFrameRateFixedL	
  4838 	
  4839     @param aFixedFrameRate ETrue to request a fixed framerate, EFalse to
  4840                           request a variable framerate.
  4841 
  4842 	@return One of the system-wide error codes.	
  4843 	@see CVideoRecorderUtility::SetVideoFrameRateFixedL
  4844 	*/
  4845     IMPORT_C TInt SetVideoFrameRateFixed(TBool aFixedFrameRate);
  4846     
  4847 	/**
  4848 	Gets FrameRateFixed flag set using SetVideoFrameRateFixedL.
  4849 	Behaviour is same as CVideoRecorderUtility::VideoFrameRateFixedL	
  4850 
  4851     @param aFixedFrameRate Out parameter returns ETrue if fixed framerate
  4852      						is enabled, EFalse otherwise.
  4853     
  4854 	@return One of the system-wide error codes.	
  4855 	@see CVideoRecorderUtility::VideoFrameRateFixedL
  4856 	*/
  4857     IMPORT_C TInt VideoFrameRateFixed(TBool &aFixedFrameRate) const;
  4858     };
  4859 
  4860 /**
  4861 @publishedPartner
  4862 @released
  4863 
  4864 Interface UID and messages for the Audio Play Controller Set Repeats API.
  4865 */
  4866 const TUid KUidInterfaceMMFAudioPlaySetRepeatsController = {0x102834D5};
  4867 
  4868 /**
  4869 @internalComponent
  4870 */
  4871 enum TMMFAudioPlayControllerSetRepeatsMessages
  4872 	{
  4873 	EMMFAudioPlayControllerSetRepeats
  4874 	};
  4875 
  4876 /**
  4877 @publishedPartner
  4878 @released
  4879 
  4880 Client class to access loop play functionality of audio play controller.
  4881 
  4882 The class uses the custom command function of the controller plugin, and removes the necessity
  4883 for the client to formulate the custom commands.
  4884 */
  4885 class RMMFAudioPlayControllerSetRepeatsCustomCommands : public RMMFCustomCommandsBase
  4886 	{
  4887 public:
  4888 	
  4889 	/**
  4890 	Constructor.
  4891 
  4892 	@param  aController
  4893 	        The client side controller object to be used by this custom command interface.
  4894 	*/
  4895 	IMPORT_C RMMFAudioPlayControllerSetRepeatsCustomCommands(RMMFController& aController);
  4896 
  4897 	/**
  4898 	Sets the number of times the audio sample to be repeated and the trailing silence period
  4899 	
  4900 	@param  aRepeatNumberOfTimes
  4901 			The number of times the audio sample needs to be repeated
  4902 	
  4903 	@param  aTrailingSilence
  4904 	        The time interval of the trailing silence in microseconds.
  4905 	        
  4906 	@return KErrNotSupported if the controller plugin does not support the loop play functionality.
  4907 	*/
  4908 	IMPORT_C TInt SetRepeats(TInt aRepeatNumberOfTimes, const TTimeIntervalMicroSeconds& aTrailingSilence);
  4909 	};
  4910 
  4911 /**
  4912 @publishedPartner
  4913 @released
  4914 
  4915 Mixin class to be derived from by controller plugins that could support the set repeats custom command.
  4916 */
  4917 class MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor
  4918 	{
  4919 public:
  4920 
  4921 	/**
  4922 	Sets the number of times the audio sample is to be repeated during the playback operation.	
  4923 	A period of silence can follow each playing of the sample. The audio sample can be repeated indefinitely.
  4924 	
  4925 	@param	aRepeatNumberOfTimes
  4926     		The number of times the audio sample, together with the trailing silence, is to be repeated. 
  4927     		If this is set to KMdaRepeatForever, then the audio sample, together with the trailing silence, 
  4928     		is repeated indefinitely or until Stop() is called. 
  4929     		If this is set to zero, then the audio sample is not repeated.
  4930 	
  4931 	@param  aTrailingSilence
  4932          	The time interval of the trailing silence in microseconds.
  4933 	
  4934 	@return	KErrNone if the controller plugin supports the loop play functionality
  4935 			KErrNotSupported if the controller plugin does not support the loop play functionality
  4936 			KErrNotReady if the controller plugin is not yet added the audio sink
  4937 	*/		
  4938 	virtual TInt MapcSetRepeats(TInt aRepeatNumberOfTimes, const TTimeIntervalMicroSeconds& aTrailingSilence) = 0;		
  4939 	};
  4940 
  4941 /**
  4942 @publishedPartner
  4943 @released
  4944 
  4945 Custom command parser class to be used by controller plugins wishing to support set repeats functionality
  4946 
  4947 The controller plugin should create an object of this type and add it to the list of custom command parsers 
  4948 in the controller framework. The controller plugin must be derived from 
  4949 MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor to use this class. 
  4950 */
  4951 
  4952 class CMMFAudioPlayControllerSetRepeatsCustomCommandParser : public CMMFCustomCommandParserBase
  4953 	{
  4954 public:
  4955 
  4956 	/**
  4957 	Creates a new custom command parser capable of handling set repeats controller commands.
  4958 
  4959 	@param  aImplementor
  4960 	        A reference to the controller plugin that owns this new object.
  4961 
  4962 	@return A pointer to the object created.
  4963 
  4964 	*/
  4965 	IMPORT_C static CMMFAudioPlayControllerSetRepeatsCustomCommandParser* NewL(MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor& aImplementor);
  4966 
  4967 	/**
  4968 	Destructor.
  4969 
  4970 	*/
  4971 	IMPORT_C ~CMMFAudioPlayControllerSetRepeatsCustomCommandParser();
  4972 
  4973 	/**
  4974 	Handles a request from the client. Called by the controller framework.
  4975 
  4976 	@param  aMessage
  4977 	        The message to be handled.
  4978 
  4979 	*/
  4980 	void HandleRequest(TMMFMessage& aMessage);
  4981 private:
  4982 
  4983 	/**
  4984 	Constructor.
  4985 
  4986 	@param  aImplementor
  4987 	        A reference to the controller plugin that owns this new object.
  4988 
  4989 	*/
  4990 	CMMFAudioPlayControllerSetRepeatsCustomCommandParser(MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor& aImplementor);
  4991 	// Internal request handling methods.
  4992 	void DoHandleRequestL(TMMFMessage& aMessage);
  4993 	TBool DoSetRepeatsL(TMMFMessage& aMessage);
  4994 private:
  4995 	/** 
  4996 	The object that implements the set repeats custom command i.e controller plugin
  4997 	*/
  4998 	MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor& iImplementor;
  4999 	};
  5000 
  5001 #endif