os/mm/mmlibs/mmfw/inc/mmf/ControllerFramework/mmfstandardcustomcommands.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/mmlibs/mmfw/inc/mmf/ControllerFramework/mmfstandardcustomcommands.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,3772 @@
     1.4 +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef __MMFSTANDARDCUSTOMCOMMANDS_H
    1.20 +#define __MMFSTANDARDCUSTOMCOMMANDS_H
    1.21 +
    1.22 +#include <mmf/common/mmfcontroller.h>
    1.23 +#include <mmf/common/mmfvideo.h>
    1.24 +#include <mmf/common/mmcaf.h>
    1.25 +
    1.26 +class CMMFVideoFrameMessage;
    1.27 +class CFbsBitmap;
    1.28 +class CDesC8Array;
    1.29 +
    1.30 +/**
    1.31 +@publishedAll
    1.32 +@released
    1.33 +*/
    1.34 +const TInt KPlaybackRateNormal = 1;
    1.35 +
    1.36 +/**
    1.37 +@publishedAll
    1.38 +@released
    1.39 +
    1.40 +Balance value for centre
    1.41 +*/
    1.42 +const TInt KMMFBalanceCenter = 0;
    1.43 +
    1.44 +/**
    1.45 +@publishedAll
    1.46 +@released
    1.47 +
    1.48 +Balance value for max left
    1.49 +*/
    1.50 +const TInt KMMFBalanceMaxLeft = -100;
    1.51 +
    1.52 +/**
    1.53 +@publishedAll
    1.54 +@released
    1.55 +
    1.56 +Balance value for max right
    1.57 +*/
    1.58 +const TInt KMMFBalanceMaxRight = 100;
    1.59 +
    1.60 +/**
    1.61 +@publishedAll
    1.62 +@released
    1.63 +*/
    1.64 +const TInt KMMFVideoCurrentFrame = -1;
    1.65 +
    1.66 +/**
    1.67 +@publishedAll
    1.68 +@released
    1.69 +*/
    1.70 +enum TMMFDSAEvent
    1.71 +	{
    1.72 +	EAbortDSA,
    1.73 +	EResumeDSA
    1.74 +	};
    1.75 +
    1.76 +/**
    1.77 +@publishedAll
    1.78 +@released
    1.79 +
    1.80 +Interface UID and messages for the Audio Resource Notification API.
    1.81 +*/
    1.82 +const TUid KMMFEventCategoryAudioResourceAvailable = {0x101FD9F2};
    1.83 +
    1.84 +
    1.85 +/**
    1.86 +@publishedAll
    1.87 +@released
    1.88 +
    1.89 +Interface UID and messages for the Audio Play Device API.
    1.90 +*/
    1.91 +const TUid KUidInterfaceMMFAudioPlayDevice = {0x101F76D6};
    1.92 +
    1.93 +/**
    1.94 +@publishedAll
    1.95 +@released
    1.96 +
    1.97 +Interface UID and messages for the Audio Record Device API.
    1.98 +*/
    1.99 +const TUid KUidInterfaceMMFAudioRecordDevice = {0x101F76D7};
   1.100 +
   1.101 +/**
   1.102 +@publishedAll
   1.103 +@released
   1.104 +
   1.105 +Interface UID and messages for the Audio Play Controller API.
   1.106 +*/
   1.107 +const TUid KUidInterfaceMMFAudioPlayController = {0x101F76D8};
   1.108 +
   1.109 +/**
   1.110 +@publishedAll
   1.111 +@released
   1.112 +
   1.113 +Interface UID and messages for the Audio Record Controller API.
   1.114 +*/
   1.115 +const TUid KUidInterfaceMMFAudioRecordController = {0x101F76D9};
   1.116 +
   1.117 +/**
   1.118 +@publishedAll
   1.119 +@released
   1.120 +
   1.121 +Interface UID and messages for the Audio Controller API.
   1.122 +*/
   1.123 +const TUid KUidInterfaceMMFAudioController = {0x101F76DA};
   1.124 +
   1.125 +/**
   1.126 +@publishedAll
   1.127 +@released
   1.128 +*/
   1.129 +const TUid KUidInterfaceMMFVideoController = {0x101F76DB};
   1.130 +
   1.131 +/**
   1.132 +@publishedAll
   1.133 +@released
   1.134 +*/
   1.135 +const TUid KUidInterfaceMMFVideoPlayController = {0x101F7B73};
   1.136 +
   1.137 +/**
   1.138 +@publishedAll
   1.139 +@released
   1.140 +*/
   1.141 +const TUid KUidInterfaceMMFVideoRecordController = {0x101F7B74};
   1.142 +
   1.143 +/**
   1.144 +@publishedAll
   1.145 +@released
   1.146 +*/
   1.147 +const TUid KUidInterfaceMMFVideoDRMExt = {0x101F7C23};
   1.148 +
   1.149 +/**
   1.150 +@publishedAll
   1.151 +@released
   1.152 +
   1.153 +Interface UID for the custom command that supports setting the initial screen for video on the controller.
   1.154 +*/
   1.155 +const TUid KUidInterfaceMMFVideoSetInitScreen = {0x102825F7};
   1.156 +
   1.157 +/**
   1.158 +@publishedAll
   1.159 +@released
   1.160 +*/
   1.161 +const TUid KUidInterfaceMMFVideoPixelAspectRatio = {0x102831EF};
   1.162 +
   1.163 +
   1.164 +/**
   1.165 +@publishedAll
   1.166 +@released
   1.167 +*/
   1.168 +const TUid KUidInterfaceMMFVideoAudioSamplingRateAndChannelConfig = {0x102831F0};
   1.169 +
   1.170 +/**
   1.171 +@publishedAll
   1.172 +@released
   1.173 +
   1.174 +Client class to access Audio Play Device functionality.
   1.175 +
   1.176 +The class uses the custom command function of the controller plugin, and removes the necessity
   1.177 +for the client to formulate the custom commands.
   1.178 +@since 7.0s
   1.179 +*/
   1.180 +class RMMFAudioPlayDeviceCustomCommands : public RMMFCustomCommandsBase
   1.181 +	{
   1.182 +public:
   1.183 +
   1.184 +	/**
   1.185 +	Constructor.
   1.186 +
   1.187 +	@param  aController
   1.188 +	        The client side controller object to be used by this custom command interface.
   1.189 +
   1.190 +	@since 7.0s
   1.191 +	*/
   1.192 +	IMPORT_C RMMFAudioPlayDeviceCustomCommands(RMMFController& aController);
   1.193 +
   1.194 +	/**
   1.195 +	Sets the volume of the sound device.
   1.196 +
   1.197 +	@param  aVolume
   1.198 +	        The new volume.
   1.199 +
   1.200 +	@return	One of the system-wide error codes.
   1.201 +
   1.202 +	@since 7.0s
   1.203 +	*/
   1.204 +	IMPORT_C TInt SetVolume(TInt aVolume) const;
   1.205 +
   1.206 +	/**
   1.207 +	Gets the maximum volume supported by the sound device.
   1.208 +
   1.209 +	@param  aMaxVolume
   1.210 +	        The maximum volume, filled in by the controller.
   1.211 +
   1.212 +	@return One of the system-wide error codes.
   1.213 +
   1.214 +	@since  7.0s
   1.215 +	*/
   1.216 +	IMPORT_C TInt GetMaxVolume(TInt& aMaxVolume) const;
   1.217 +
   1.218 +	/**
   1.219 +	Gets the current playback volume.
   1.220 +
   1.221 +	@param  aVolume
   1.222 +	        On return contains the current playback volume.
   1.223 +
   1.224 +	@return One of the system-wide error codes.
   1.225 +
   1.226 +	@since  7.0s
   1.227 +	*/
   1.228 +	IMPORT_C TInt GetVolume(TInt& aVolume) const;
   1.229 +
   1.230 +	/**
   1.231 +	Sets a volume ramp.
   1.232 +
   1.233 +	This will cause the sound device to start playing with zero volume,
   1.234 +	increasing the volume over aRampDuration microseconds.
   1.235 +
   1.236 +	The volume ramp can be removed by setting the ramp duration to zero.
   1.237 +
   1.238 +	@param  aRampDuration
   1.239 +	        The duration over which the volume is to be increased, in microseconds.
   1.240 +
   1.241 +	@return One of the system-wide error codes.
   1.242 +
   1.243 +	@since 7.0s
   1.244 +	*/
   1.245 +	IMPORT_C TInt SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampDuration) const;
   1.246 +
   1.247 +	/**
   1.248 +	Sets the balance between the left and right stereo audio channels.
   1.249 +
   1.250 +	@param  aBalance
   1.251 +	        Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be
   1.252 +	        restored by using KMMFBalanceCenter.
   1.253 +
   1.254 +	@return	One of the system-wide error codes.
   1.255 +
   1.256 +	@since 7.0s
   1.257 +	*/
   1.258 +	IMPORT_C TInt SetBalance(TInt aBalance) const;
   1.259 +
   1.260 +	/**
   1.261 +	Gets the balance between the left and right stereo audio channels.
   1.262 +
   1.263 +	@param  aBalance
   1.264 +	        The current balance, filled in by the controller.
   1.265 +
   1.266 +	@return One of the system-wide error codes.
   1.267 +	
   1.268 +	@since 7.0s
   1.269 +	*/
   1.270 +	IMPORT_C TInt GetBalance(TInt& aBalance) const;
   1.271 +	};
   1.272 +
   1.273 +/**
   1.274 +@publishedAll
   1.275 +@released
   1.276 +
   1.277 +Mixin class to be derived from controller plugins that could support the audio play device
   1.278 +custom commands.
   1.279 +*/
   1.280 +class MMMFAudioPlayDeviceCustomCommandImplementor
   1.281 +	{
   1.282 +public:
   1.283 +
   1.284 +	/**
   1.285 +	Sets the volume of the sound device.
   1.286 +
   1.287 +	This function can leave with one of the system-wide error codes. The request will be
   1.288 +	completed with the leave code.
   1.289 +
   1.290 +	@param  aVolume
   1.291 +	        The new volume.
   1.292 +
   1.293 +	@since 7.0s
   1.294 +	*/
   1.295 +	virtual void MapdSetVolumeL(TInt aVolume) = 0;
   1.296 +
   1.297 +	/**
   1.298 +	Gets the maximum volume supported by the sound device.
   1.299 +
   1.300 +	This function can leave with one of the system-wide error codes. The request will be
   1.301 +	completed with the leave code.
   1.302 +
   1.303 +	@param  aMaxVolume
   1.304 +	        The maximum volume, to be filled in by the controller plugin.
   1.305 +
   1.306 +	@since 7.0s
   1.307 +	*/
   1.308 +	virtual void MapdGetMaxVolumeL(TInt& aMaxVolume) = 0;
   1.309 +
   1.310 +	/**
   1.311 +	Gets the current playback volume.
   1.312 +
   1.313 +	This function can leave with one of the system-wide error codes. The request will be
   1.314 +	completed with the leave code.
   1.315 +
   1.316 +	@param  aVolume
   1.317 +	        The volume, to be filled in by the controller.
   1.318 +
   1.319 +	@since 7.0s
   1.320 +	*/
   1.321 +	virtual void MapdGetVolumeL(TInt& aVolume) = 0;
   1.322 +
   1.323 +	/**
   1.324 +	Sets a volume ramp.
   1.325 +
   1.326 +	This will cause the sound device to start playing with zero volume,
   1.327 +	increasing the volume over aRampDuration microseconds.
   1.328 +
   1.329 +	The volume ramp can be removed by setting the ramp duration to zero.
   1.330 +
   1.331 +	This function can leave with one of the system-wide error codes. The request will be
   1.332 +	completed with the leave code.
   1.333 +
   1.334 +	@param  aRampDuration
   1.335 +	        The duration over which the volume is to be increased, in microseconds.
   1.336 +
   1.337 +	@since 7.0s
   1.338 +	*/
   1.339 +	virtual void MapdSetVolumeRampL(const TTimeIntervalMicroSeconds& aRampDuration) = 0;
   1.340 +
   1.341 +	/**
   1.342 +	Sets the balance between the left and right stereo audio channels.
   1.343 +
   1.344 +	This function can leave with one of the system-wide error codes. The request will be
   1.345 +	completed with the leave code.
   1.346 +
   1.347 +	@param  aBalance
   1.348 +	        Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be
   1.349 +	        restored by using KMMFBalanceCenter.
   1.350 +
   1.351 +	@since 7.0s
   1.352 +	*/
   1.353 +	virtual void MapdSetBalanceL(TInt aBalance) = 0;
   1.354 +
   1.355 +	/**
   1.356 +	Gets the balance between the left and right stereo audio channels.
   1.357 +
   1.358 +	This function can leave with one of the system-wide error codes. The request will be
   1.359 +	completed with the leave code.
   1.360 +
   1.361 +	@param  aBalance
   1.362 +	        The current balance, filled in by the controller.
   1.363 +
   1.364 +	@since 7.0s
   1.365 +	*/
   1.366 +	virtual void MapdGetBalanceL(TInt& aBalance) = 0;
   1.367 +	};
   1.368 +
   1.369 +/**
   1.370 +@publishedAll
   1.371 +@released
   1.372 +
   1.373 +Custom command parser class to be used by controller plugins wishing to support
   1.374 +audio play device commands.
   1.375 +
   1.376 +The controller plugin must be derived from MMMFAudioPlayDeviceCustomCommandImplementor
   1.377 +to use this class.
   1.378 +
   1.379 +The controller plugin should create an object of this type and add it to the list of custom
   1.380 +command parsers in the controller framework. See the following example code for details.
   1.381 +
   1.382 +@code
   1.383 +void CMMFAudioController::ConstructL()
   1.384 +	{
   1.385 +	// Construct custom command parsers
   1.386 +	CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
   1.387 +	CleanupStack::PushL(audPlayDevParser);
   1.388 +	AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
   1.389 +	CleanupStack::Pop();//audPlayDevParser
   1.390 +
   1.391 +	CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
   1.392 +	CleanupStack::PushL(audRecDevParser);
   1.393 +	AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
   1.394 +	CleanupStack::Pop();//audRecDevParser
   1.395 +
   1.396 +etc.
   1.397 +	}
   1.398 +@endcode
   1.399 +
   1.400 +@since 7.0s
   1.401 +*/
   1.402 +class CMMFAudioPlayDeviceCustomCommandParser : public CMMFCustomCommandParserBase
   1.403 +	{
   1.404 +public:
   1.405 +
   1.406 +	/**
   1.407 +	Creates a new custom command parser capable of handling audio play device commands.
   1.408 +
   1.409 +	This function may leave with one of the system-wide error codes.
   1.410 +
   1.411 +	@param  aImplementor
   1.412 +	        A reference to the controller plugin that owns this new object.
   1.413 +
   1.414 +	@return	A pointer to the object created.
   1.415 +
   1.416 +	@since  7.0s
   1.417 +	*/
   1.418 +	IMPORT_C static CMMFAudioPlayDeviceCustomCommandParser* NewL(MMMFAudioPlayDeviceCustomCommandImplementor& aImplementor);
   1.419 +
   1.420 +	/**
   1.421 +	Destructor.
   1.422 +
   1.423 +	@since  7.0s
   1.424 +	*/
   1.425 +	IMPORT_C ~CMMFAudioPlayDeviceCustomCommandParser();
   1.426 +
   1.427 +	/**
   1.428 +	Handles a request from the client. Called by the controller framework.
   1.429 +
   1.430 +	@param  aMessage
   1.431 +	        The message to be handled.
   1.432 +
   1.433 +	@since  7.0s
   1.434 +	*/
   1.435 +	void HandleRequest(TMMFMessage& aMessage);
   1.436 +private:
   1.437 +
   1.438 +	/**
   1.439 +	Constructor.
   1.440 +
   1.441 +	@param  aImplementor
   1.442 +	        A reference to the controller plugin that owns this new object.
   1.443 +
   1.444 +	@since	7.0s
   1.445 +	*/
   1.446 +	CMMFAudioPlayDeviceCustomCommandParser(MMMFAudioPlayDeviceCustomCommandImplementor& aImplementor);
   1.447 +	// Internal request handling methods.
   1.448 +	void DoHandleRequestL(TMMFMessage& aMessage);
   1.449 +	TBool DoSetVolumeL(TMMFMessage& aMessage);
   1.450 +	TBool DoGetMaxVolumeL(TMMFMessage& aMessage);
   1.451 +	TBool DoGetVolumeL(TMMFMessage& aMessage);
   1.452 +	TBool DoSetVolumeRampL(TMMFMessage& aMessage);
   1.453 +	TBool DoSetBalanceL(TMMFMessage& aMessage);
   1.454 +	TBool DoGetBalanceL(TMMFMessage& aMessage);
   1.455 +private:
   1.456 +	/** The object that implements the audio play device interface */
   1.457 +	MMMFAudioPlayDeviceCustomCommandImplementor& iImplementor;
   1.458 +	};
   1.459 +
   1.460 +/**
   1.461 +@publishedAll
   1.462 +@released
   1.463 +
   1.464 +Client class to access Audio Record Device functionality.
   1.465 +
   1.466 +The class uses the custom command function of the controller plugin, and removes the necessity
   1.467 +for the client to formulate the custom commands.
   1.468 +
   1.469 +@since 7.0s
   1.470 +*/
   1.471 +class RMMFAudioRecordDeviceCustomCommands : public RMMFCustomCommandsBase
   1.472 +	{
   1.473 +public:
   1.474 +	
   1.475 +	/**
   1.476 +	Constructor.
   1.477 +
   1.478 +	@param  aController
   1.479 +	        The client side controller object to be used by this custom command interface.
   1.480 +
   1.481 +	@since 7.0s
   1.482 +	*/
   1.483 +	IMPORT_C RMMFAudioRecordDeviceCustomCommands(RMMFController& aController);
   1.484 +
   1.485 +	/**
   1.486 +	Sets the gain of the sound device.
   1.487 +
   1.488 +	@param  aGain
   1.489 +	        The new gain.
   1.490 +
   1.491 +	@return One of the system-wide error codes.
   1.492 +
   1.493 +	@since 7.0s
   1.494 +	*/
   1.495 +	IMPORT_C TInt SetGain(TInt aGain) const;
   1.496 +
   1.497 +	/**
   1.498 +	Gets the maximum gain supported by the sound device.
   1.499 +
   1.500 +	@param  aMaxGain
   1.501 +	        The maximum gain, filled in by the controller.
   1.502 +
   1.503 +	@return One of the system-wide error codes.
   1.504 +
   1.505 +	@since 7.0s
   1.506 +	*/
   1.507 +	IMPORT_C TInt GetMaxGain(TInt& aMaxGain) const;
   1.508 +
   1.509 +	/**
   1.510 +	Gets the current recording gain.
   1.511 +
   1.512 +	@param  aGain
   1.513 +	        The gain, filled in by the controller.
   1.514 +
   1.515 +	@return One of the system-wide error codes.
   1.516 +
   1.517 +	@since  7.0s
   1.518 +	*/
   1.519 +	IMPORT_C TInt GetGain(TInt& aGain) const;
   1.520 +
   1.521 +	/**
   1.522 +	Sets the balance between the left and right stereo microphone channels.
   1.523 +
   1.524 +	@param  aBalance
   1.525 +	        Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be 
   1.526 +	        restored by using KMMFBalanceCenter.
   1.527 +
   1.528 +	@return One of the system-wide error codes.
   1.529 +
   1.530 +	@since 7.0s
   1.531 +	*/
   1.532 +	IMPORT_C TInt SetBalance(TInt aBalance) const;
   1.533 +
   1.534 +	/**
   1.535 +	Gets the balance between the left and right stereo microphone channels.
   1.536 +
   1.537 +	@param  aBalance
   1.538 +	        The current balance, filled in by the controller.
   1.539 +
   1.540 +	@return One of the system-wide error codes.
   1.541 +
   1.542 +	@since  7.0s
   1.543 +	*/
   1.544 +	IMPORT_C TInt GetBalance(TInt& aBalance) const;
   1.545 +	};
   1.546 +
   1.547 +/**
   1.548 +@publishedAll
   1.549 +@released
   1.550 +
   1.551 +Mixin class to be derived from controller plugins that could support the audio record device
   1.552 +custom commands.
   1.553 +*/
   1.554 +class MMMFAudioRecordDeviceCustomCommandImplementor
   1.555 +	{
   1.556 +public:
   1.557 +
   1.558 +	/**
   1.559 +	Sets the gain of the sound device.
   1.560 +
   1.561 +	This function can leave with one of the system-wide error codes. The request will be
   1.562 +	completed with the leave code.
   1.563 +
   1.564 +	@param  aGain
   1.565 +	        The new gain.
   1.566 +
   1.567 +	@since 7.0s
   1.568 +	*/
   1.569 +	virtual void MardSetGainL(TInt aGain) = 0;
   1.570 +
   1.571 +	/**
   1.572 +	Gets the maximum gain supported by the sound device.
   1.573 +
   1.574 +	This function can leave with one of the system-wide error codes. The request will be
   1.575 +	completed with the leave code.
   1.576 +
   1.577 +	@param  aMaxGain
   1.578 +	        The maximum gain, to be filled in by the controller plugin.
   1.579 +
   1.580 +	@since 7.0s
   1.581 +	*/
   1.582 +	virtual void MardGetMaxGainL(TInt& aMaxGain) = 0;
   1.583 +
   1.584 +	/**
   1.585 +	Gets the current recording gain.
   1.586 +
   1.587 +	This function can leave with one of the system-wide error codes. The request will be
   1.588 +	completed with the leave code.
   1.589 +
   1.590 +	@param  aGain
   1.591 +	        The gain, to be filled in by the controller.
   1.592 +
   1.593 +	@since 7.0s
   1.594 +	*/
   1.595 +	virtual void MardGetGainL(TInt& aGain) = 0;
   1.596 +
   1.597 +	/**
   1.598 +	Sets the balance between the left and right stereo microphone channels.
   1.599 +
   1.600 +	This function can leave with one of the system-wide error codes. The request will be
   1.601 +	completed with the leave code.
   1.602 +
   1.603 +	@param  aBalance
   1.604 +	        Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be
   1.605 +	        restored by using KMMFBalanceCenter.
   1.606 +
   1.607 +	@since 7.0s
   1.608 +	*/
   1.609 +	virtual void MardSetBalanceL(TInt aBalance) = 0;
   1.610 +
   1.611 +	/**
   1.612 +	Gets the balance between the left and right stereo microphone channels.
   1.613 +
   1.614 +	This function can leave with one of the system-wide error codes. The request will be
   1.615 +	completed with the leave code.
   1.616 +
   1.617 +	@param  aBalance
   1.618 +	        The current balance, filled in by the controller.
   1.619 +
   1.620 +	@since 7.0s
   1.621 +	*/
   1.622 +	virtual void MardGetBalanceL(TInt& aBalance) = 0;
   1.623 +	};
   1.624 +
   1.625 +/**
   1.626 +@publishedAll
   1.627 +@released
   1.628 +
   1.629 +Custom command parser class to be used by controller plugins wishing to support
   1.630 +audio record device commands.
   1.631 +
   1.632 +The controller plugin must be derived from MMMFAudioRecordDeviceCustomCommandImplementor
   1.633 +to use this class.
   1.634 +
   1.635 +The controller plugin should create an object of this type and add it to the list of custom
   1.636 +command parsers in the controller framework.  See the following example code for details.
   1.637 +
   1.638 +@code
   1.639 +void CMMFAudioController::ConstructL()
   1.640 +	{
   1.641 +	// Construct custom command parsers
   1.642 +	CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
   1.643 +	CleanupStack::PushL(audPlayDevParser);
   1.644 +	AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
   1.645 +	CleanupStack::Pop();//audPlayDevParser
   1.646 +
   1.647 +	CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
   1.648 +	CleanupStack::PushL(audRecDevParser);
   1.649 +	AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
   1.650 +	CleanupStack::Pop();//audRecDevParser
   1.651 +
   1.652 +etc.
   1.653 +	}
   1.654 +@endcode
   1.655 +
   1.656 +@since 7.0s
   1.657 +*/
   1.658 +class CMMFAudioRecordDeviceCustomCommandParser : public CMMFCustomCommandParserBase
   1.659 +	{
   1.660 +public:
   1.661 +
   1.662 +	/**
   1.663 +	Creates a new custom command parser capable of handling audio record device commands.
   1.664 +
   1.665 +	This function may leave with one of the system-wide error codes.
   1.666 +
   1.667 +	@param  aImplementor
   1.668 +	        A reference to the controller plugin that owns this new object.
   1.669 +
   1.670 +	@return A pointer to the object created.
   1.671 +
   1.672 +	@since	7.0s
   1.673 +	*/
   1.674 +	IMPORT_C static CMMFAudioRecordDeviceCustomCommandParser* NewL(MMMFAudioRecordDeviceCustomCommandImplementor& aImplementor);
   1.675 +
   1.676 +	/**
   1.677 +	Destructor.
   1.678 +
   1.679 +	@since  7.0s
   1.680 +	*/
   1.681 +	IMPORT_C ~CMMFAudioRecordDeviceCustomCommandParser();
   1.682 +
   1.683 +	/**
   1.684 +	Handles a request from the client. Called by the controller framework.
   1.685 +
   1.686 +	@param  aMessage
   1.687 +	        The message to be handled.
   1.688 +
   1.689 +	@since	7.0s
   1.690 +	*/
   1.691 +	void HandleRequest(TMMFMessage& aMessage);
   1.692 +private:
   1.693 +
   1.694 +	/**
   1.695 +	Constructor.
   1.696 +
   1.697 +	@param  aImplementor
   1.698 +	        A reference to the controller plugin that owns this new object.
   1.699 +
   1.700 +	@since	7.0s
   1.701 +	*/
   1.702 +	CMMFAudioRecordDeviceCustomCommandParser(MMMFAudioRecordDeviceCustomCommandImplementor& aImplementor);
   1.703 +	// Internal request handling methods.
   1.704 +	void DoHandleRequestL(TMMFMessage& aMessage);
   1.705 +	TBool DoSetGainL(TMMFMessage& aMessage);
   1.706 +	TBool DoGetMaxGainL(TMMFMessage& aMessage);
   1.707 +	TBool DoGetGainL(TMMFMessage& aMessage);
   1.708 +	TBool DoSetBalanceL(TMMFMessage& aMessage);
   1.709 +	TBool DoGetBalanceL(TMMFMessage& aMessage);
   1.710 +private:
   1.711 +	/** The object that implements the audio record device interface */
   1.712 +	MMMFAudioRecordDeviceCustomCommandImplementor& iImplementor;
   1.713 +	};
   1.714 +
   1.715 +
   1.716 +/**
   1.717 +@publishedAll
   1.718 +@released
   1.719 +
   1.720 +Client class to access functionality specific to an audio play controller.
   1.721 +
   1.722 +The class uses the custom command function of the controller plugin, and removes the necessity
   1.723 +for the client to formulate the custom commands.
   1.724 +
   1.725 +@since 7.0s
   1.726 +*/
   1.727 +class RMMFAudioPlayControllerCustomCommands : public RMMFCustomCommandsBase
   1.728 +	{
   1.729 +public:
   1.730 +	
   1.731 +	/**
   1.732 +	Constructor.
   1.733 +
   1.734 +	@param  aController
   1.735 +	        The client side controller object to be used by this custom command interface.
   1.736 +
   1.737 +	@since  7.0s
   1.738 +	*/
   1.739 +	IMPORT_C RMMFAudioPlayControllerCustomCommands(RMMFController& aController);
   1.740 +
   1.741 +	/**
   1.742 +	Sets a playback window.  The controller will start playing from the start of the window,
   1.743 +	and finish playing at the end of the window.
   1.744 +
   1.745 +	@param  aStart
   1.746 +	        The start of the window, in microseconds.
   1.747 +	@param  aEnd
   1.748 +	        The end of the window, in microseconds.
   1.749 +
   1.750 +	@return One of the system-wide error codes.
   1.751 +
   1.752 +	@since 7.0s
   1.753 +	*/
   1.754 +	IMPORT_C TInt SetPlaybackWindow(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) const;
   1.755 +
   1.756 +	/**
   1.757 +	Removes a previously defined playback window.
   1.758 +
   1.759 +	@return One of the system-wide error codes.
   1.760 +	@since 7.0s
   1.761 +	*/
   1.762 +	IMPORT_C TInt DeletePlaybackWindow();
   1.763 +
   1.764 +	/**
   1.765 +	Gets the audio loading progress as a percentage.
   1.766 +
   1.767 +	@param  aPercentageProgress
   1.768 +	        The progress loading the clip, as a percentage.
   1.769 +
   1.770 +	@return One of the system-wide error codes.
   1.771 +
   1.772 +	@since 7.0s
   1.773 +	*/
   1.774 +	IMPORT_C TInt GetLoadingProgress(TInt& aPercentageProgress) const;
   1.775 +	};
   1.776 +
   1.777 +
   1.778 +/**
   1.779 +@publishedAll
   1.780 +@released
   1.781 +
   1.782 +Mixin class to be derived from controller plugins that could support the audio play controller
   1.783 +custom commands.
   1.784 +*/
   1.785 +class MMMFAudioPlayControllerCustomCommandImplementor
   1.786 +	{
   1.787 +public:
   1.788 +
   1.789 +	/**
   1.790 +	Sets a playback window. The controller will start playing from the start of the window,
   1.791 +	and finish playing at the end of the window.
   1.792 +
   1.793 +	This function can leave with one of the system-wide error codes. The request will be
   1.794 +	completed with the leave code.
   1.795 +
   1.796 +	@param  aStart
   1.797 +	        The start of the window, in microseconds.
   1.798 +	@param  aEnd
   1.799 +	        The end of the window, in microseconds.
   1.800 +
   1.801 +	@since 7.0s
   1.802 +	*/
   1.803 +	virtual void MapcSetPlaybackWindowL(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) = 0;
   1.804 +
   1.805 +	/**
   1.806 +	Removes a previously defined playback window.
   1.807 +
   1.808 +	This function can leave with one of the system-wide error codes. The request will be
   1.809 +	completed with the leave code.
   1.810 +
   1.811 +	@since 7.0s
   1.812 +	*/
   1.813 +	virtual void MapcDeletePlaybackWindowL() = 0;
   1.814 +
   1.815 +	/**
   1.816 +	Gets the completion status of loading/rebuffering the current audio clip.
   1.817 +
   1.818 +	This function can leave with one of the system-wide error codes. The request will be
   1.819 +	completed with the leave code.
   1.820 +
   1.821 +	@param  aPercentageComplete
   1.822 +	        The status of loading as a percentage completed.
   1.823 +
   1.824 +	@since 7.0s
   1.825 +	*/
   1.826 +	virtual void MapcGetLoadingProgressL(TInt& aPercentageComplete) = 0;
   1.827 +	};
   1.828 +
   1.829 +/**
   1.830 +@publishedAll
   1.831 +@released
   1.832 +
   1.833 +Custom command parser class to be used by controller plugins wishing to support
   1.834 +audio play controller commands.
   1.835 +
   1.836 +The controller plugin must be derived from MMMFAudioPlayControllerCustomCommandImplementor to use 
   1.837 +this class.
   1.838 +
   1.839 +The controller plugin should create an object of this type and add it to the list of custom
   1.840 +command parsers in the controller framework. See the following example code for details.
   1.841 +
   1.842 +@code
   1.843 +void CMMFAudioController::ConstructL()
   1.844 +	{
   1.845 +	// Construct custom command parsers
   1.846 +	CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
   1.847 +	CleanupStack::PushL(audPlayDevParser);
   1.848 +	AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
   1.849 +	CleanupStack::Pop();//audPlayDevParser
   1.850 +
   1.851 +	CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
   1.852 +	CleanupStack::PushL(audRecDevParser);
   1.853 +	AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
   1.854 +	CleanupStack::Pop();//audRecDevParser
   1.855 +
   1.856 +etc.
   1.857 +	}
   1.858 +@endcode
   1.859 +
   1.860 +@since  7.0s
   1.861 +*/
   1.862 +class CMMFAudioPlayControllerCustomCommandParser : public CMMFCustomCommandParserBase
   1.863 +	{
   1.864 +public:
   1.865 +
   1.866 +	/**
   1.867 +	Creates a new custom command parser capable of handling audio play controller commands.
   1.868 +
   1.869 +	@param  aImplementor
   1.870 +	        A reference to the controller plugin that owns this new object.
   1.871 +
   1.872 +	@return A pointer to the object created.
   1.873 +
   1.874 +	@since	7.0s
   1.875 +	*/
   1.876 +	IMPORT_C static CMMFAudioPlayControllerCustomCommandParser* NewL(MMMFAudioPlayControllerCustomCommandImplementor& aImplementor);
   1.877 +
   1.878 +	/**
   1.879 +	Destructor.
   1.880 +
   1.881 +	@since 7.0s
   1.882 +	*/
   1.883 +	IMPORT_C ~CMMFAudioPlayControllerCustomCommandParser();
   1.884 +
   1.885 +	/**
   1.886 +	Handles a request from the client. Called by the controller framework.
   1.887 +
   1.888 +	@param  aMessage
   1.889 +	        The message to be handled.
   1.890 +
   1.891 +	@since  7.0s
   1.892 +	*/
   1.893 +	void HandleRequest(TMMFMessage& aMessage);
   1.894 +private:
   1.895 +
   1.896 +	/**
   1.897 +	Constructor.
   1.898 +
   1.899 +	@param  aImplementor
   1.900 +	        A reference to the controller plugin that owns this new object.
   1.901 +
   1.902 +	@since	7.0s
   1.903 +	*/
   1.904 +	CMMFAudioPlayControllerCustomCommandParser(MMMFAudioPlayControllerCustomCommandImplementor& aImplementor);
   1.905 +	// Internal request handling methods.
   1.906 +	void DoHandleRequestL(TMMFMessage& aMessage);
   1.907 +	TBool DoSetPlaybackWindowL(TMMFMessage& aMessage);
   1.908 +	TBool DoDeletePlaybackWindowL(TMMFMessage& aMessage);
   1.909 +	TBool DoGetLoadingProgressL(TMMFMessage& aMessage);
   1.910 +private:
   1.911 +	/** 
   1.912 +	The object that implements the audio play controller interface 
   1.913 +	*/
   1.914 +	MMMFAudioPlayControllerCustomCommandImplementor& iImplementor;
   1.915 +	};
   1.916 +
   1.917 +
   1.918 +
   1.919 +
   1.920 +/**
   1.921 +@publishedAll
   1.922 +@released
   1.923 +
   1.924 +Client class to access functionality specific to an audio record controller.
   1.925 +
   1.926 +The class uses the custom command function of the controller plugin, and removes the necessity
   1.927 +for the client to formulate the custom commands.
   1.928 +
   1.929 +@since  7.0s
   1.930 +*/
   1.931 +class RMMFAudioRecordControllerCustomCommands : public RMMFCustomCommandsBase
   1.932 +	{
   1.933 +public:
   1.934 +
   1.935 +	/**
   1.936 +	Constructor.
   1.937 +
   1.938 +	@param  aController
   1.939 +	        The client side controller object to be used by this custom command	interface.
   1.940 +
   1.941 +	@since  7.0s
   1.942 +	*/
   1.943 +	IMPORT_C RMMFAudioRecordControllerCustomCommands(RMMFController& aController);
   1.944 +
   1.945 +	/**
   1.946 +	Gets the (possibly estimated) record time left in the clip.
   1.947 +
   1.948 +	@param  aTime
   1.949 +	        The record time available, in microseconds.
   1.950 +
   1.951 +	@return One of the system-wide error codes.
   1.952 +
   1.953 +	@since 7.0s
   1.954 +	*/
   1.955 +	IMPORT_C TInt GetRecordTimeAvailable(TTimeIntervalMicroSeconds& aTime) const;
   1.956 +
   1.957 +	/**
   1.958 +	Sets the maximum duration of the recorded clip, in microseconds.
   1.959 +
   1.960 +	@param  aMaxDuration
   1.961 +	        The maximum duration of the recorded clip, in microseconds.
   1.962 +
   1.963 +	@return One of the system-wide error codes.
   1.964 +
   1.965 +	@since 7.0s
   1.966 +	*/
   1.967 +	IMPORT_C TInt SetMaxDuration(const TTimeIntervalMicroSeconds& aMaxDuration) const;
   1.968 +
   1.969 +	/**
   1.970 +	Sets the maximum size of the recorded clip, in bytes.
   1.971 +
   1.972 +	@param  aMaxSize
   1.973 +	        The maximum size of the recorded clip, in bytes.
   1.974 +
   1.975 +	@return One of the system-wide error codes.
   1.976 +
   1.977 +	@since 7.0s
   1.978 +	*/
   1.979 +	IMPORT_C TInt SetMaxFileSize(TInt aMaxSize) const;
   1.980 +
   1.981 +	/**
   1.982 +	Removes a portion from the clip, either from the current position to the beginning or the 
   1.983 +	current position to the end.
   1.984 +
   1.985 +	@param  aToEnd
   1.986 +	        A boolean indicating whether to crop to the end. Crops to the end if set to ETrue, to 
   1.987 +			the beginning set to EFalse.
   1.988 +
   1.989 +	@return One of the system-wide error codes.
   1.990 +
   1.991 +	@since  7.0s
   1.992 +	*/
   1.993 +	IMPORT_C TInt Crop(TBool aToEnd);
   1.994 +
   1.995 +	/**
   1.996 +	Adds meta data to the clip.
   1.997 +
   1.998 +	@param  aNewEntry
   1.999 +	        The details of the new entry to be added.
  1.1000 +
  1.1001 +	@since 7.0s
  1.1002 +	*/
  1.1003 +	IMPORT_C void AddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry);
  1.1004 +
  1.1005 +	/**
  1.1006 +	Removes a meta data entry from the clip.
  1.1007 +
  1.1008 +	@param  aIndex
  1.1009 +	        The ID of the meta data entry to delete.
  1.1010 +
  1.1011 +	@return One of the system-wide error codes.
  1.1012 +
  1.1013 +	@since  7.0s
  1.1014 +	*/
  1.1015 +	IMPORT_C TInt RemoveMetaDataEntry(TInt aIndex);
  1.1016 +
  1.1017 +	/**
  1.1018 +	Replaces a meta data in the clip.
  1.1019 +
  1.1020 +	@param  aIndex
  1.1021 +	        The ID of the meta data entry to replace.
  1.1022 +	@param  aNewEntry
  1.1023 +	        The details of the new entry to be added.
  1.1024 +
  1.1025 +	@since 7.0s
  1.1026 +	*/
  1.1027 +	IMPORT_C void ReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry);
  1.1028 +	};
  1.1029 +
  1.1030 +/**
  1.1031 +@publishedAll
  1.1032 +@released
  1.1033 +
  1.1034 +Mixin class to be derived from controller plugins that could support the audio record controller
  1.1035 +custom commands.
  1.1036 +*/
  1.1037 +class MMMFAudioRecordControllerCustomCommandImplementor
  1.1038 +	{
  1.1039 +public:
  1.1040 +
  1.1041 +	/**
  1.1042 +	Gets the (possibly estimated) record time left in the clip.
  1.1043 +
  1.1044 +	This function can leave with one of the system-wide error codes. The request will be
  1.1045 +	completed with the leave code.
  1.1046 +
  1.1047 +	@param  aTime
  1.1048 +	        The record time available, in microseconds.
  1.1049 +
  1.1050 +	@since 7.0s
  1.1051 +	*/
  1.1052 +	virtual void MarcGetRecordTimeAvailableL(TTimeIntervalMicroSeconds& aTime) = 0;
  1.1053 +
  1.1054 +	/**
  1.1055 +	Sets the maximum duration of the recorded clip, in microseconds.
  1.1056 +
  1.1057 +	This function can leave with one of the system-wide error codes. The request will be
  1.1058 +	completed with the leave code.
  1.1059 +
  1.1060 +	@param  aMaxDuration
  1.1061 +	        The maximum duration of the recorded clip, in microseconds.
  1.1062 +
  1.1063 +	@since 7.0s
  1.1064 +	*/
  1.1065 +	virtual void MarcSetMaxDurationL(const TTimeIntervalMicroSeconds& aMaxDuration) = 0;
  1.1066 +
  1.1067 +	/**
  1.1068 +	Sets the maximum size of the recorded clip, in bytes.
  1.1069 +
  1.1070 +	This function can leave with one of the system-wide error codes. The request will be
  1.1071 +	completed with the leave code.
  1.1072 +
  1.1073 +	@param  aMaxSize
  1.1074 +	        The maximum size of the recorded clip, in bytes.
  1.1075 +
  1.1076 +	@since 7.0s
  1.1077 +	*/
  1.1078 +	virtual void MarcSetMaxFileSizeL(TInt aMaxSize) = 0;
  1.1079 +
  1.1080 +	/**
  1.1081 +	Removes a portion from the clip, either from the current position to the beginning
  1.1082 +	or the current position to the end.
  1.1083 +
  1.1084 +	This function can leave with one of the system-wide error codes. The request will be
  1.1085 +	completed with the leave code.
  1.1086 +
  1.1087 +	@param  aToEnd
  1.1088 +	        A boolean indicating whether to crop to the end or the beginning. ETrue to crop to the
  1.1089 +	        end, EFalse to the beginning.
  1.1090 +
  1.1091 +	@since 7.0s
  1.1092 +	*/
  1.1093 +	virtual void MarcCropL(TBool aToEnd) = 0;
  1.1094 +
  1.1095 +	/**
  1.1096 +	Adds meta data to the clip.
  1.1097 +
  1.1098 +	@param  aNewEntry
  1.1099 +	        The details of the new entry to be added.
  1.1100 +
  1.1101 +	@since 7.0s
  1.1102 +	*/
  1.1103 +	virtual void MarcAddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry) = 0;
  1.1104 +
  1.1105 +	/**
  1.1106 +	Removes a meta data entry from the clip.
  1.1107 +
  1.1108 +	@param  aIndex
  1.1109 +	        The ID of the meta data entry to delete.
  1.1110 +
  1.1111 +	@since 7.0s
  1.1112 +	*/
  1.1113 +	virtual void MarcRemoveMetaDataEntryL(TInt aIndex) = 0;
  1.1114 +
  1.1115 +	/**
  1.1116 +	Replaces a meta data entry in the clip.
  1.1117 +
  1.1118 +	@param  aIndex
  1.1119 +	        The ID of the meta data entry to replace.
  1.1120 +	@param  aNewEntry
  1.1121 +	        The details of the new entry to be added.
  1.1122 +
  1.1123 +	@since 7.0s
  1.1124 +	*/
  1.1125 +	virtual void MarcReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry) = 0;
  1.1126 +	};
  1.1127 +
  1.1128 +/**
  1.1129 +@publishedAll
  1.1130 +@released
  1.1131 +
  1.1132 +Custom command parser class to be used by controller plugins wishing to support
  1.1133 +audio record controller commands.
  1.1134 +
  1.1135 +The controller plugin must be derived from MMMFAudioRecordControllerCustomCommandImplementor
  1.1136 +to use this class.
  1.1137 +
  1.1138 +The controller plugin should create an object of this type and add it to the list of custom
  1.1139 +command parsers in the controller framework.  See the following example code for details.
  1.1140 +
  1.1141 +@code
  1.1142 +void CMMFAudioController::ConstructL()
  1.1143 +	{
  1.1144 +	// Construct custom command parsers
  1.1145 +	CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
  1.1146 +	CleanupStack::PushL(audPlayDevParser);
  1.1147 +	AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
  1.1148 +	CleanupStack::Pop();//audPlayDevParser
  1.1149 +
  1.1150 +	CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
  1.1151 +	CleanupStack::PushL(audRecDevParser);
  1.1152 +	AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
  1.1153 +	CleanupStack::Pop();//audRecDevParser
  1.1154 +
  1.1155 +etc.
  1.1156 +	}
  1.1157 +@endcode
  1.1158 +
  1.1159 +@since 7.0s
  1.1160 +*/
  1.1161 +class CMMFAudioRecordControllerCustomCommandParser : public CMMFCustomCommandParserBase
  1.1162 +	{
  1.1163 +public:
  1.1164 +
  1.1165 +	/**
  1.1166 +	Creates a new custom command parser capable of handling audio record controller commands.
  1.1167 +
  1.1168 +	@param  aImplementor
  1.1169 +	        A reference to the controller plugin that owns this new object.
  1.1170 +
  1.1171 +	@return A pointer to the object created.
  1.1172 +
  1.1173 +	@since  7.0s
  1.1174 +	*/
  1.1175 +	IMPORT_C static CMMFAudioRecordControllerCustomCommandParser* NewL(MMMFAudioRecordControllerCustomCommandImplementor& aImplementor);
  1.1176 +
  1.1177 +	/**
  1.1178 +	Destructor.
  1.1179 +
  1.1180 +	@since  7.0s
  1.1181 +	*/
  1.1182 +	IMPORT_C ~CMMFAudioRecordControllerCustomCommandParser();
  1.1183 +
  1.1184 +	/**
  1.1185 +	Handles a request from the client. Called by the controller framework.
  1.1186 +	
  1.1187 +	@param  aMessage
  1.1188 +	        The message to be handled.
  1.1189 +
  1.1190 +	@since	7.0s
  1.1191 +	*/
  1.1192 +	void HandleRequest(TMMFMessage& aMessage);
  1.1193 +private:
  1.1194 +
  1.1195 +	/**
  1.1196 +	Constructor.
  1.1197 +
  1.1198 +	@param  aImplementor
  1.1199 +	        A reference to the controller plugin that owns this new object.
  1.1200 +
  1.1201 +	@since  7.0s
  1.1202 +	*/
  1.1203 +	CMMFAudioRecordControllerCustomCommandParser(MMMFAudioRecordControllerCustomCommandImplementor& aImplementor);
  1.1204 +	// Internal request handling methods.
  1.1205 +	void DoHandleRequestL(TMMFMessage& aMessage);
  1.1206 +	TBool DoGetRecordTimeAvailableL(TMMFMessage& aMessage);
  1.1207 +	TBool DoSetMaxDurationL(TMMFMessage& aMessage);
  1.1208 +	TBool DoSetMaxFileSizeL(TMMFMessage& aMessage);
  1.1209 +	TBool DoCropL(TMMFMessage& aMessage);
  1.1210 +	TBool DoAddMetaDataEntryL(TMMFMessage& aMessage);
  1.1211 +	TBool DoRemoveMetaDataEntryL(TMMFMessage& aMessage);
  1.1212 +	TBool DoReplaceMetaDataEntryL(TMMFMessage& aMessage);
  1.1213 +private:
  1.1214 +	/**	
  1.1215 +	The object that implements the audio record controller interface.
  1.1216 +	*/
  1.1217 +	MMMFAudioRecordControllerCustomCommandImplementor& iImplementor;
  1.1218 +	};
  1.1219 +
  1.1220 +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
  1.1221 +#include <mmf/common/mmfstandardcustomcommandsenums.h>
  1.1222 +#include <mmf/common/mmfstandardcustomcommandsimpl.h>
  1.1223 +#endif
  1.1224 +
  1.1225 +/**
  1.1226 +@publishedAll
  1.1227 +@released
  1.1228 +*/
  1.1229 +
  1.1230 +	enum TMMFAudioControllerMessages
  1.1231 +		{
  1.1232 +		EMMFAudioControllerSetSourceSampleRate,
  1.1233 +		EMMFAudioControllerSetSourceNumChannels,
  1.1234 +		EMMFAudioControllerSetSourceFormat,
  1.1235 +		EMMFAudioControllerSetSourceBitRate,
  1.1236 +		EMMFAudioControllerSetSourceDataType,
  1.1237 +		EMMFAudioControllerSetSinkSampleRate,
  1.1238 +		EMMFAudioControllerSetSinkNumChannels,
  1.1239 +		EMMFAudioControllerSetSinkFormat,
  1.1240 +		EMMFAudioControllerSetSinkBitRate,
  1.1241 +		EMMFAudioControllerSetSinkDataType,
  1.1242 +		EMMFAudioControllerGetSourceSampleRate,
  1.1243 +		EMMFAudioControllerGetSourceBitRate,
  1.1244 +		EMMFAudioControllerGetSourceNumChannels,
  1.1245 +		EMMFAudioControllerGetSourceFormat,
  1.1246 +		EMMFAudioControllerGetSourceDataType,
  1.1247 +		EMMFAudioControllerGetSinkSampleRate,
  1.1248 +		EMMFAudioControllerGetSinkBitRate,
  1.1249 +		EMMFAudioControllerGetSinkNumChannels,
  1.1250 +		EMMFAudioControllerGetSinkFormat,
  1.1251 +		EMMFAudioControllerGetSinkDataType,
  1.1252 +		EMMFAudioControllerGetSupportedSourceSampleRates,
  1.1253 +		EMMFAudioControllerGetSupportedSourceBitRates,
  1.1254 +		EMMFAudioControllerGetSupportedSourceNumChannels,
  1.1255 +		EMMFAudioControllerGetSupportedSourceDataTypes,
  1.1256 +		EMMFAudioControllerGetSupportedSinkSampleRates,
  1.1257 +		EMMFAudioControllerGetSupportedSinkBitRates,
  1.1258 +		EMMFAudioControllerGetSupportedSinkNumChannels,
  1.1259 +		EMMFAudioControllerGetSupportedSinkDataTypes,
  1.1260 +		EMMFAudioControllerCopyArrayData,
  1.1261 +		EMMFAudioControllerSetCodec
  1.1262 +		};
  1.1263 +
  1.1264 +
  1.1265 +/**
  1.1266 +@publishedAll
  1.1267 +@released
  1.1268 +
  1.1269 +Client class to access functionality specific to an audio controller.
  1.1270 +
  1.1271 +The class uses the custom command function of the controller plugin, and removes the necessity
  1.1272 +for the client to formulate the custom commands.
  1.1273 +
  1.1274 +@since  7.0s
  1.1275 +*/
  1.1276 +class RMMFAudioControllerCustomCommands : public RMMFCustomCommandsBase
  1.1277 +	{
  1.1278 +public:
  1.1279 +
  1.1280 +	/**
  1.1281 +	Constructor.
  1.1282 +
  1.1283 +	@param  aController
  1.1284 +	        The client side controller object to be used by this custom command
  1.1285 +	        interface.
  1.1286 +
  1.1287 +	@since  7.0s
  1.1288 +	*/
  1.1289 +	IMPORT_C RMMFAudioControllerCustomCommands(RMMFController& aController);
  1.1290 +
  1.1291 +	/**
  1.1292 +	Sets the sample rate of the data source in samples per second.
  1.1293 +
  1.1294 +	@param  aSampleRate
  1.1295 +	        The sample rate, in samples per second.
  1.1296 +
  1.1297 +	@return One of the system-wide error codes.
  1.1298 +
  1.1299 +	@since  7.0s
  1.1300 +	*/
  1.1301 +	IMPORT_C TInt SetSourceSampleRate(TUint aSampleRate) const;
  1.1302 +
  1.1303 +	/**
  1.1304 +	Sets the bit rate of the data source in bits per second.
  1.1305 +
  1.1306 +	@param  aRate
  1.1307 +	        The bit rate, in bits per second.
  1.1308 +
  1.1309 +	@return One of the system-wide error codes.
  1.1310 +
  1.1311 +	@since 7.0s
  1.1312 +	*/
  1.1313 +	IMPORT_C TInt SetSourceBitRate(TUint aRate) const;
  1.1314 +
  1.1315 +	/**
  1.1316 +	Sets the number of channels in the data source.	For example, one channel for mono, two channels 
  1.1317 +	for stereo etc.
  1.1318 +
  1.1319 +	@param  aNumChannels
  1.1320 +	        The number of channels.
  1.1321 +
  1.1322 +	@return One of the system-wide error codes.
  1.1323 +
  1.1324 +	@since 7.0s
  1.1325 +	*/
  1.1326 +	IMPORT_C TInt SetSourceNumChannels(TUint aNumChannels) const;
  1.1327 +
  1.1328 +	/**
  1.1329 +	Sets the format of the data source.
  1.1330 +
  1.1331 +	The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin to be used.
  1.1332 +
  1.1333 +	@param  aFormatUid
  1.1334 +	        The format plugin to be used.
  1.1335 +
  1.1336 +	@return One of the system-wide error codes.
  1.1337 +
  1.1338 +	@since  7.0s
  1.1339 +	*/
  1.1340 +	IMPORT_C TInt SetSourceFormat(TUid aFormatUid) const;
  1.1341 +
  1.1342 +	/**
  1.1343 +	Sets the fourCC code of the source.
  1.1344 +
  1.1345 +	@param  aDataType
  1.1346 +	        The fourCC code.
  1.1347 +
  1.1348 +	@return One of the system-wide error codes.
  1.1349 +
  1.1350 +	@since  7.0s
  1.1351 +	*/
  1.1352 +	IMPORT_C TInt SetSourceDataType(TFourCC aDataType) const;
  1.1353 +
  1.1354 +	/**
  1.1355 +	Sets the sample rate of the data sink in samples per second.
  1.1356 +
  1.1357 +	@param  aSampleRate
  1.1358 +	        The sample rate, in samples per second.
  1.1359 +
  1.1360 +	@return One of the system-wide error codes.
  1.1361 +
  1.1362 +	@since 7.0s
  1.1363 +	*/
  1.1364 +	IMPORT_C TInt SetSinkSampleRate(TUint aSampleRate) const;
  1.1365 +
  1.1366 +	/**
  1.1367 +	Set the bit rate of the data sink in bits per second.
  1.1368 +
  1.1369 +	@param  aRate
  1.1370 +	        The bit rate, in bits per second.
  1.1371 +
  1.1372 +	@return One of the system-wide error codes.
  1.1373 +
  1.1374 +	@since 7.0s
  1.1375 +	*/
  1.1376 +	IMPORT_C TInt SetSinkBitRate(TUint aRate) const;
  1.1377 +
  1.1378 +	/**
  1.1379 +	Sets the number of channels in the data sink. For example, one channel for mono, two channels 
  1.1380 +	for stereo etc.
  1.1381 +
  1.1382 +	@param  aNumChannels
  1.1383 +	        The number of channels.
  1.1384 +
  1.1385 +	@return One of the system-wide error codes.
  1.1386 +
  1.1387 +	@since  7.0s
  1.1388 +	*/
  1.1389 +	IMPORT_C TInt SetSinkNumChannels(TUint aNumChannels) const;
  1.1390 +
  1.1391 +	/**
  1.1392 +	Sets the format of the data sink.
  1.1393 +
  1.1394 +	The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin to be used.
  1.1395 +
  1.1396 +	@param  aFormatUid
  1.1397 +	        The format plugin to be used.
  1.1398 +
  1.1399 +	@return One of the system-wide error codes.
  1.1400 +
  1.1401 +	@since  7.0s
  1.1402 +	*/
  1.1403 +	IMPORT_C TInt SetSinkFormat(TUid aFormatUid) const;
  1.1404 +
  1.1405 +	/**
  1.1406 +	Set the fourCC code of the sink.
  1.1407 +
  1.1408 +	@param  aDataType
  1.1409 +	        The fourCC code.
  1.1410 +
  1.1411 +	@return One of the system-wide error codes.
  1.1412 +
  1.1413 +	@since 7.0s
  1.1414 +	*/
  1.1415 +	IMPORT_C TInt SetSinkDataType(TFourCC aDataType) const;
  1.1416 +
  1.1417 +	/**
  1.1418 +	Sets the codec to be used. Useful when recording data.
  1.1419 +
  1.1420 +	@param  aSourceDataType
  1.1421 +	        The data type of the source of the codec.
  1.1422 +	@param  aSinkDataType
  1.1423 +	        The data type of the sink of the codec.
  1.1424 +
  1.1425 +	@return One of the system-wide error codes.
  1.1426 +
  1.1427 +	@since  7.0s
  1.1428 +	*/
  1.1429 +	IMPORT_C TInt SetCodec(TFourCC aSourceDataType, TFourCC aSinkDataType) const;
  1.1430 +
  1.1431 +	/**
  1.1432 +	Gets the sample rate of the data source in samples per second.
  1.1433 +
  1.1434 +	@param  aRate
  1.1435 +	        The sample rate, in samples per second.
  1.1436 +
  1.1437 +	@return One of the system-wide error codes.
  1.1438 +
  1.1439 +	@since  7.0s
  1.1440 +	*/
  1.1441 +	IMPORT_C TInt GetSourceSampleRate(TUint& aRate) const;
  1.1442 +
  1.1443 +	/**
  1.1444 +	Gets the bit rate of the data source in bits per second.
  1.1445 +
  1.1446 +	@param  aRate
  1.1447 +	        The bit rate, in bits per second.
  1.1448 +	
  1.1449 +	@return One of the system-wide error codes.
  1.1450 +
  1.1451 +	@since  7.0s
  1.1452 +	*/
  1.1453 +	IMPORT_C TInt GetSourceBitRate(TUint& aRate) const;
  1.1454 +
  1.1455 +	/**
  1.1456 +	Gets the number of channels in the data source. For example, one channel for mono, two channels 
  1.1457 +	for stereo etc.
  1.1458 +
  1.1459 +	@param  aNumChannels
  1.1460 +	        The number of channels.
  1.1461 +
  1.1462 +	@return One of the system-wide error codes.
  1.1463 +
  1.1464 +	@since  7.0s
  1.1465 +	*/
  1.1466 +	IMPORT_C TInt GetSourceNumChannels(TUint& aNumChannels) const;
  1.1467 +
  1.1468 +	/**
  1.1469 +	Gets the format of the data source.
  1.1470 +
  1.1471 +	The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin being used.
  1.1472 +
  1.1473 +	@param  aFormat
  1.1474 +	        The format plugin being used.
  1.1475 +
  1.1476 +	@return One of the system-wide error codes.
  1.1477 +
  1.1478 +	@since  7.0s
  1.1479 +	*/
  1.1480 +	IMPORT_C TInt GetSourceFormat(TUid& aFormat) const;
  1.1481 +
  1.1482 +	/**
  1.1483 +	Get the fourCC code of the source.
  1.1484 +
  1.1485 +	@param  aDataType
  1.1486 +	        The fourCC code.
  1.1487 +
  1.1488 +	@return One of the system-wide error codes.
  1.1489 +
  1.1490 +	@since  7.0s
  1.1491 +	*/
  1.1492 +	IMPORT_C TInt GetSourceDataType(TFourCC& aDataType) const;
  1.1493 +
  1.1494 +	/**
  1.1495 +	Gets the sample rate of the data sink in samples per second.
  1.1496 +
  1.1497 +	@param  aRate
  1.1498 +	        The sample rate, in samples per second.
  1.1499 +
  1.1500 +	@return One of the system-wide error codes.
  1.1501 +
  1.1502 +	@since  7.0s
  1.1503 +	*/
  1.1504 +	IMPORT_C TInt GetSinkSampleRate(TUint& aRate) const;
  1.1505 +
  1.1506 +	/**
  1.1507 +	Gets the bit rate of the data sink in bits per second.
  1.1508 +
  1.1509 +	@param  aRate
  1.1510 +	        The bit rate, in bits per second.
  1.1511 +
  1.1512 +	@return One of the system-wide error codes.
  1.1513 +
  1.1514 +	@since  7.0s
  1.1515 +	*/
  1.1516 +	IMPORT_C TInt GetSinkBitRate(TUint& aRate) const;
  1.1517 +
  1.1518 +	/**
  1.1519 +	Gets the number of channels in the data sink. For example, one channel for mono, two channels 
  1.1520 +	for stereo etc.
  1.1521 +
  1.1522 +	@param  aNumChannels
  1.1523 +	        The number of channels.
  1.1524 +
  1.1525 +	@return One of the system-wide error codes.
  1.1526 +
  1.1527 +	@since  7.0s
  1.1528 +	*/
  1.1529 +	IMPORT_C TInt GetSinkNumChannels(TUint& aNumChannels) const;
  1.1530 +
  1.1531 +	/**
  1.1532 +	Gets the format of the data sink.
  1.1533 +
  1.1534 +	The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin being used.
  1.1535 +
  1.1536 +	@param  aFormat
  1.1537 +	        The format plugin being used.
  1.1538 +
  1.1539 +	@return One of the system-wide error codes.
  1.1540 +
  1.1541 +	@since  7.0s
  1.1542 +	*/
  1.1543 +	IMPORT_C TInt GetSinkFormat(TUid& aFormat) const;
  1.1544 +
  1.1545 +	/**
  1.1546 +	Gets the fourCC code of the sink.
  1.1547 +
  1.1548 +	@param  aDataType
  1.1549 +	        The fourCC code.
  1.1550 +
  1.1551 +	@return One of the system-wide error codes.
  1.1552 +
  1.1553 +	@since 7.0s
  1.1554 +	*/
  1.1555 +	IMPORT_C TInt GetSinkDataType(TFourCC& aDataType) const;
  1.1556 +
  1.1557 +	/**
  1.1558 +	Gets the list of sample rates supported by the data source.
  1.1559 +
  1.1560 +	Warning: Existing objects in this array will be removed by this function.
  1.1561 +
  1.1562 +	@param  aSupportedRates
  1.1563 +	        The supported rates.
  1.1564 +
  1.1565 +	@return One of the system-wide error codes.
  1.1566 +
  1.1567 +	@since  7.0s
  1.1568 +	*/
  1.1569 +	IMPORT_C void GetSupportedSourceSampleRatesL(RArray<TUint>& aSupportedRates) const;
  1.1570 +
  1.1571 +	/**
  1.1572 +	Gets the list of bit rates supported by the data source.
  1.1573 +
  1.1574 +	Warning: Existing objects in this array will be removed by this function.
  1.1575 +
  1.1576 +	@param  aSupportedRates
  1.1577 +	        The supported rates.
  1.1578 +
  1.1579 +	@return One of the system-wide error codes.
  1.1580 +
  1.1581 +	@since 7.0s
  1.1582 +	*/
  1.1583 +	IMPORT_C void GetSupportedSourceBitRatesL(RArray<TUint>& aSupportedRates) const;
  1.1584 +
  1.1585 +	/**
  1.1586 +	Gets the list of channels supported by the data source (ie mono, stereo etc).
  1.1587 +
  1.1588 +	Warning: Existing objects in this array will be removed by this method.
  1.1589 +
  1.1590 +	@param  aSupportedChannels
  1.1591 +	        The supported channels.
  1.1592 +
  1.1593 +	@return One of the system-wide error codes.
  1.1594 +
  1.1595 +	@since 7.0s
  1.1596 +	*/
  1.1597 +	IMPORT_C void GetSupportedSourceNumChannelsL(RArray<TUint>& aSupportedChannels) const;
  1.1598 +
  1.1599 +	/**
  1.1600 +	Gets the list of fourCC codes supported by the data source.
  1.1601 +
  1.1602 +	Warning: Existing objects in this array will be removed by this method.
  1.1603 +
  1.1604 +	@param  aSupportedDataTypes
  1.1605 +	        The supported data types.
  1.1606 +
  1.1607 +	@return One of the system-wide error codes.
  1.1608 +
  1.1609 +	@since  7.0s
  1.1610 +	*/
  1.1611 +	IMPORT_C void GetSupportedSourceDataTypesL(RArray<TFourCC>& aSupportedDataTypes) const;
  1.1612 +
  1.1613 +	/**
  1.1614 +	Gets the list of sample rates supported by the data sink.
  1.1615 +
  1.1616 +	Warning: Existing objects in this array will be removed by this method.
  1.1617 +
  1.1618 +	@param  aSupportedRates
  1.1619 +	        The supported rates.
  1.1620 +
  1.1621 +	@return One of the system-wide error codes.
  1.1622 +
  1.1623 +	@since  7.0s
  1.1624 +	*/
  1.1625 +	IMPORT_C void GetSupportedSinkSampleRatesL(RArray<TUint>& aSupportedRates) const;
  1.1626 +
  1.1627 +	/**
  1.1628 +	Gets the list of bit rates supported by the data sink.
  1.1629 +
  1.1630 +	Warning: Existing objects in this array will be removed by this method.
  1.1631 +
  1.1632 +	@param  aSupportedRates
  1.1633 +	        The supported rates.
  1.1634 +
  1.1635 +	@return One of the system-wide error codes.
  1.1636 +
  1.1637 +	@since  7.0s
  1.1638 +	*/
  1.1639 +	IMPORT_C void GetSupportedSinkBitRatesL(RArray<TUint>& aSupportedRates) const;
  1.1640 +
  1.1641 +	/**
  1.1642 +	Gets the list of channels supported by the data sink (ie mono, stereo etc).
  1.1643 +
  1.1644 +	Warning: Existing objects in this array will be removed by this method.
  1.1645 +
  1.1646 +	@param  aSupportedChannels
  1.1647 +	        The supported channels.
  1.1648 +
  1.1649 +	@return One of the system-wide error codes.
  1.1650 +
  1.1651 +	@since  7.0s
  1.1652 +	*/
  1.1653 +	IMPORT_C void GetSupportedSinkNumChannelsL(RArray<TUint>& aSupportedChannels) const;
  1.1654 +
  1.1655 +	/**
  1.1656 +	Gets the list of fourCC codes supported by the data sink.
  1.1657 +
  1.1658 +	Warning: Existing objects in this array will be removed by this method.
  1.1659 +
  1.1660 +	@param  aSupportedDataTypes
  1.1661 +	        The supported data types.
  1.1662 +
  1.1663 +	@return One of the system-wide error codes.
  1.1664 +
  1.1665 +	@since  7.0s
  1.1666 +	*/
  1.1667 +	IMPORT_C void GetSupportedSinkDataTypesL(RArray<TFourCC>& aSupportedDataTypes) const;
  1.1668 +
  1.1669 +private:
  1.1670 +	void DoGetUintArrayL(RArray<TUint>& aArray, TMMFAudioControllerMessages aIpc) const;
  1.1671 +	void DoGetFourCCArrayL(RArray<TFourCC>& aArray, TMMFAudioControllerMessages aIpc) const;
  1.1672 +	};
  1.1673 +
  1.1674 +
  1.1675 +/**
  1.1676 +@publishedAll
  1.1677 +@released
  1.1678 +
  1.1679 +Mixin class to be derived from controller plugins that could support the audio record controller
  1.1680 +custom commands.
  1.1681 +*/
  1.1682 +class MMMFAudioControllerCustomCommandImplementor
  1.1683 +	{
  1.1684 +public:
  1.1685 +
  1.1686 +	/**
  1.1687 +	Sets the sample rate of the data source in samples per second.
  1.1688 +
  1.1689 +	@param  aSampleRate
  1.1690 +	        The sample rate, in samples per second.
  1.1691 +
  1.1692 +	@since 7.0s
  1.1693 +	*/
  1.1694 +	virtual void MacSetSourceSampleRateL(TUint aSampleRate) = 0;
  1.1695 +
  1.1696 +	/**
  1.1697 +	Sets the bit rate of the data source in bits per second.
  1.1698 +
  1.1699 +	@param  aBitRate
  1.1700 +	        The bit rate, in bits per second.
  1.1701 +
  1.1702 +	@since  7.0s
  1.1703 +	*/
  1.1704 +	virtual void MacSetSourceBitRateL(TUint aBitRate) = 0;
  1.1705 +
  1.1706 +	/**
  1.1707 +	Sets the number of channels in the data source.	For example, one channel for mono, two channels 
  1.1708 +	for stereo etc.
  1.1709 +
  1.1710 +	@param  aNumChannels
  1.1711 +	        The number of channels.
  1.1712 +
  1.1713 +	@since  7.0s
  1.1714 +	*/
  1.1715 +	virtual void MacSetSourceNumChannelsL(TUint aNumChannels) = 0;
  1.1716 +
  1.1717 +	/**
  1.1718 +	Sets the format of the data source.	The UID corresponds to the UID of the CMMFFormat-derived 
  1.1719 +	ECOM plugin to be used.
  1.1720 +
  1.1721 +	@param  aFormatUid
  1.1722 +	        The format plugin to be used.
  1.1723 +
  1.1724 +	@since 7.0s
  1.1725 +	*/
  1.1726 +	virtual void MacSetSourceFormatL(TUid aFormatUid) = 0;
  1.1727 +
  1.1728 +	/**
  1.1729 +	Sets the fourCC code of the source.
  1.1730 +
  1.1731 +	@param  aDataType
  1.1732 +	        The fourCC code.
  1.1733 +
  1.1734 +	@since 7.0s
  1.1735 +	*/
  1.1736 +	virtual void MacSetSourceDataTypeL(TFourCC aDataType) = 0;
  1.1737 +
  1.1738 +	/**
  1.1739 +	Sets the sample rate of the data sink in samples per second.
  1.1740 +
  1.1741 +	@param  aSampleRate
  1.1742 +	        The sample rate, in samples per second.
  1.1743 +
  1.1744 +	@since  7.0s
  1.1745 +	*/
  1.1746 +	virtual void MacSetSinkSampleRateL(TUint aSampleRate) = 0;
  1.1747 +
  1.1748 +	/**
  1.1749 +	Sets the bit rate of the data sink in bits per second.
  1.1750 +
  1.1751 +	@param  aRate
  1.1752 +	        The bit rate, in bits per second.
  1.1753 +
  1.1754 +	@since  7.0s
  1.1755 +	*/
  1.1756 +	virtual void MacSetSinkBitRateL(TUint aRate) = 0;
  1.1757 +
  1.1758 +	/**
  1.1759 +	Sets the number of channels in the data sink. For example, one channel for mono, two channels 
  1.1760 +	for stereo etc.
  1.1761 +
  1.1762 +	@param  aNumChannels
  1.1763 +	        The number of channels.
  1.1764 +
  1.1765 +	@since  7.0s
  1.1766 +	*/
  1.1767 +	virtual void MacSetSinkNumChannelsL(TUint aNumChannels) = 0;
  1.1768 +
  1.1769 +	/**
  1.1770 +	Sets the format of the data sink. The UID corresponds to the uid of the CMMFFormat-derived ECOM 
  1.1771 +	plugin to be used.
  1.1772 +
  1.1773 +	@param  aFormatUid
  1.1774 +	        The format plugin to be used.
  1.1775 +
  1.1776 +	@since  7.0s
  1.1777 +	*/
  1.1778 +	virtual void MacSetSinkFormatL(TUid aFormatUid) = 0;
  1.1779 +
  1.1780 +	/**
  1.1781 +	Sets the fourCC code of the sink.
  1.1782 +
  1.1783 +	@param  aDataType
  1.1784 +	        The fourCC code.
  1.1785 +
  1.1786 +	@since  7.0s
  1.1787 +	*/
  1.1788 +	virtual void MacSetSinkDataTypeL(TFourCC aDataType) = 0;
  1.1789 +
  1.1790 +	/**
  1.1791 +	Sets the codec to be used.  Useful when recording data.
  1.1792 +
  1.1793 +	@param  aSourceDataType
  1.1794 +	        The data type of the source of the codec.
  1.1795 +	@param  aSinkDataType
  1.1796 +	        The data type of the sink of the codec.
  1.1797 +
  1.1798 +	@since  7.0s
  1.1799 +	*/
  1.1800 +	virtual void MacSetCodecL(TFourCC aSourceDataType, TFourCC aSinkDataType) = 0;
  1.1801 +
  1.1802 +
  1.1803 +	/**
  1.1804 +	Gets the sample rate of the data source in samples per second.
  1.1805 +
  1.1806 +	@param  aRate	
  1.1807 +	        The sample rate, in samples per second.
  1.1808 +
  1.1809 +	@since  7.0s
  1.1810 +	*/
  1.1811 +	virtual void MacGetSourceSampleRateL(TUint& aRate) = 0;
  1.1812 +
  1.1813 +	/**
  1.1814 +	Gets the bit rate of the data source in bits per second.
  1.1815 +
  1.1816 +	@param  aRate
  1.1817 +	        The bit rate, in bits per second.
  1.1818 +
  1.1819 +	@since  7.0s
  1.1820 +	*/
  1.1821 +	virtual void MacGetSourceBitRateL(TUint& aRate) = 0;
  1.1822 +
  1.1823 +	/**
  1.1824 +	Gets the number of channels in the data source.	For example, one channel for mono, two channels 
  1.1825 +	for stereo etc.
  1.1826 +
  1.1827 +	@param  aNumChannels
  1.1828 +	        The number of channels.
  1.1829 +
  1.1830 +	@since  7.0s
  1.1831 +	*/
  1.1832 +	virtual void MacGetSourceNumChannelsL(TUint& aNumChannels) = 0;
  1.1833 +
  1.1834 +	/**
  1.1835 +	Gets the format of the data source.	The UID corresponds to the uid of the CMMFFormat-derived 
  1.1836 +	ECOM plugin being used.
  1.1837 +
  1.1838 +	@param  aFormat
  1.1839 +	        The format plugin being used.
  1.1840 +
  1.1841 +	@since  7.0s
  1.1842 +	*/
  1.1843 +	virtual void MacGetSourceFormatL(TUid& aFormat) = 0;
  1.1844 +
  1.1845 +	/**
  1.1846 +	Gets the fourCC code of the source.
  1.1847 +
  1.1848 +	@param  aDataType
  1.1849 +	        The fourCC code.
  1.1850 +
  1.1851 +	@since  7.0s
  1.1852 +	*/
  1.1853 +	virtual void MacGetSourceDataTypeL(TFourCC& aDataType) = 0;
  1.1854 +
  1.1855 +	/**
  1.1856 +	Gets the sample rate of the data sink in samples per second.
  1.1857 +
  1.1858 +	@param  aRate
  1.1859 +	        The sample rate, in samples per second.
  1.1860 +
  1.1861 +	@since  7.0s
  1.1862 +	*/
  1.1863 +	virtual void MacGetSinkSampleRateL(TUint& aRate) = 0;
  1.1864 +
  1.1865 +	/**
  1.1866 +	Gets the bit rate of the data sink in bits per second.
  1.1867 +
  1.1868 +	@param  aRate
  1.1869 +	        The bit rate, in bits per second.
  1.1870 +
  1.1871 +	@since  7.0s
  1.1872 +	*/
  1.1873 +	virtual void MacGetSinkBitRateL(TUint& aRate) = 0;
  1.1874 +
  1.1875 +	/**
  1.1876 +	Gets the number of channels in the data sink. For example, one channel for mono, two channels 
  1.1877 +	for stereo etc.
  1.1878 +
  1.1879 +	@param  aNumChannels
  1.1880 +	        The number of channels.
  1.1881 +
  1.1882 +	@since  7.0s
  1.1883 +	*/
  1.1884 +	virtual void MacGetSinkNumChannelsL(TUint& aNumChannels) = 0;
  1.1885 +
  1.1886 +	/**
  1.1887 +	Gets the format of the data sink. The UID corresponds to the uid of the CMMFFormat-derived ECOM 
  1.1888 +	plugin being used.
  1.1889 +
  1.1890 +	@param  aFormat
  1.1891 +	        The format plugin being used.
  1.1892 +
  1.1893 +	@since  7.0s
  1.1894 +	*/
  1.1895 +	virtual void MacGetSinkFormatL(TUid& aFormat) = 0;
  1.1896 +
  1.1897 +	/**
  1.1898 +	Gets the fourCC code of the sink.
  1.1899 +
  1.1900 +	@param  aDataType
  1.1901 +	        The fourCC code.
  1.1902 +
  1.1903 +	@since  7.0s
  1.1904 +	*/
  1.1905 +	virtual void MacGetSinkDataTypeL(TFourCC& aDataType) = 0;
  1.1906 +
  1.1907 +	/**
  1.1908 +	Gets the list of sample rates supported by the data source.
  1.1909 +
  1.1910 +	@param  aSupportedRates
  1.1911 +	        The supported rates.  Warning: Existing objects in this array will be removed by this method.
  1.1912 +
  1.1913 +	@since  7.0s
  1.1914 +	*/
  1.1915 +	virtual void MacGetSupportedSourceSampleRatesL(RArray<TUint>& aSupportedRates) = 0;
  1.1916 +
  1.1917 +	/**
  1.1918 +	Gets the list of bit rates supported by the data source.
  1.1919 +
  1.1920 +	Warning: Existing objects in this array will be removed by this method.
  1.1921 +
  1.1922 +	@param  aSupportedRates
  1.1923 +	        The supported rates.
  1.1924 +
  1.1925 +	@since  7.0s
  1.1926 +	*/
  1.1927 +	virtual void MacGetSupportedSourceBitRatesL(RArray<TUint>& aSupportedRates) = 0;
  1.1928 +
  1.1929 +	/**
  1.1930 +	Gets the list of channels supported by the data source (ie mono, stereo etc).
  1.1931 +
  1.1932 +	Warning: Existing objects in this array will be removed by this method.
  1.1933 +
  1.1934 +	@param  aSupportedChannels
  1.1935 +	        The supported channels.
  1.1936 +
  1.1937 +	@since  7.0s
  1.1938 +	*/
  1.1939 +	virtual void MacGetSupportedSourceNumChannelsL(RArray<TUint>& aSupportedChannels) = 0;
  1.1940 +
  1.1941 +	/**
  1.1942 +	Gets the list of fourCC codes supported by the data source.
  1.1943 +
  1.1944 +	Warning: Existing objects in this array will be removed by this method.
  1.1945 +
  1.1946 +	@param  aSupportedDataTypes
  1.1947 +	        The supported data types.
  1.1948 +
  1.1949 +	@since  7.0s
  1.1950 +	*/
  1.1951 +	virtual void MacGetSupportedSourceDataTypesL(RArray<TFourCC>& aSupportedDataTypes) = 0;
  1.1952 +
  1.1953 +	/**
  1.1954 +	Gets the list of sample rates supported by the data sink.
  1.1955 +
  1.1956 +	Warning: Existing objects in this array will be removed by this method.
  1.1957 +
  1.1958 +	@param  aSupportedRates
  1.1959 +	        The supported rates.
  1.1960 +
  1.1961 +	@since  7.0s
  1.1962 +	*/
  1.1963 +	virtual void MacGetSupportedSinkSampleRatesL(RArray<TUint>& aSupportedRates) = 0;
  1.1964 +
  1.1965 +	/**
  1.1966 +	Gets the list of bit rates supported by the data sink.
  1.1967 +
  1.1968 +	Warning: Existing objects in this array will be removed by this method.
  1.1969 +
  1.1970 +	@param  aSupportedRates
  1.1971 +	        The supported rates.
  1.1972 +
  1.1973 +	@since  7.0s
  1.1974 +	*/
  1.1975 +	virtual void MacGetSupportedSinkBitRatesL(RArray<TUint>& aSupportedRates) = 0;
  1.1976 +
  1.1977 +	/**
  1.1978 +	Gets the list of channels supported by the data sink (ie mono, stereo etc).
  1.1979 +
  1.1980 +	Warning: Existing objects in this array will be removed by this method.
  1.1981 +
  1.1982 +	@param  aSupportedChannels
  1.1983 +	        The supported channels.
  1.1984 +
  1.1985 +	@since  7.0s
  1.1986 +	*/
  1.1987 +	virtual void MacGetSupportedSinkNumChannelsL(RArray<TUint>& aSupportedChannels) = 0;
  1.1988 +
  1.1989 +	/**
  1.1990 +	Gets the list of fourCC codes supported by the data sink.
  1.1991 +
  1.1992 +	Warning: Existing objects in this array will be removed by this method.
  1.1993 +
  1.1994 +	@param  aSupportedDataTypes
  1.1995 +	        The supported data types.
  1.1996 +
  1.1997 +	@since  7.0s
  1.1998 +	*/
  1.1999 +	virtual void MacGetSupportedSinkDataTypesL(RArray<TFourCC>& aSupportedDataTypes) = 0;
  1.2000 +	};
  1.2001 +
  1.2002 +/**
  1.2003 +@publishedAll
  1.2004 +@released
  1.2005 +
  1.2006 +Custom command parser class to be used by controller plugins wishing to support
  1.2007 +audio controller commands.
  1.2008 +
  1.2009 +The controller plugin must be derived from MMMFAudioControllerCustomCommandImplementor
  1.2010 +to use this class.
  1.2011 +
  1.2012 +The controller plugin should create an object of this type and add it to the list of custom
  1.2013 +command parsers in the controller framework. See the following example code for details.
  1.2014 +
  1.2015 +@code
  1.2016 +void CMMFAudioController::ConstructL()
  1.2017 +	{
  1.2018 +	// Construct custom command parsers
  1.2019 +	CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
  1.2020 +	CleanupStack::PushL(audPlayDevParser);
  1.2021 +	AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
  1.2022 +	CleanupStack::Pop();//audPlayDevParser
  1.2023 +
  1.2024 +	CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
  1.2025 +	CleanupStack::PushL(audRecDevParser);
  1.2026 +	AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
  1.2027 +	CleanupStack::Pop();//audRecDevParser
  1.2028 +
  1.2029 +etc.
  1.2030 +	}
  1.2031 +@endcode
  1.2032 +
  1.2033 +@since  7.0s
  1.2034 +*/
  1.2035 +class CMMFAudioControllerCustomCommandParser : public CMMFCustomCommandParserBase
  1.2036 +	{
  1.2037 +public:
  1.2038 +
  1.2039 +	/**
  1.2040 +	Creates a new custom command parser capable of handling audio controller commands.
  1.2041 +
  1.2042 +	@param  aImplementor
  1.2043 +	        A reference to the controller plugin that owns this new object.
  1.2044 +
  1.2045 +	@return A pointer to the object created.
  1.2046 +
  1.2047 +	@since  7.0s
  1.2048 +	*/
  1.2049 +	IMPORT_C static CMMFAudioControllerCustomCommandParser* NewL(MMMFAudioControllerCustomCommandImplementor& aImplementor);
  1.2050 +
  1.2051 +	/**
  1.2052 +	Destructor.
  1.2053 +
  1.2054 +	@since 7.0s
  1.2055 +	*/
  1.2056 +	IMPORT_C ~CMMFAudioControllerCustomCommandParser();
  1.2057 +
  1.2058 +	/**
  1.2059 +	Handles a request from the client. Called by the controller framework.
  1.2060 +
  1.2061 +	@param  aMessage
  1.2062 +	        The message to be handled.
  1.2063 +
  1.2064 +	@since  7.0s
  1.2065 +	*/
  1.2066 +	void HandleRequest(TMMFMessage& aMessage);
  1.2067 +private:
  1.2068 +	/**
  1.2069 +	Constructor.
  1.2070 +
  1.2071 +	@param  aImplementor
  1.2072 +	        A reference to the controller plugin that owns this new object.
  1.2073 +
  1.2074 +	@since  7.0s
  1.2075 +	*/
  1.2076 +	CMMFAudioControllerCustomCommandParser(MMMFAudioControllerCustomCommandImplementor& aImplementor);
  1.2077 +	// Internal request handling methods.
  1.2078 +	void DoHandleRequestL(TMMFMessage& aMessage);
  1.2079 +
  1.2080 +	TBool DoSetSourceSampleRateL(TMMFMessage& aMessage);
  1.2081 +	TBool DoSetSourceNumChannelsL(TMMFMessage& aMessage);
  1.2082 +	TBool DoSetSourceFormatL(TMMFMessage& aMessage);
  1.2083 +	TBool DoSetSinkSampleRateL(TMMFMessage& aMessage);
  1.2084 +	TBool DoSetSinkNumChannelsL(TMMFMessage& aMessage);
  1.2085 +	TBool DoSetSinkFormatL(TMMFMessage& aMessage);
  1.2086 +	TBool DoSetCodecL(TMMFMessage& aMessage);
  1.2087 +	TBool DoSetSourceBitRateL(TMMFMessage& aMessage);
  1.2088 +	TBool DoSetSourceDataTypeL(TMMFMessage& aMessage);
  1.2089 +	TBool DoSetSinkBitRateL(TMMFMessage& aMessage);
  1.2090 +	TBool DoSetSinkDataTypeL(TMMFMessage& aMessage);
  1.2091 +	TBool DoGetSourceSampleRateL(TMMFMessage& aMessage);
  1.2092 +	TBool DoGetSourceBitRateL(TMMFMessage& aMessage);
  1.2093 +	TBool DoGetSourceNumChannelsL(TMMFMessage& aMessage);
  1.2094 +	TBool DoGetSourceFormatL(TMMFMessage& aMessage);
  1.2095 +	TBool DoGetSourceDataTypeL(TMMFMessage& aMessage);
  1.2096 +	TBool DoGetSinkSampleRateL(TMMFMessage& aMessage);
  1.2097 +	TBool DoGetSinkBitRateL(TMMFMessage& aMessage);
  1.2098 +	TBool DoGetSinkNumChannelsL(TMMFMessage& aMessage);
  1.2099 +	TBool DoGetSinkFormatL(TMMFMessage& aMessage);
  1.2100 +	TBool DoGetSinkDataTypeL(TMMFMessage& aMessage);
  1.2101 +	TBool DoGetSupportedSourceSampleRatesL(TMMFMessage& aMessage);
  1.2102 +	TBool DoGetSupportedSourceBitRatesL(TMMFMessage& aMessage);
  1.2103 +	TBool DoGetSupportedSourceNumChannelsL(TMMFMessage& aMessage);
  1.2104 +	TBool DoGetSupportedSourceDataTypesL(TMMFMessage& aMessage);
  1.2105 +	TBool DoGetSupportedSinkSampleRatesL(TMMFMessage& aMessage);
  1.2106 +	TBool DoGetSupportedSinkBitRatesL(TMMFMessage& aMessage);
  1.2107 +	TBool DoGetSupportedSinkNumChannelsL(TMMFMessage& aMessage);
  1.2108 +	TBool DoGetSupportedSinkDataTypesL(TMMFMessage& aMessage);
  1.2109 +	TBool DoCopyArrayDataL(TMMFMessage& aMessage);
  1.2110 +
  1.2111 +	void DoCreateBufFromUintArrayL(RArray<TUint>& aArray);
  1.2112 +	void DoCreateBufFromFourCCArrayL(RArray<TFourCC>& aArray);
  1.2113 +private:
  1.2114 +	/** 
  1.2115 +	The object that implements the audio record controller interface 
  1.2116 +	*/
  1.2117 +	MMMFAudioControllerCustomCommandImplementor& iImplementor;
  1.2118 +
  1.2119 +	CBufFlat* iDataCopyBuffer;
  1.2120 +	};
  1.2121 +
  1.2122 +
  1.2123 +class RWindow;
  1.2124 +
  1.2125 +/**
  1.2126 +@publishedAll
  1.2127 +@released
  1.2128 +
  1.2129 +Client class to access functionality specific to a video controller.
  1.2130 +
  1.2131 +The class uses the custom command function of the controller plugin, and removes the necessity
  1.2132 +for the client to formulate the custom commands.
  1.2133 +
  1.2134 +@since  7.0s
  1.2135 +*/
  1.2136 +class RMMFVideoControllerCustomCommands : public RMMFCustomCommandsBase
  1.2137 +	{
  1.2138 +public:
  1.2139 +
  1.2140 +	/**
  1.2141 +	Constructor.
  1.2142 +
  1.2143 +	@param  aController
  1.2144 +	        The client side controller object to be used by this custom command interface.
  1.2145 +
  1.2146 +	@since  7.0s
  1.2147 +	*/
  1.2148 +	IMPORT_C RMMFVideoControllerCustomCommands(RMMFController& aController);
  1.2149 +
  1.2150 +	/**
  1.2151 +	Gets the frame size of the clip.
  1.2152 +
  1.2153 +	@param  aVideoFrameSize
  1.2154 +	        The frame size, in pixels.
  1.2155 +
  1.2156 +	@return One of the system-wide error codes.
  1.2157 +
  1.2158 +	@since 7.0s
  1.2159 +	*/
  1.2160 +	IMPORT_C TInt GetVideoFrameSize(TSize& aVideoFrameSize) const;
  1.2161 +
  1.2162 +	/**
  1.2163 +	Gets the audio type.
  1.2164 +
  1.2165 +	@param  aCodec
  1.2166 +	        The FourCC of the audio codec.
  1.2167 +
  1.2168 +	@return One of the system-wide error codes.
  1.2169 +
  1.2170 +	@since  7.0s
  1.2171 +	*/
  1.2172 +	IMPORT_C TInt GetAudioCodec(TFourCC& aCodec) const;
  1.2173 +
  1.2174 +	/**
  1.2175 +	Gets the video bit rate.
  1.2176 +
  1.2177 +	@param  aBitRate	
  1.2178 +	        The bit rate of the video stream. If this value is KMMFVariableVideoBitRate it signifies
  1.2179 +	        a variable bit rate.
  1.2180 +
  1.2181 +	@return One of the system-wide error codes.
  1.2182 +
  1.2183 +	@since  7.0s
  1.2184 +	*/
  1.2185 +	IMPORT_C TInt GetVideoBitRate(TInt& aBitRate) const;
  1.2186 +
  1.2187 +	/**
  1.2188 +	Gets the audio bit rate.
  1.2189 +
  1.2190 +	@param aBitRate
  1.2191 +	       The bit rate of the audio stream.
  1.2192 +
  1.2193 +	@return One of the system-wide error codes.
  1.2194 +
  1.2195 +	@since  7.0s
  1.2196 +	*/
  1.2197 +	IMPORT_C TInt GetAudioBitRate(TInt& aBitRate) const;
  1.2198 +
  1.2199 +	/**
  1.2200 +	Sets the frame rate of the clip.
  1.2201 +
  1.2202 +	@param  aFramesPerSecond
  1.2203 +	        The number of frames per second.
  1.2204 +
  1.2205 +	@return One of the system-wide error codes.
  1.2206 +
  1.2207 +	@since  7.0s
  1.2208 +	*/
  1.2209 +	IMPORT_C TInt SetFrameRate(TReal32 aFramesPerSecond) const;
  1.2210 +
  1.2211 +	/**
  1.2212 +	Gets the frame rate of the clip.
  1.2213 +
  1.2214 +	@param  aFramesPerSecond
  1.2215 +	        The number of frames per second, filled in by the controller plugin.
  1.2216 +
  1.2217 +	@return One of the system-wide error codes.
  1.2218 +
  1.2219 +	@since  7.0s
  1.2220 +	*/
  1.2221 +	IMPORT_C TInt GetFrameRate(TReal32& aFramesPerSecond) const;
  1.2222 +
  1.2223 +	/**
  1.2224 +	Gets the video clip MIME type.
  1.2225 +
  1.2226 +	@param  aMimeType
  1.2227 +	        The Mime type of the current clip.
  1.2228 +
  1.2229 +	@since  7.0s
  1.2230 +	*/
  1.2231 +	IMPORT_C TInt GetVideoMimeType(TDes8& aMimeType) const;
  1.2232 +	};
  1.2233 +
  1.2234 +/**
  1.2235 +@publishedAll
  1.2236 +@released
  1.2237 +
  1.2238 +Client class to access functionality specific to a video playback controller.
  1.2239 +
  1.2240 +The class uses the custom command function of the controller plugin, and removes the necessity
  1.2241 +for the client to formulate the custom commands.
  1.2242 +
  1.2243 +@since  7.0s
  1.2244 +*/
  1.2245 +class RMMFVideoPlayControllerCustomCommands : public RMMFCustomCommandsBase
  1.2246 +	{
  1.2247 +public:
  1.2248 +
  1.2249 +	/**
  1.2250 +	Constructor.
  1.2251 +
  1.2252 +	@param  aController
  1.2253 +	        The client side controller object to be used by this custom command interface.
  1.2254 +
  1.2255 +	@since  7.0s
  1.2256 +	*/
  1.2257 +	IMPORT_C RMMFVideoPlayControllerCustomCommands(RMMFController& aController);
  1.2258 +
  1.2259 +	/**
  1.2260 +	Prepares the video clip to be accessed.
  1.2261 +
  1.2262 +	A call to this function tells the loaded controller plugin to finalise its configuration
  1.2263 +	and to prepare to start reading the video clip.  It is not possible to play the video clip
  1.2264 +	or query any of its properties (e.g. duration, meta data etc.) until the controller plugin
  1.2265 +	has signified the completion of this method by generating a KMMFEventCategoryVideoPrepareComplete
  1.2266 +	event.
  1.2267 +
  1.2268 +	@since  7.0s
  1.2269 +	*/
  1.2270 +	IMPORT_C TInt Prepare();
  1.2271 +
  1.2272 +	/**
  1.2273 +	Asks the controller to store the current frame to a bitmap. 
  1.2274 +
  1.2275 +	The video play controller will send an event to the client on completion of the task.
  1.2276 +
  1.2277 +	@param  aBitmap
  1.2278 +	        The handle of the CFbsBitmap object to retrieve the frame to.
  1.2279 +	@param  aStatus
  1.2280 +	        The active object to call back on.
  1.2281 +
  1.2282 +	@return One of the system-wide error codes.
  1.2283 +
  1.2284 +	@since  7.0s
  1.2285 +	*/
  1.2286 +	IMPORT_C void GetFrame(CFbsBitmap& aBitmap, TRequestStatus& aStatus);
  1.2287 +
  1.2288 +	/**
  1.2289 +	Sets the screen region to be used to display the video.
  1.2290 +
  1.2291 +	@param  aWindowRect
  1.2292 +	        The window rectangle.
  1.2293 +	@param  aClipRect
  1.2294 +	        The clip rectangle.
  1.2295 +
  1.2296 +	@return One of the system-wide error codes.
  1.2297 +
  1.2298 +	@since  7.0s
  1.2299 +	*/
  1.2300 +	IMPORT_C TInt SetDisplayWindow(const TRect& aWindowRect, const TRect& aClipRect) const;
  1.2301 +
  1.2302 +	/**
  1.2303 +	Updates the display region.
  1.2304 +
  1.2305 +	@param  aRegion
  1.2306 +	        The valid region to display to.
  1.2307 +
  1.2308 +	@return One of the system-wide error codes.
  1.2309 +
  1.2310 +	@since  7.0s
  1.2311 +	*/
  1.2312 +	IMPORT_C TInt UpdateDisplayRegion(const TRegion& aRegion) const;
  1.2313 +
  1.2314 +	/**
  1.2315 +	Queries whether audio is enabled.
  1.2316 +
  1.2317 +	@param  aEnabled
  1.2318 +	        A boolean indicating whether audio is enabled.
  1.2319 +
  1.2320 +	@return One of the system-wide error codes.
  1.2321 +
  1.2322 +	@since  7.0s
  1.2323 +	*/
  1.2324 +	IMPORT_C TInt GetAudioEnabled(TBool& aEnabled) const;
  1.2325 +
  1.2326 +	/**
  1.2327 +	Sends a direct screen access event to controller.
  1.2328 +
  1.2329 +	@param  aDSAEvent
  1.2330 +	        The direct screen access event.
  1.2331 +
  1.2332 +	@return One of the system-wide error codes.
  1.2333 +
  1.2334 +	@since  7.0s
  1.2335 +	*/
  1.2336 +	IMPORT_C TInt DirectScreenAccessEvent(const TMMFDSAEvent aDSAEvent) const;
  1.2337 +
  1.2338 +	/**
  1.2339 + 	Sets a time window for video playback.
  1.2340 +
  1.2341 + 	@param  aStart
  1.2342 +	        The start time in milliseconds relative to the start of the video clip.
  1.2343 +  	@param  aEnd
  1.2344 +	        The end time in milliseconds relative to the start of the video clip.
  1.2345 +
  1.2346 +  	@return One of the system-wide error codes.
  1.2347 +
  1.2348 +  	@since  7.0s
  1.2349 +	*/
  1.2350 +	IMPORT_C TInt Play(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) const;
  1.2351 +
  1.2352 +	/**
  1.2353 +  	Requests the controller to redraw the current frame.
  1.2354 +
  1.2355 +  	@return One of the system-wide error codes.
  1.2356 +
  1.2357 +  	@since  7.0s
  1.2358 +	*/
  1.2359 +	IMPORT_C TInt RefreshFrame() const;
  1.2360 +
  1.2361 +	/**
  1.2362 +	Gets the video loading progress as a percentage.
  1.2363 +
  1.2364 +	@param  aPercentageProgress
  1.2365 +	        The progress loading the clip, as a percentage.
  1.2366 +
  1.2367 +	@return One of the system-wide error codes.
  1.2368 +
  1.2369 +	@since  7.0s
  1.2370 +	*/
  1.2371 +	IMPORT_C TInt GetLoadingProgress(TInt& aPercentageProgress) const;
  1.2372 +
  1.2373 +	/**
  1.2374 +	Rotates the video image on the screen.
  1.2375 +
  1.2376 +	@param  aRotation
  1.2377 +	        The desired rotation to apply.
  1.2378 +
  1.2379 +	@return One of the system-wide error codes.
  1.2380 +
  1.2381 +	@since  7.0s
  1.2382 +	*/
  1.2383 +	IMPORT_C TInt SetRotation(TVideoRotation aRotation) const;
  1.2384 +
  1.2385 +	/**
  1.2386 +	Queries the rotation that is currently applied to the video image.
  1.2387 +
  1.2388 +	@param  aRotation
  1.2389 +	        The applied rotation.
  1.2390 +
  1.2391 +	@return One of the system wide error codes.
  1.2392 +
  1.2393 +	@since  7.0s
  1.2394 +	*/
  1.2395 +	IMPORT_C TInt GetRotation(TVideoRotation& aRotation) const;
  1.2396 +
  1.2397 +	/**
  1.2398 +	Scales the video image to a specified percentage of its original size.
  1.2399 +
  1.2400 +	@param  aWidthPercentage
  1.2401 +	        The percentage (100 = original size) to be used to scale the width of the video image.
  1.2402 +	@param  aHeightPercentage
  1.2403 +	        The percentage (100 = original size) to be used to scale the height of the video image. 
  1.2404 +	        If this is not equal to aWidthPercentage then the image may be distorted.
  1.2405 +	@param  aAntiAliasFiltering
  1.2406 +	        True if anti-aliasing filtering should be used. If the plugin does not
  1.2407 +	        support this kind of processing, this value will be ignored.
  1.2408 +
  1.2409 +	@return One of the system wide error codes.
  1.2410 +
  1.2411 +	@since 7.0s
  1.2412 +	*/
  1.2413 +	IMPORT_C TInt SetScaleFactor(TReal32 aWidthPercentage, TReal32 aHeightPercentage, TBool aAntiAliasFiltering) const;
  1.2414 +
  1.2415 +	/**
  1.2416 +	Gets the scale factor currently applied to the video image.
  1.2417 +
  1.2418 +	@param  aWidthPercentage
  1.2419 +	        On return, will contain the percentage (100 = original size) used to scale the width
  1.2420 +	        of the video image.
  1.2421 +	@param  aHeightPercentage
  1.2422 +	        On return. will contain the percentage (100 = original size) used to scale the height 
  1.2423 +	        of the video image.
  1.2424 +	@param  aAntiAliasFiltering
  1.2425 +	        True if anti-aliasing filtering is being used
  1.2426 +
  1.2427 +	@return One of the system wide error codes.
  1.2428 +
  1.2429 +	@since  7.0s
  1.2430 +	*/
  1.2431 +	IMPORT_C TInt GetScaleFactor(TReal32& aWidthPercentage, TReal32& aHeightPercentage, TBool& aAntiAliasFiltering) const;
  1.2432 +
  1.2433 +	/**
  1.2434 +	Selects a region of the video image to be displayed.
  1.2435 +
  1.2436 +	@param  aCropRegion
  1.2437 +	        The dimensions of the crop region, relative to the video image.
  1.2438 +
  1.2439 +	@return One of the system wide error codes.
  1.2440 +
  1.2441 +	@since 7.0s
  1.2442 +	*/
  1.2443 +	IMPORT_C TInt SetCropRegion(const TRect& aCropRegion) const;
  1.2444 +
  1.2445 +	/**
  1.2446 +	Gets the crop region currently applied to the image.
  1.2447 +
  1.2448 +	@param  aCropRegion
  1.2449 +	        The dimensions of the crop region, relative to the video image. If no crop region has
  1.2450 +	        been applied, the full dimensions of the video image will be returned.
  1.2451 +	
  1.2452 +	@return One of the system-wide error codes.
  1.2453 +
  1.2454 +	@since  7.0s
  1.2455 +	*/
  1.2456 +	IMPORT_C TInt GetCropRegion(TRect& aCropRegion) const;
  1.2457 +
  1.2458 +
  1.2459 +private:
  1.2460 +	TPckgBuf<TMMFVideoConfig> iConfigPackage;
  1.2461 +	};
  1.2462 +
  1.2463 +/**
  1.2464 +@publishedAll
  1.2465 +@released
  1.2466 +*/
  1.2467 +
  1.2468 +	enum TMMFVideoRecordControllerMessages
  1.2469 +		{
  1.2470 +		EMMFVideoRecordControllerSetVideoFormat,
  1.2471 +		EMMFVideoRecordControllerSetVideoCodec,
  1.2472 +		EMMFVideoRecordControllerSetAudioCodec,
  1.2473 +		EMMFVideoRecordControllerSetVideoBitRate,
  1.2474 +		EMMFVideoRecordControllerSetAudioBitRate,
  1.2475 +		EMMFVideoRecordControllerSetVideoFrameSize,
  1.2476 +		EMMFVideoRecordControllerSetMaxFileSize,
  1.2477 +		EMMFVideoRecordControllerAddMetaDataEntry,
  1.2478 +		EMMFVideoRecordControllerRemoveMetaDataEntry,
  1.2479 +		EMMFVideoRecordControllerReplaceMetaDataEntry,
  1.2480 +		EMMFVideoRecordControllerSetAudioEnabled,
  1.2481 +		EMMFVideoRecordControllerPrepare,
  1.2482 +		EMMFVideoRecordControllerSetCameraHandle,
  1.2483 +		EMMFVideoRecordControllerGetRecordTimeAvailable,
  1.2484 +		EMMFVideoRecordControllerGetSupportedSinkAudioTypes,
  1.2485 +		EMMFVideoRecordControllerGetSupportedSinkVideoTypes,
  1.2486 +		EMMFVideoRecordControllerCopyDescriptorArrayData,
  1.2487 +		EMMFVideoRecordControllerCopyFourCCArrayData,
  1.2488 +		EMMFVideoRecordControllerGetAudioEnabled // INC23777
  1.2489 +		};
  1.2490 +
  1.2491 +
  1.2492 +/**
  1.2493 +@publishedAll
  1.2494 +@released
  1.2495 +
  1.2496 +Client class to access functionality specific to a video recorder controller.
  1.2497 +
  1.2498 +The class uses the custom command function of the controller plugin, and removes the necessity
  1.2499 +for the client to formulate the custom commands.
  1.2500 +
  1.2501 +@since  7.0s
  1.2502 +*/
  1.2503 +class RMMFVideoRecordControllerCustomCommands : public RMMFCustomCommandsBase
  1.2504 +	{
  1.2505 +public:
  1.2506 +
  1.2507 +	/**
  1.2508 +	Constructor.
  1.2509 +
  1.2510 +	@param  aController
  1.2511 +	        The client side controller object to be used by this custom command interface.
  1.2512 +
  1.2513 +	@since 7.0s
  1.2514 +	*/
  1.2515 +	IMPORT_C RMMFVideoRecordControllerCustomCommands(RMMFController& aController);
  1.2516 +
  1.2517 +	/**
  1.2518 +	Sets the format for the video to record.
  1.2519 +
  1.2520 +	@param  aVideoFormatUid
  1.2521 +	        The UID of the video format.
  1.2522 +
  1.2523 +	@return This method will return with one of the system-wide error codes.
  1.2524 +
  1.2525 +	@since  7.0s
  1.2526 +	*/
  1.2527 +	IMPORT_C TInt SetVideoFormat(TUid aVideoFormatUid) const;
  1.2528 +
  1.2529 +	/**
  1.2530 +	Sets the video codec for recording.
  1.2531 +
  1.2532 +	@param  aVideoCodec
  1.2533 +	        The MIME type of the video codec.
  1.2534 +
  1.2535 +	@return	One of the system-wide error codes.
  1.2536 +
  1.2537 +	@since  7.0s
  1.2538 +	*/
  1.2539 +	IMPORT_C TInt SetVideoCodec(const TDesC8& aVideoCodec) const;
  1.2540 +
  1.2541 +	/**
  1.2542 +	Sets the video bit rate.
  1.2543 +
  1.2544 +	@param  aBitRate
  1.2545 +	        The bit rate of the video stream.
  1.2546 +
  1.2547 +	@return One of the system-wide error codes.
  1.2548 +
  1.2549 +	@since  7.0s
  1.2550 +	*/
  1.2551 +	IMPORT_C TInt SetVideoBitRate(TInt aBitRate) const;
  1.2552 +
  1.2553 +	/**
  1.2554 +	Sets the audio bit rate.
  1.2555 +
  1.2556 +	@param  aBitRate
  1.2557 +	        The bit rate of the audio stream.
  1.2558 +
  1.2559 +	@return One of the system-wide error codes.
  1.2560 +
  1.2561 +	@since  7.0s
  1.2562 +	*/
  1.2563 +	IMPORT_C TInt SetAudioBitRate(TInt aBitRate) const;
  1.2564 +
  1.2565 +	/**
  1.2566 +	Sets the audio codec for recording.
  1.2567 +
  1.2568 +	@param  aAudioCodec
  1.2569 +	        The FourCC code of the audio codec.
  1.2570 +
  1.2571 +	@return	One of the system-wide error codes.
  1.2572 +
  1.2573 +	@since  7.0s
  1.2574 +	*/
  1.2575 +	IMPORT_C TInt SetAudioCodec(TFourCC aAudioCodec) const;
  1.2576 +
  1.2577 +	/**
  1.2578 +	Sets the frame size of the clip.
  1.2579 +
  1.2580 +	@param  aVideoFrameSize
  1.2581 +	        The frame size, in pixels.
  1.2582 +
  1.2583 +	@return One of the system-wide error codes.
  1.2584 +
  1.2585 +	@since  7.0s
  1.2586 +	*/
  1.2587 +	IMPORT_C TInt SetVideoFrameSize(TSize aVideoFrameSize) const;
  1.2588 +
  1.2589 +	/**
  1.2590 +	Sets the maximum size of the recorded clip, in bytes.
  1.2591 +
  1.2592 +	@param  aMaxSize
  1.2593 +	        The maximum size of the recorded clip, in bytes. This can be called with the parameter 
  1.2594 +	        KMMFNoMaxClipSize which signifies no maximum file size.
  1.2595 +
  1.2596 +	@return	One of the system-wide error codes.
  1.2597 +
  1.2598 +	@since  7.0s
  1.2599 +	*/
  1.2600 +	IMPORT_C TInt SetMaxFileSize(TInt aMaxSize) const;
  1.2601 +
  1.2602 +	/**
  1.2603 +	Adds meta data to the clip.
  1.2604 +
  1.2605 +	@param  aNewEntry
  1.2606 +	        The details of the new entry to be added.
  1.2607 +
  1.2608 +	@return One of the system-wide error codes.
  1.2609 +
  1.2610 +	@since  7.0s
  1.2611 +	*/
  1.2612 +	IMPORT_C void AddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry)const;
  1.2613 +
  1.2614 +	/**
  1.2615 +	Removes a meta data entry from the clip.
  1.2616 +
  1.2617 +	@param  aIndex
  1.2618 +	        The ID of the meta data entry to delete.
  1.2619 +
  1.2620 +	@return One of the system-wide error codes.
  1.2621 +
  1.2622 +	@since  7.0s
  1.2623 +	*/
  1.2624 +	IMPORT_C TInt RemoveMetaDataEntry(TInt aIndex)const;
  1.2625 +
  1.2626 +	/**
  1.2627 +	Replaces a meta data in the clip.
  1.2628 +
  1.2629 +	@param  aIndex
  1.2630 +	        The ID of the meta data entry to replace.
  1.2631 +	@param  aNewEntry
  1.2632 +	        The details of the new entry to be added.
  1.2633 +
  1.2634 +	@since  7.0s
  1.2635 +	*/
  1.2636 +	IMPORT_C void ReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry)const;
  1.2637 +
  1.2638 +	/**
  1.2639 +	Sets whether audio is enabled.
  1.2640 +
  1.2641 +	@param  aEnable
  1.2642 +	        A boolean indicating if audio should be enabled.
  1.2643 +
  1.2644 +	@return One of the system-wide error codes.
  1.2645 +
  1.2646 +	@since  7.0s
  1.2647 +	*/
  1.2648 +	IMPORT_C TInt SetAudioEnabled(TBool aEnable) const;
  1.2649 +
  1.2650 +	/**
  1.2651 +	Prepares the controller for recording. This should be called before the first attempt to record 
  1.2652 +	with the controller.
  1.2653 +
  1.2654 +	@return One of the system-wide error codes.
  1.2655 +
  1.2656 +	@since  7.0s
  1.2657 +	*/
  1.2658 +	IMPORT_C TInt Prepare() const;
  1.2659 +
  1.2660 +	/**
  1.2661 +	Sets the handle of the camera to use.
  1.2662 +
  1.2663 +	@param  aCameraHandle
  1.2664 +	        The handle of the camera to use.
  1.2665 +
  1.2666 +	@return One of the system-wide error codes.
  1.2667 +
  1.2668 +	@since  7.0s
  1.2669 +	*/
  1.2670 +	IMPORT_C TInt SetCameraHandle(TInt aCameraHandle) const;
  1.2671 +
  1.2672 +	/**
  1.2673 +	Gets the (possibly estimated) record time left in the clip.
  1.2674 +
  1.2675 +	@param  aTime
  1.2676 +	        The record time available, in microseconds.
  1.2677 +
  1.2678 +	@return One of the system-wide error codes.
  1.2679 +
  1.2680 +	@since  7.0s
  1.2681 +	*/
  1.2682 +	IMPORT_C TInt GetRecordTimeAvailable(TTimeIntervalMicroSeconds& aTime) const;
  1.2683 +
  1.2684 +	/**
  1.2685 +	Gets the supported sink audio types.
  1.2686 +
  1.2687 +	@param  aSupportedDataTypes
  1.2688 +	        The supported data types.
  1.2689 +
  1.2690 +	@since  7.0s
  1.2691 +	*/
  1.2692 +	IMPORT_C TInt GetSupportedSinkAudioTypes(RArray<TFourCC>& aSupportedDataTypes) const;
  1.2693 +
  1.2694 +	/**
  1.2695 +	Gets the supported sink video types.
  1.2696 +
  1.2697 +	@param  aDataTypes
  1.2698 +	        The supported data types.
  1.2699 +
  1.2700 +	@since  7.0s
  1.2701 +	*/
  1.2702 +	IMPORT_C TInt GetSupportedSinkVideoTypes(CDesC8Array& aDataTypes) const;
  1.2703 +
  1.2704 +	// INC23777
  1.2705 +	/**
  1.2706 +	Retrieves whether audio is enabled.
  1.2707 +
  1.2708 +	@param  aEnabled
  1.2709 +	        A boolean indicating whether audio is enabled.
  1.2710 +
  1.2711 +	@return One of the system-wide error codes.
  1.2712 +
  1.2713 +	@since  7.0s
  1.2714 +	*/
  1.2715 +	IMPORT_C TInt GetAudioEnabled(TBool& aEnabled) const;
  1.2716 +
  1.2717 +private:
  1.2718 +	void DoGetCDesC8ArrayL(CDesC8Array& aArray, TMMFVideoRecordControllerMessages aIpc) const;
  1.2719 +	void DoGetFourCCArrayL(RArray<TFourCC>& aArray) const;
  1.2720 +	};
  1.2721 +
  1.2722 +
  1.2723 +/**
  1.2724 +@publishedAll
  1.2725 +@released
  1.2726 +
  1.2727 +Mixin class to be derived from controller plugins that could support the video record controller 
  1.2728 +custom commands.
  1.2729 +*/
  1.2730 +class MMMFVideoRecordControllerCustomCommandImplementor
  1.2731 +	{
  1.2732 +public:
  1.2733 +
  1.2734 +	/**
  1.2735 +	Sets the format for the video to record.
  1.2736 +
  1.2737 +	@param  aVideoFormatUid
  1.2738 +	        The UID of the video format.
  1.2739 +
  1.2740 +	@return One of the system-wide error codes.
  1.2741 +
  1.2742 +	@since  7.0s
  1.2743 +	*/
  1.2744 +	virtual void MvrcSetVideoFormatL(TUid aVideoFormatUid)=0;
  1.2745 +
  1.2746 +	/**
  1.2747 +	Sets the video codec for recording.
  1.2748 +
  1.2749 +	@param  aVideoCodec
  1.2750 +	        The MIME type of the video codec.
  1.2751 +
  1.2752 +	@return One of the system-wide error codes.
  1.2753 +
  1.2754 +	@since 7.0s
  1.2755 +	*/
  1.2756 +	virtual void MvrcSetVideoCodecL(const TDesC8& aVideoCodec)=0;
  1.2757 +
  1.2758 +	/**
  1.2759 +	Sets the audio codec for recording.
  1.2760 +
  1.2761 +	@param  aAudioCodec
  1.2762 +	        The FourCC code of the audio codec.
  1.2763 +
  1.2764 +	@return One of the system-wide error codes.
  1.2765 +
  1.2766 +	@since  7.0s
  1.2767 +	*/
  1.2768 +	virtual void MvrcSetAudioCodecL(TFourCC aAudioCodec)=0;
  1.2769 +
  1.2770 +	/**
  1.2771 +	Sets the video bit rate.
  1.2772 +
  1.2773 +	@param  aBitRate
  1.2774 +	        The bit rate of the video stream. This can be called with the parameter 
  1.2775 +	        KMMFVariableVideoBitRate which specifies a variable bit rate.
  1.2776 +
  1.2777 +	@return One of the system-wide error codes.
  1.2778 +
  1.2779 +	@since  7.0s
  1.2780 +	*/
  1.2781 +	virtual void MvrcSetVideoBitRateL(TInt& aBitRate)=0;
  1.2782 +
  1.2783 +	/**
  1.2784 +	Sets the audio bit rate.
  1.2785 +
  1.2786 +	@param  aBitRate
  1.2787 +	        The bit rate of the audio stream.
  1.2788 +
  1.2789 +	@return One of the system-wide error codes.
  1.2790 +
  1.2791 +	@since  7.0s
  1.2792 +	*/
  1.2793 +	virtual void MvrcSetAudioBitRateL(TInt& aBitRate)=0;
  1.2794 +
  1.2795 +	/**
  1.2796 +	Adds meta data to the clip.
  1.2797 +
  1.2798 +	@param  aNewEntry
  1.2799 +	        The details of the new entry to be added.
  1.2800 +
  1.2801 +	@since  7.0s
  1.2802 +	*/
  1.2803 +	virtual void MvrcAddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry)=0;
  1.2804 +
  1.2805 +	/**
  1.2806 +	Removes a meta data entry from the clip.
  1.2807 +
  1.2808 +	@param  aIndex
  1.2809 +	        The ID of the meta data entry to delete.
  1.2810 +
  1.2811 +	@since  7.0s
  1.2812 +	*/
  1.2813 +	virtual void MvrcRemoveMetaDataEntryL(TInt aIndex)=0;
  1.2814 +
  1.2815 +	/**
  1.2816 +	Replaces a meta data in the clip.
  1.2817 +
  1.2818 +	@param  aIndex
  1.2819 +	        The ID of the meta data entry to replace.
  1.2820 +	@param  aNewEntry
  1.2821 +	        The details of the new entry to be added.
  1.2822 +
  1.2823 +	@since  7.0s
  1.2824 +	*/
  1.2825 +	virtual void MvrcReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry)=0;
  1.2826 +
  1.2827 +	/**
  1.2828 +	Sets the maximum file size.
  1.2829 +
  1.2830 +	@param  aMaxFileSize
  1.2831 +	        The maximum file size allowed for recording. This can be called with the parameter
  1.2832 +	        KMMFNoMaxClipSize which signifies no maximum file size.
  1.2833 +
  1.2834 +	@since  7.0s
  1.2835 +	*/
  1.2836 +	virtual void MvrcSetMaxFileSizeL(TInt aMaxFileSize)=0;
  1.2837 +
  1.2838 +	/**
  1.2839 +	Sets whether audio is enabled.
  1.2840 +
  1.2841 +	@param  aEnable
  1.2842 +	        A boolean indicating if audio is enabled.
  1.2843 +
  1.2844 +	@since  7.0s
  1.2845 +	*/
  1.2846 +	virtual void MvrcSetAudioEnabledL(TBool aEnable)=0;
  1.2847 +
  1.2848 +	/**
  1.2849 +	Sets the frame size for the video recording.
  1.2850 +
  1.2851 +	@param  aFrameSize
  1.2852 +	        The frame size for recording.
  1.2853 +
  1.2854 +	@since  7.0s
  1.2855 +	*/
  1.2856 +	virtual void MvrcSetVideoFrameSizeL(TSize aFrameSize)=0;
  1.2857 +
  1.2858 +	/**
  1.2859 +	Prepares the controller for recording. This needs to be called before
  1.2860 +	the first call to Record().
  1.2861 +
  1.2862 +	@since  7.0s
  1.2863 +	*/
  1.2864 +	virtual void MvrcPrepareL()=0;
  1.2865 +
  1.2866 +	/**
  1.2867 +	Sets the handle of the camera to use for recording.
  1.2868 +
  1.2869 +	@since  7.0s
  1.2870 +	*/
  1.2871 +	virtual void MvrcSetCameraHandleL(TInt aCameraHandle)=0;
  1.2872 +
  1.2873 +	/**
  1.2874 +	Gets the (possibly estimated) record time left in the clip.
  1.2875 +
  1.2876 +	@param  aTime
  1.2877 +	        The record time available, in microseconds.
  1.2878 +
  1.2879 +	@since  7.0s
  1.2880 +	*/
  1.2881 +	virtual void MvrcGetRecordTimeAvailableL(TTimeIntervalMicroSeconds& aTime) = 0;
  1.2882 +
  1.2883 +	/**
  1.2884 +	Gets the supported sink audio types.
  1.2885 +
  1.2886 +	@param  aDataTypes
  1.2887 +	        The supported data types.
  1.2888 +
  1.2889 +	@return One of the system-wide error codes.
  1.2890 +
  1.2891 +	@since  7.0s
  1.2892 +	*/
  1.2893 +	virtual void MvrcGetSupportedSinkAudioTypesL(RArray<TFourCC>& aDataTypes)=0;
  1.2894 +
  1.2895 +	/**
  1.2896 +	Gets the supported sink video types.
  1.2897 +
  1.2898 +	@param  aDataTypes
  1.2899 +	        The supported data types.
  1.2900 +
  1.2901 +	@return One of the system-wide error codes.
  1.2902 +
  1.2903 +	@since  7.0s
  1.2904 +	*/
  1.2905 +	virtual void MvrcGetSupportedSinkVideoTypesL(CDesC8Array& aDataTypes)=0;
  1.2906 +
  1.2907 +	//INC23777
  1.2908 +	/**
  1.2909 +	Indicates if the audio is enabled.
  1.2910 +
  1.2911 +	@param  aEnabled
  1.2912 +	        A boolean indicating if the audio is enabled.
  1.2913 +
  1.2914 +	@since  7.0s
  1.2915 +	*/
  1.2916 +	virtual void MvrcGetAudioEnabledL(TBool& aEnabled)=0;
  1.2917 +	};
  1.2918 +
  1.2919 +
  1.2920 +/**
  1.2921 +@publishedAll
  1.2922 +@released
  1.2923 +
  1.2924 +Client class to access functionality specific to a video playback controller.
  1.2925 +
  1.2926 +The class uses the custom command function of the controller plugin, and removes the necessity
  1.2927 +for the client to formulate the custom commands.
  1.2928 +
  1.2929 +@since  7.0s
  1.2930 +*/
  1.2931 +class MMMFVideoPlayControllerCustomCommandImplementor
  1.2932 +	{
  1.2933 +public:
  1.2934 +
  1.2935 +	/**
  1.2936 +	Prepares the video clip to be accessed.
  1.2937 +
  1.2938 +	A call to this method tells the controller plugin to finalise its configuration
  1.2939 +	and to prepare to start reading the video clip.  It is not possible to play the video clip
  1.2940 +	or query any of its properties (e.g. duration, meta data etc.) until the controller plugin
  1.2941 +	has signified the completion of this method by generating a 
  1.2942 +	KMMFEventCategoryVideoPrepareComplete event.
  1.2943 +
  1.2944 +	@since  7.0s
  1.2945 +	*/
  1.2946 +	virtual void MvpcPrepare()=0;
  1.2947 +
  1.2948 +	/**
  1.2949 +	Gets a frame previously requested from the controller.
  1.2950 +
  1.2951 +	@param  aVideoFrame
  1.2952 +	        The handle of bitmap to retrieve frame to.
  1.2953 +
  1.2954 +	@since  7.0s
  1.2955 +	*/
  1.2956 +	virtual void MvpcGetFrameL(MMMFVideoFrameMessage& aVideoFrame)=0;
  1.2957 +
  1.2958 +	/**
  1.2959 +	Indicates whether audio is enabled.
  1.2960 +
  1.2961 +	@param  aEnabled
  1.2962 +	        On return, contains a boolean indicating whether audio is enabled.
  1.2963 +
  1.2964 +	@since  7.0s
  1.2965 +	*/
  1.2966 +	virtual void MvpcGetAudioEnabledL(TBool& aEnabled)=0;
  1.2967 +
  1.2968 +	/**
  1.2969 +	Sets the screen region to be used to display the video.
  1.2970 +
  1.2971 +	@param  aClipRect
  1.2972 +	        The clip rect used to display the video.
  1.2973 +
  1.2974 +	@since  7.0s
  1.2975 +	*/
  1.2976 +	virtual void MvpcSetDisplayWindowL(const TRect& aWindowRect, const TRect& aClipRect) = 0;
  1.2977 +
  1.2978 +	/**
  1.2979 +	Updates the region to display.
  1.2980 +
  1.2981 +	@param  aRegion
  1.2982 +	        A TRegion containing the current display regions, ownership of the TRegion is not
  1.2983 +	        transferred.
  1.2984 +
  1.2985 +	@since  7.0s
  1.2986 +	*/
  1.2987 +	virtual void MvpcUpdateDisplayRegionL(const TRegion& aRegion) = 0;
  1.2988 +
  1.2989 +	/**
  1.2990 +	Pauses/Resumes video playback. This is to be used with direct screen access
  1.2991 +	to indicate that the display has changed and should not be written to. This
  1.2992 +	does not affect audio playback.
  1.2993 +
  1.2994 +	@param  aDSAEvent
  1.2995 +	        Whether the video display should be active.
  1.2996 +
  1.2997 +	@since  7.0s
  1.2998 +	*/
  1.2999 +	virtual void MvpcDirectScreenAccessEventL(const TMMFDSAEvent aDSAEvent) = 0;
  1.3000 +
  1.3001 +	/**
  1.3002 + 	Sets a time window for video playback.
  1.3003 +
  1.3004 + 	@param  aStart
  1.3005 +	        Start time in milliseconds relative to the start of the video clip.
  1.3006 +  	@param  aEnd
  1.3007 +	        End time in milliseconds relative to the start of the video clip.
  1.3008 +
  1.3009 +  	@since 7.0s
  1.3010 +	*/
  1.3011 +	virtual void MvpcPlayL(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) = 0;
  1.3012 +	
  1.3013 +	/**
  1.3014 +  	Requests the controller to redraw the current frame.
  1.3015 +
  1.3016 +  	@since  7.0s
  1.3017 +	*/
  1.3018 +	virtual void MvpcRefreshFrameL() = 0;
  1.3019 +
  1.3020 +	/**
  1.3021 +	Gets the progress of loading a video clip.
  1.3022 +
  1.3023 +	@param  aPercentageComplete
  1.3024 +	        The progress loading the clip, as a percentage.
  1.3025 +
  1.3026 +	@since  7.0s
  1.3027 +	*/
  1.3028 +	virtual void MvpcGetLoadingProgressL(TInt& aPercentageComplete) = 0;
  1.3029 +
  1.3030 +	/**
  1.3031 +	Rotates the video image on the screen.
  1.3032 +
  1.3033 +	@param  aRotation
  1.3034 +	        The desired rotation to apply.
  1.3035 +
  1.3036 +	@since  7.0s
  1.3037 +	*/
  1.3038 +	virtual void MvpcSetRotationL(TVideoRotation aRotation) = 0;
  1.3039 +
  1.3040 +	/**
  1.3041 +	Queries the rotation that is currently applied to the video image.
  1.3042 +
  1.3043 +	@param  aRotation
  1.3044 +	        The applied rotation.
  1.3045 +
  1.3046 +	@since  7.0s
  1.3047 +	*/
  1.3048 +	virtual void MvpcGetRotationL(TVideoRotation& aRotation) = 0;
  1.3049 +
  1.3050 +	/**
  1.3051 +	Scales the video image to a specified percentage of its original size.
  1.3052 +
  1.3053 +	@param  aWidthPercentage
  1.3054 +	        The percentage (100 = original size) to be used to scale the width of the video image.
  1.3055 +	@param  aHeightPercentage
  1.3056 +	        The percentage (100 = original size) to be used to scale the height of the video image. 
  1.3057 +	        If this is not equal to aWidthPercentage then the image may be distorted.
  1.3058 +	@param  aAntiAliasFiltering
  1.3059 +	        A boolean indicating if anit-aliasing filtering should be used. ETrue if anti-aliasing 
  1.3060 +	        should be used.  If the plugin does not support this kind of processing, this value will 
  1.3061 +	        be ignored.
  1.3062 +
  1.3063 +	@since  7.0s
  1.3064 +	*/
  1.3065 +	virtual void MvpcSetScaleFactorL(TReal32 aWidthPercentage, TReal32 aHeightPercentage, TBool aAntiAliasFiltering) = 0;
  1.3066 +
  1.3067 +	/**
  1.3068 +	Gets the scale factor currently applied to the video image.
  1.3069 +
  1.3070 +	@param  aWidthPercentage
  1.3071 +	        The percentage (100 = original size) used to scale the width of the video image will be 
  1.3072 +	        copied into here.
  1.3073 +	@param  aHeightPercentage
  1.3074 +	        The percentage (100 = original size) used to scale the height of the video image will be 
  1.3075 +	        copied into here.
  1.3076 +	@param  aAntiAliasFiltering
  1.3077 +	        A boolean indicating if anti-aliasing filtering should be used. ETrue if anti-aliasing 
  1.3078 +	        filtering is being used, EFalse if not.
  1.3079 +
  1.3080 +	@since 7.0s
  1.3081 +	*/
  1.3082 +	virtual void MvpcGetScaleFactorL(TReal32& aWidthPercentage, TReal32& aHeightPercentage, TBool& aAntiAliasFiltering) = 0;
  1.3083 +
  1.3084 +	/**
  1.3085 +	Selects a region of the video image to be displayed.
  1.3086 +
  1.3087 +	@param  aCropRegion
  1.3088 +	        The dimensions of the crop region, relative to the video image.
  1.3089 +
  1.3090 +	@since  7.0s
  1.3091 +	*/
  1.3092 +	virtual void MvpcSetCropRegionL(const TRect& aCropRegion) = 0;
  1.3093 +
  1.3094 +	/**
  1.3095 +	Gets the crop region currently applied to the image
  1.3096 +
  1.3097 +	@param  aCropRegion
  1.3098 +	        The dimensions of the crop region, relative to the video image. If no crop region has 
  1.3099 +	        been applied, the full dimensions of the video image will be returned.
  1.3100 +
  1.3101 +	@since  7.0s
  1.3102 +	*/
  1.3103 +	virtual void MvpcGetCropRegionL(TRect& aCropRegion) = 0;
  1.3104 +	};
  1.3105 +
  1.3106 +/**
  1.3107 +@publishedAll
  1.3108 +@released
  1.3109 +
  1.3110 +Mixin class to be derived from controller plugins that could support the video record controller
  1.3111 +custom commands.
  1.3112 +*/
  1.3113 +class MMMFVideoControllerCustomCommandImplementor
  1.3114 +	{
  1.3115 +public:
  1.3116 +
  1.3117 +	/**
  1.3118 +	Gets the frame size of the clip.
  1.3119 +
  1.3120 +	@param  aVideoFrameSize
  1.3121 +	        The frame size, in pixels.
  1.3122 +
  1.3123 +	@since  7.0s
  1.3124 +	*/
  1.3125 +	virtual void MvcGetVideoFrameSizeL(TSize& aVideoFrameSize)=0;
  1.3126 +
  1.3127 +	/**
  1.3128 +	Gets the audio type.
  1.3129 +
  1.3130 +	@param  aCodec
  1.3131 +	        The FourCC of the audio codec.
  1.3132 +
  1.3133 +	@since  7.0s
  1.3134 +	*/
  1.3135 +	virtual void MvcGetAudioCodecL(TFourCC& aCodec)=0;
  1.3136 +
  1.3137 +	/**
  1.3138 +	Gets the video bit rate.
  1.3139 +
  1.3140 +	@param  aBitRate
  1.3141 +	        The bit rate of the video stream. If this value is KMMFVariableVideoBitRate it signifies
  1.3142 +	        a variable bit rate.
  1.3143 +
  1.3144 +	@since  7.0s
  1.3145 +	*/
  1.3146 +	virtual void MvcGetVideoBitRateL(TInt& aBitRate)=0;
  1.3147 +
  1.3148 +	/**
  1.3149 +	Gets the audio bit rate.
  1.3150 +
  1.3151 +	@param  aBitRate
  1.3152 +	        The bit rate of the audio stream.
  1.3153 +
  1.3154 +	@since  7.0s
  1.3155 +	*/
  1.3156 +	virtual void MvcGetAudioBitRateL(TInt& aBitRate)=0;
  1.3157 +
  1.3158 +	/**
  1.3159 +	Sets the frame rate of the clip.
  1.3160 +
  1.3161 +	@param  aFramesPerSecond
  1.3162 +	        The number of frames per second.
  1.3163 +
  1.3164 +	@since  7.0s
  1.3165 +	*/
  1.3166 +	virtual void MvcSetFrameRateL(TReal32 aFramesPerSecond)=0;
  1.3167 +
  1.3168 +	/**
  1.3169 +	Gets the frame rate of the clip.
  1.3170 +
  1.3171 +	@param  aFramesPerSecond
  1.3172 +	        The number of frames per second, filled in by the controller plugin.
  1.3173 +
  1.3174 +	@since  7.0s
  1.3175 +	*/
  1.3176 +	virtual void MvcGetFrameRateL(TReal32& aFramesPerSecond)=0;
  1.3177 +
  1.3178 +	/**
  1.3179 +	Gets the supported sink video types.
  1.3180 +
  1.3181 +	@param  aMimeType
  1.3182 +	        The supported data types.
  1.3183 +
  1.3184 +	@since  7.0s
  1.3185 +	*/
  1.3186 +	virtual void MvcGetVideoMimeTypeL(TDes8& aMimeType)=0;
  1.3187 +	};
  1.3188 +
  1.3189 +
  1.3190 +/**
  1.3191 +@publishedAll
  1.3192 +@released
  1.3193 +
  1.3194 +Custom command parser class to be used by controller plugins wishing to support
  1.3195 +video controller commands.
  1.3196 +
  1.3197 +The controller plugin must be derived from MMMFVideoControllerCustomCommandImplementor
  1.3198 +to use this class.
  1.3199 +
  1.3200 +The controller plugin should create an object of this type and add it to the list of custom
  1.3201 +command parsers in the controller framework.  See the following example code for details.
  1.3202 +
  1.3203 +@code
  1.3204 +void CMMFAudioController::ConstructL()
  1.3205 +	{
  1.3206 +	// Construct custom command parsers
  1.3207 +	CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
  1.3208 +	CleanupStack::PushL(audPlayDevParser);
  1.3209 +	AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
  1.3210 +	CleanupStack::Pop();//audPlayDevParser
  1.3211 +
  1.3212 +	CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
  1.3213 +	CleanupStack::PushL(audRecDevParser);
  1.3214 +	AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
  1.3215 +	CleanupStack::Pop();//audRecDevParser
  1.3216 +
  1.3217 +etc.
  1.3218 +	}
  1.3219 +@endcode
  1.3220 +
  1.3221 +@since 7.0s
  1.3222 +
  1.3223 +*/
  1.3224 +class CMMFVideoControllerCustomCommandParser : public CMMFCustomCommandParserBase
  1.3225 +	{
  1.3226 +public:
  1.3227 +
  1.3228 +	/**
  1.3229 +	Creates a new custom command parser capable of handling video controller commands.
  1.3230 +
  1.3231 +	@param  aImplementor
  1.3232 +	        A reference to the controller plugin that owns this new object.
  1.3233 +
  1.3234 +	@return	A pointer to the object created.
  1.3235 +
  1.3236 +	@since  7.0s
  1.3237 +	*/
  1.3238 +	IMPORT_C static CMMFVideoControllerCustomCommandParser* NewL(MMMFVideoControllerCustomCommandImplementor& aImplementor);
  1.3239 +
  1.3240 +	/**
  1.3241 +	Destructor.
  1.3242 +
  1.3243 +	@since  7.0s
  1.3244 +	*/
  1.3245 +	IMPORT_C ~CMMFVideoControllerCustomCommandParser();
  1.3246 +
  1.3247 +	/**
  1.3248 +	Handles a request from the client. Called by the controller framework.
  1.3249 +
  1.3250 +	@param  aMessage
  1.3251 +	        The message to be handled.
  1.3252 +
  1.3253 +	@since  7.0s
  1.3254 +	*/
  1.3255 +	void HandleRequest(TMMFMessage& aMessage);
  1.3256 +private:
  1.3257 +
  1.3258 +	/**
  1.3259 +	Constructor.
  1.3260 +
  1.3261 +	@param  aImplementor
  1.3262 +	        A reference to the controller plugin that owns this new object.
  1.3263 +
  1.3264 +	@since  7.0s
  1.3265 +	*/
  1.3266 +	CMMFVideoControllerCustomCommandParser(MMMFVideoControllerCustomCommandImplementor& aImplementor);
  1.3267 +	// Internal request handling methods.
  1.3268 +	void DoHandleRequestL(TMMFMessage& aMessage);
  1.3269 +	TBool DoGetAudioCodecL(TMMFMessage& aMessage);
  1.3270 +
  1.3271 +	TBool DoGetAudioBitRateL(TMMFMessage& aMessage);
  1.3272 +	TBool DoGetVideoBitRateL(TMMFMessage& aMessage);
  1.3273 +	TBool DoGetVideoFrameSizeL(TMMFMessage& aMessage);
  1.3274 +	TBool DoSetFrameRateL(TMMFMessage& aMessage);
  1.3275 +	TBool DoGetFrameRateL(TMMFMessage& aMessage);
  1.3276 +	TBool DoGetVideoMimeTypeL(TMMFMessage& aMessage);
  1.3277 +private:
  1.3278 +	/** 
  1.3279 +	The object that implements the video record controller interface 
  1.3280 +	*/
  1.3281 +	MMMFVideoControllerCustomCommandImplementor& iImplementor;
  1.3282 +	};
  1.3283 +
  1.3284 +/**
  1.3285 +@publishedAll
  1.3286 +@released
  1.3287 +
  1.3288 +Custom command parser class to be used by controller plugins wishing to support video play 
  1.3289 +controller commands.
  1.3290 +
  1.3291 +The controller plugin must be derived from MMMFVideoPlayControllerCustomCommandImplementor to use 
  1.3292 +this class. The controller plugin should create an object of this type and add it to the list of 
  1.3293 +custom command parsers in the controller framework.
  1.3294 +*/
  1.3295 +class CMMFVideoPlayControllerCustomCommandParser : public CMMFCustomCommandParserBase
  1.3296 +	{
  1.3297 +public:
  1.3298 +
  1.3299 +	/**
  1.3300 +	Creates a new custom command parser capable of handling video controller commands.
  1.3301 +
  1.3302 +	@param  aImplementor
  1.3303 +	        A reference to the controller plugin that owns this new object.
  1.3304 +
  1.3305 +	@return A pointer to the object created.
  1.3306 +
  1.3307 +	@since  7.0s
  1.3308 +	*/
  1.3309 +	IMPORT_C static CMMFVideoPlayControllerCustomCommandParser* NewL(MMMFVideoPlayControllerCustomCommandImplementor& aImplementor);
  1.3310 +
  1.3311 +	/**
  1.3312 +	Destructor.
  1.3313 +
  1.3314 +	@since  7.0s
  1.3315 +	*/
  1.3316 +	IMPORT_C ~CMMFVideoPlayControllerCustomCommandParser();
  1.3317 +
  1.3318 +	/**
  1.3319 +	Handles a request from the client. Called by the controller framework.
  1.3320 +
  1.3321 +	@param  aMessage
  1.3322 +	        The message to be handled.
  1.3323 +
  1.3324 +	@since  7.0s
  1.3325 +	*/
  1.3326 +	void HandleRequest(TMMFMessage& aMessage);
  1.3327 +private:
  1.3328 +	/**
  1.3329 +	Constructor.
  1.3330 +
  1.3331 +	@param  aImplementor
  1.3332 +	        A reference to the controller plugin that owns this new object.
  1.3333 +
  1.3334 +	@since  7.0s
  1.3335 +	*/
  1.3336 +	CMMFVideoPlayControllerCustomCommandParser(MMMFVideoPlayControllerCustomCommandImplementor& aImplementor);
  1.3337 +	// Internal request handling methods.
  1.3338 +	void DoHandleRequestL(TMMFMessage& aMessage);
  1.3339 +	TBool DoRequestFrameL(TMMFMessage& aMessage);
  1.3340 +	TBool DoGetFrameL(TMMFMessage& aMessage);
  1.3341 +	TBool DoSetDisplayWindowL(TMMFMessage& aMessage);
  1.3342 +	TBool DoUpdateDisplayRegionL(TMMFMessage& aMessage);
  1.3343 +	TBool DoGetAudioEnabledL(TMMFMessage& aMessage);
  1.3344 +	TBool DoDirectScreenAccessEventL(TMMFMessage& aMessage);
  1.3345 +	TBool DoPlayL(TMMFMessage& aMessage);
  1.3346 +	TBool DoRefreshFrameL(TMMFMessage& aMessage);
  1.3347 +	TBool DoGetLoadingProgressL(TMMFMessage& aMessage);
  1.3348 +	TBool DoPrepareL(TMMFMessage& aMessage);
  1.3349 +	TBool DoSetRotationL(TMMFMessage& aMessage);
  1.3350 +	TBool DoGetRotationL(TMMFMessage& aMessage);
  1.3351 +	TBool DoSetScaleFactorL(TMMFMessage& aMessage);
  1.3352 +	TBool DoGetScaleFactorL(TMMFMessage& aMessage);
  1.3353 +	TBool DoSetCropRegionL(TMMFMessage& aMessage);
  1.3354 +	TBool DoGetCropRegionL(TMMFMessage& aMessage);
  1.3355 +
  1.3356 +
  1.3357 +private:
  1.3358 +	/** 
  1.3359 +	The object that implements the video record controller interface 
  1.3360 +	*/
  1.3361 +	MMMFVideoPlayControllerCustomCommandImplementor& iImplementor;
  1.3362 +	CMMFVideoFrameMessage* iVideoFrameMessage;
  1.3363 +	};
  1.3364 +
  1.3365 +/**
  1.3366 +@publishedAll
  1.3367 +@released
  1.3368 +
  1.3369 +Custom command parser class to be used by controller plugins wishing to support video record 
  1.3370 +controller commands.
  1.3371 +
  1.3372 +The controller plugin must be derived from MMMFVideoRecordControllerCustomCommandImplementor to use 
  1.3373 +this class. The controller plugin should create an object of this type and add it to the list of 
  1.3374 +custom command parsers in the controller framework.
  1.3375 +*/
  1.3376 +class CMMFVideoRecordControllerCustomCommandParser : public CMMFCustomCommandParserBase
  1.3377 +	{
  1.3378 +public:
  1.3379 +
  1.3380 +	/**
  1.3381 +	Creates a new custom command parser capable of handling video controller commands.
  1.3382 +
  1.3383 +	@param  aImplementor
  1.3384 +	        A reference to the controller plugin that owns this new object.
  1.3385 +
  1.3386 +	@return A pointer to the object created.
  1.3387 +
  1.3388 +	@since  7.0s
  1.3389 +	*/
  1.3390 +	IMPORT_C static CMMFVideoRecordControllerCustomCommandParser* NewL(MMMFVideoRecordControllerCustomCommandImplementor& aImplementor);
  1.3391 +
  1.3392 +	/**
  1.3393 +	Destructor.
  1.3394 +
  1.3395 +	@since  7.0s
  1.3396 +	*/
  1.3397 +	IMPORT_C ~CMMFVideoRecordControllerCustomCommandParser();
  1.3398 +
  1.3399 +	/**
  1.3400 +	Handles a request from the client. Called by the controller framework.
  1.3401 +
  1.3402 +	@param  aMessage
  1.3403 +	        The message to be handled.
  1.3404 +
  1.3405 +	@since  7.0s
  1.3406 +	*/
  1.3407 +	void HandleRequest(TMMFMessage& aMessage);
  1.3408 +private:
  1.3409 +	/**
  1.3410 +	Constructor.
  1.3411 +
  1.3412 +	@param  aImplementor
  1.3413 +	        A reference to the controller plugin that owns this new object.
  1.3414 +
  1.3415 +	@since  7.0s
  1.3416 +	*/
  1.3417 +	CMMFVideoRecordControllerCustomCommandParser(MMMFVideoRecordControllerCustomCommandImplementor& aImplementor);
  1.3418 +	// Internal request handling methods.
  1.3419 +	void DoHandleRequestL(TMMFMessage& aMessage);
  1.3420 +	TBool DoSetVideoFormatL(TMMFMessage& aMessage);
  1.3421 +	TBool DoSetAudioBitRateL(TMMFMessage& aMessage);
  1.3422 +	TBool DoSetVideoBitRateL(TMMFMessage& aMessage);
  1.3423 +	TBool DoSetVideoCodecL(TMMFMessage& aMessage);
  1.3424 +	TBool DoSetAudioCodecL(TMMFMessage& aMessage);
  1.3425 +	TBool DoAddMetaDataEntryL(TMMFMessage& aMessage);
  1.3426 +	TBool DoRemoveMetaDataEntryL(TMMFMessage& aMessage);
  1.3427 +	TBool DoReplaceMetaDataEntryL(TMMFMessage& aMessage);
  1.3428 +	TBool DoSetMaxFileSizeL(TMMFMessage& aMessage);
  1.3429 +	TBool DoSetAudioEnabledL(TMMFMessage& aMessage);
  1.3430 +	TBool DoSetVideoFrameSizeL(TMMFMessage& aMessage);
  1.3431 +	TBool DoPrepareL(TMMFMessage& aMessage);
  1.3432 +	TBool DoSetCameraHandleL(TMMFMessage& aMessage);
  1.3433 +	TBool DoGetRecordTimeAvailableL(TMMFMessage& aMessage);
  1.3434 +
  1.3435 +	TBool DoGetSupportedSinkAudioTypesL(TMMFMessage& aMessage);
  1.3436 +	TBool DoGetSupportedSinkVideoTypesL(TMMFMessage& aMessage);
  1.3437 +
  1.3438 +	TInt32 DoCreateBufFromCDesC8ArrayL(CDesC8Array& aArray);
  1.3439 +	TBool DoCopyCDesC8ArrayDataL(TMMFMessage& aMessage);
  1.3440 +
  1.3441 +	TBool DoCopyFourCCArrayDataL(TMMFMessage& aMessage);
  1.3442 +	void DoCreateBufFromFourCCArrayL(RArray<TFourCC>& aArray);
  1.3443 +	TBool DoGetAudioEnabledL(TMMFMessage& aMessage); // (INC23777)
  1.3444 +
  1.3445 +private:
  1.3446 +	/** 
  1.3447 +	The object that implements the video record controller interface 
  1.3448 +	*/
  1.3449 +	MMMFVideoRecordControllerCustomCommandImplementor& iImplementor;
  1.3450 +	CBufFlat* iDataCopyBuffer;
  1.3451 +	};
  1.3452 +
  1.3453 +
  1.3454 +
  1.3455 +/**
  1.3456 +@publishedAll
  1.3457 +@released
  1.3458 +
  1.3459 +Client class to allow the client to specify DRM Intent.
  1.3460 +
  1.3461 +The class uses the custom command function of the controller plugin, and removes the necessity
  1.3462 +for the client to formulate the custom commands.
  1.3463 +
  1.3464 +@since  7.0s
  1.3465 +*/
  1.3466 +class RMMFVideoDRMExtCustomCommands : public RMMFCustomCommandsBase
  1.3467 +	{
  1.3468 +public:
  1.3469 +
  1.3470 +	/**
  1.3471 +	Constructor.
  1.3472 +
  1.3473 +	@param  aController
  1.3474 +	        The client side controller object to be used by this custom command interface.
  1.3475 +
  1.3476 +	@since  7.0s
  1.3477 +	*/
  1.3478 +	IMPORT_C RMMFVideoDRMExtCustomCommands(RMMFController& aController);
  1.3479 +
  1.3480 +	/**
  1.3481 +	Gets a frame previously requested from the controller.
  1.3482 +
  1.3483 +	@param  aBitmap
  1.3484 +	        The handle of bitmap to retrieve frame to.
  1.3485 +	@param  aIntent
  1.3486 +	        The DRM Intent to pass in.
  1.3487 +	@param  aStatus
  1.3488 +	        The active object to call back on.
  1.3489 +	*/
  1.3490 +	IMPORT_C void GetFrame(CFbsBitmap& aBitmap, ContentAccess::TIntent aIntent, TRequestStatus& aStatus);
  1.3491 +
  1.3492 +private:
  1.3493 +	TPckgBuf<TMMFVideoConfig> iConfigPackage;
  1.3494 +	TPckgBuf<ContentAccess::TIntent> iIntentPackage;
  1.3495 +	};
  1.3496 +
  1.3497 +
  1.3498 +
  1.3499 +/**
  1.3500 +@publishedAll
  1.3501 +@released
  1.3502 +
  1.3503 +Mixin class to be derived from controller plugins that could support the DRM Intent
  1.3504 +custom commands.
  1.3505 +*/
  1.3506 +class MMMFVideoDRMExtCustomCommandImplementor
  1.3507 +	{
  1.3508 +public:
  1.3509 +
  1.3510 +	/**
  1.3511 +	Gets a frame previously requested from the controller.
  1.3512 +
  1.3513 +	@param  aVideoFrame
  1.3514 +	        The callback interface to allow the caller to retrieve a bitmap.
  1.3515 +	@param  aIntent
  1.3516 +	        The DRM Intent to supply.
  1.3517 +	*/
  1.3518 +	virtual void MvdeGetFrameL(MMMFVideoFrameMessage& aVideoFrame, ContentAccess::TIntent aIntent)=0;
  1.3519 +	};
  1.3520 +
  1.3521 +
  1.3522 +/**
  1.3523 +@publishedAll
  1.3524 +@released
  1.3525 +
  1.3526 +Client class to provide DRM extensions to video controllers.
  1.3527 +
  1.3528 +The class uses the custom command function of the controller plugin, and removes the necessity
  1.3529 +for the client to formulate the custom commands.
  1.3530 +*/
  1.3531 +class CMMFVideoDRMExtCustomCommandParser : public CMMFCustomCommandParserBase
  1.3532 +	{
  1.3533 +public:
  1.3534 +
  1.3535 +	/**
  1.3536 +	Creates a new custom command parser capable of DRM Intent controller commands.
  1.3537 +
  1.3538 +	@param  aImplementor
  1.3539 +	        A reference to the controller plugin that owns this new object.
  1.3540 +
  1.3541 +	@return A pointer to the object created.
  1.3542 +
  1.3543 +	@since  7.0s
  1.3544 +	*/
  1.3545 +	IMPORT_C static CMMFVideoDRMExtCustomCommandParser* NewL(MMMFVideoDRMExtCustomCommandImplementor& aImplementor);
  1.3546 +
  1.3547 +	/**
  1.3548 +	Destructor.
  1.3549 +
  1.3550 +	@since  7.0s
  1.3551 +	*/
  1.3552 +	IMPORT_C ~CMMFVideoDRMExtCustomCommandParser();
  1.3553 +
  1.3554 +	/**
  1.3555 +	Handles a request from the client. Called by the controller framework.
  1.3556 +
  1.3557 +	@param  aMessage
  1.3558 +	        The message to be handled.
  1.3559 +
  1.3560 +	@since  7.0s
  1.3561 +	*/
  1.3562 +	void HandleRequest(TMMFMessage& aMessage);
  1.3563 +
  1.3564 +private:
  1.3565 +	/**
  1.3566 +	Constructor.
  1.3567 +
  1.3568 +	@param  aImplementor
  1.3569 +	        A reference to the controller plugin that owns this new object.
  1.3570 +	@since  7.0s
  1.3571 +	*/
  1.3572 +	CMMFVideoDRMExtCustomCommandParser(MMMFVideoDRMExtCustomCommandImplementor& aImplementor);
  1.3573 +	// Internal request handling methods.
  1.3574 +
  1.3575 +	void DoGetFrameL(TMMFMessage& aMessage);
  1.3576 +
  1.3577 +private:
  1.3578 +	MMMFVideoDRMExtCustomCommandImplementor& iImplementor;
  1.3579 +	CMMFVideoFrameMessage* iVideoFrameMessage;
  1.3580 +	};
  1.3581 +
  1.3582 +/**
  1.3583 +@publishedAll
  1.3584 +@released
  1.3585 +
  1.3586 +Client class to allow the client to register notification .
  1.3587 +
  1.3588 +The class uses the custom command function of the controller plugin, and removes the necessity
  1.3589 +for the client to formulate the custom commands.
  1.3590 +
  1.3591 +@since  7.0s
  1.3592 +*/
  1.3593 +class RMMFResourceNotificationCustomCommands : public RMMFCustomCommandsBase
  1.3594 +	{
  1.3595 +public:
  1.3596 +	/**
  1.3597 +	Constructor.
  1.3598 +
  1.3599 +	@param  aController
  1.3600 +	        The client side controller object to be used by this custom command interface.
  1.3601 +
  1.3602 +	@since  7.0s
  1.3603 +	*/
  1.3604 +	IMPORT_C RMMFResourceNotificationCustomCommands(RMMFController& aController);
  1.3605 +	
  1.3606 +	/**
  1.3607 +	Registers the Event for Notification when resource is avaliable.
  1.3608 +
  1.3609 +	@param aEventType
  1.3610 +		The Event to notify the client.
  1.3611 +		
  1.3612 +	@param aNotificationRegistrationData
  1.3613 +		Notification registration specific data.
  1.3614 +
  1.3615 +	@return An error code indicating if the registration was successful. KErrNone on success, 
  1.3616 +		otherwise another of the system-wide error codes.
  1.3617 +	*/
  1.3618 +	IMPORT_C TInt RegisterAsClient(TUid aEventType,const TDesC8& aNotificationRegistrationData);
  1.3619 +	
  1.3620 +	/**
  1.3621 +	Cancels the registered notification event.
  1.3622 +
  1.3623 +	@param  aEventType
  1.3624 +		The Event to notify the client.
  1.3625 +		
  1.3626 +	@return An error code indicating if the cancel registration was successful. KErrNone on success, 
  1.3627 +		otherwise another of the system-wide error codes.
  1.3628 +	*/
  1.3629 +	IMPORT_C TInt CancelRegisterAsClient(TUid aEventType);
  1.3630 +	
  1.3631 +	/**
  1.3632 +	Gets the notification data for the event.
  1.3633 +	
  1.3634 +	@param  aEventType
  1.3635 +		The Event to notify the client.
  1.3636 +		
  1.3637 +	@param aNotificationData
  1.3638 +		The Notification data for the client to resume the play.
  1.3639 +		
  1.3640 +	@return An error code indicating if the get notification data was successful. KErrNone on success, 
  1.3641 +		otherwise another of the system-wide error codes.
  1.3642 +	*/
  1.3643 +	IMPORT_C TInt GetResourceNotificationData(TUid aEventType,TDes8& aNotificationData);
  1.3644 +	
  1.3645 +	/**
  1.3646 +	Waits for the client to resume the play even after the default timer expires.
  1.3647 +
  1.3648 +	@return An error code indicating if the registration was successful. KErrNone on success, 
  1.3649 +			otherwise any of the system-wide error codes.
  1.3650 +	*/
  1.3651 +	IMPORT_C TInt WillResumePlay();
  1.3652 +	};
  1.3653 +
  1.3654 +/**
  1.3655 +@publishedAll
  1.3656 +@released
  1.3657 +
  1.3658 +Mixin class to be derived from controller plugins that could support the audio resource notification
  1.3659 +custom commands.
  1.3660 +*/
  1.3661 +class MMMFResourceNotificationCustomCommandImplementor
  1.3662 +	{
  1.3663 +public:
  1.3664 +	/**
  1.3665 +	Registers the Event for Notification when resource is available.
  1.3666 +
  1.3667 +	@param aEventType
  1.3668 +		The event which the client is notified of.
  1.3669 +		
  1.3670 +	@param aNotificationRegistrationData
  1.3671 +		Notification registration specific data, which has been reserved for future use.
  1.3672 +		
  1.3673 +	@leave	This method may leave with one of the system-wide error codes.  KErrNotReady if there is no
  1.3674 +			data sink.
  1.3675 +	*/
  1.3676 +	virtual void MarnRegisterAsClientL(TUid aEventType,const TDesC8& aNotificationRegistrationData) = 0;
  1.3677 +	
  1.3678 +	/**
  1.3679 +	Cancels the registered notification event.
  1.3680 +
  1.3681 +	@param  aEventType
  1.3682 +		The event to cancel.
  1.3683 +		
  1.3684 +	@leave This method may leave with one of the system-wide error codes.  KErrNotReady if there is no
  1.3685 +			data sink.
  1.3686 +	*/
  1.3687 +	virtual void MarnCancelRegisterAsClientL(TUid aEventType) = 0;
  1.3688 +	
  1.3689 +	/**
  1.3690 +	Gets the notification data for the event.
  1.3691 +	
  1.3692 +	@param  aEventType
  1.3693 +		The event which the client is notified of.
  1.3694 +		
  1.3695 +	@param aNotificationData
  1.3696 +		The Notification data for the client to resume playing.
  1.3697 +		
  1.3698 +	@leave This method may leave with one of the system-wide error codes.  KErrNotReady if there is no
  1.3699 +			data sink, KErrArgument if unable to provide the notification data.
  1.3700 +	*/
  1.3701 +	virtual void MarnGetResourceNotificationDataL(TUid aEventType,TDes8& aNotificationData) = 0;
  1.3702 +	
  1.3703 +	/**
  1.3704 +	Waits for the client to resume the play even after the default timer expires.
  1.3705 +		
  1.3706 +	@leave This method may leave with one of the system-wide error codes.  KErrNotReady if there is no
  1.3707 +			data sink.
  1.3708 +	*/
  1.3709 +	virtual void MarnWillResumePlayL() = 0;
  1.3710 +	};
  1.3711 +
  1.3712 +/**
  1.3713 +@publishedAll
  1.3714 +@released
  1.3715 +
  1.3716 +Client class to provide Audio resource notification controllers.
  1.3717 +
  1.3718 +The class uses the custom command function of the controller plugin, and removes the necessity
  1.3719 +for the client to formulate the custom commands.
  1.3720 +*/
  1.3721 +class CMMFResourceNotificationCustomCommandParser: public CMMFCustomCommandParserBase
  1.3722 +	{
  1.3723 +public:	
  1.3724 +	/**
  1.3725 +	Creates a new custom command parser capable of handling resource notification controller commands.
  1.3726 +
  1.3727 +	@param  aImplementor
  1.3728 +	        A reference to the controller plugin that owns this new object.
  1.3729 +
  1.3730 +	@return A pointer to the object created.
  1.3731 +
  1.3732 +	@since  7.0s
  1.3733 +	*/
  1.3734 +	IMPORT_C static CMMFResourceNotificationCustomCommandParser* NewL(MMMFResourceNotificationCustomCommandImplementor& aImplementor);
  1.3735 +	
  1.3736 +	/**
  1.3737 +	Destructor.
  1.3738 +
  1.3739 +	@since  7.0s
  1.3740 +	*/
  1.3741 +	IMPORT_C ~CMMFResourceNotificationCustomCommandParser();
  1.3742 +	
  1.3743 +	/**
  1.3744 +	Handles a request from the client. Called by the controller framework.
  1.3745 +
  1.3746 +	@param  aMessage
  1.3747 +	        The message to be handled.
  1.3748 +
  1.3749 +	@since  7.0s
  1.3750 +	*/
  1.3751 +	void HandleRequest(TMMFMessage& aMessage);
  1.3752 +
  1.3753 +private:
  1.3754 +	/**
  1.3755 +	Constructor.
  1.3756 +
  1.3757 +	@param  aImplementor
  1.3758 +	        A reference to the controller plugin that owns this new object.
  1.3759 +
  1.3760 +	@since  7.0s
  1.3761 +	*/
  1.3762 +	CMMFResourceNotificationCustomCommandParser(MMMFResourceNotificationCustomCommandImplementor& aImplementor);
  1.3763 +	void DoHandleRequestL(TMMFMessage& aMessage);
  1.3764 +	// Internal request handling methods.
  1.3765 +	TBool DoRegisterAsClientL(TMMFMessage& aMessage);
  1.3766 +	TBool DoCancelRegisterAsClientL(TMMFMessage& aMessage);
  1.3767 +	TBool DoGetResourceNotificationDataL(TMMFMessage& aMessage);
  1.3768 +	TBool DoWillResumePlayL(TMMFMessage& aMessage);
  1.3769 +private:
  1.3770 +    MMMFResourceNotificationCustomCommandImplementor& iImplementor;
  1.3771 +	};
  1.3772 +
  1.3773 +
  1.3774 +
  1.3775 +#endif