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