os/mm/mmlibs/mmfw/inc/mmf/ControllerFramework/mmfstandardcustomcommandsimpl.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
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_IMPL_H
sl@0
    17
#define __MMFSTANDARDCUSTOMCOMMANDS_IMPL_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
/**
sl@0
    29
@publishedPartner
sl@0
    30
@released
sl@0
    31
sl@0
    32
Client class to allow setting the initial screen for video display.
sl@0
    33
sl@0
    34
*/
sl@0
    35
class RMMFVideoSetInitScreenCustomCommands : public RMMFCustomCommandsBase
sl@0
    36
	{
sl@0
    37
public:
sl@0
    38
sl@0
    39
	/**
sl@0
    40
	Constructor.
sl@0
    41
sl@0
    42
	@param  aController
sl@0
    43
	        The client side controller object to be used by this custom command interface.
sl@0
    44
sl@0
    45
	*/
sl@0
    46
	IMPORT_C RMMFVideoSetInitScreenCustomCommands(RMMFController& aController);
sl@0
    47
sl@0
    48
	/**
sl@0
    49
	Sets the initial screen number for the video display on the controller.
sl@0
    50
sl@0
    51
	@param  aScreenNumber
sl@0
    52
	        The screen number
sl@0
    53
	
sl@0
    54
	*/
sl@0
    55
	IMPORT_C TInt SetInitScreenNumber(TInt aScreenNumber);
sl@0
    56
	};
sl@0
    57
sl@0
    58
sl@0
    59
sl@0
    60
/**
sl@0
    61
@publishedPartner
sl@0
    62
@released
sl@0
    63
sl@0
    64
Mixin class to be derived from controller plugins that could support setting the initial screen for displaying video.
sl@0
    65
*/
sl@0
    66
class MMMFVideoSetInitScreenCustomCommandImplementor
sl@0
    67
	{
sl@0
    68
public:
sl@0
    69
sl@0
    70
	/**
sl@0
    71
	Sets the initial screen number.
sl@0
    72
sl@0
    73
	@param  aScreenNumber
sl@0
    74
	        The screen number
sl@0
    75
	*/
sl@0
    76
	virtual void MvsdSetInitScreenNumber(TInt aScreenNumber)=0;
sl@0
    77
	};
sl@0
    78
sl@0
    79
sl@0
    80
/**
sl@0
    81
@publishedPartner
sl@0
    82
@released
sl@0
    83
sl@0
    84
Custom command parser class to be used by controller plugins wishing to support setting the initial screen
sl@0
    85
number for the video display.
sl@0
    86
sl@0
    87
The controller plugin should create an object of this type and add it to the list of custom command parsers 
sl@0
    88
in the controller framework. The controller plugin must be derived from MMMFVideoSetInitScreenCustomCommandImplementor 
sl@0
    89
to use this class. 
sl@0
    90
*/
sl@0
    91
class CMMFVideoSetInitScreenCustomCommandParser : public CMMFCustomCommandParserBase
sl@0
    92
	{
sl@0
    93
public:
sl@0
    94
sl@0
    95
	/**
sl@0
    96
	Creates a new custom command parser that supports setting screen device for video dusplay.
sl@0
    97
sl@0
    98
	@param  aImplementor
sl@0
    99
	        A reference to the controller plugin that owns this new object.
sl@0
   100
sl@0
   101
	@return A pointer to the object created.
sl@0
   102
sl@0
   103
	*/
sl@0
   104
	IMPORT_C static CMMFVideoSetInitScreenCustomCommandParser* NewL(MMMFVideoSetInitScreenCustomCommandImplementor& aImplementor);
sl@0
   105
sl@0
   106
	/**
sl@0
   107
	Destructor.
sl@0
   108
sl@0
   109
	*/
sl@0
   110
	IMPORT_C ~CMMFVideoSetInitScreenCustomCommandParser();
sl@0
   111
sl@0
   112
	/**
sl@0
   113
	Handles a request from the client. Called by the controller framework.
sl@0
   114
sl@0
   115
	@param  aMessage
sl@0
   116
	        The message to be handled.
sl@0
   117
sl@0
   118
	*/
sl@0
   119
	void HandleRequest(TMMFMessage& aMessage);
sl@0
   120
sl@0
   121
private:
sl@0
   122
	/**
sl@0
   123
	Constructor.
sl@0
   124
sl@0
   125
	@param  aImplementor
sl@0
   126
	        A reference to the controller plugin that owns this new object.
sl@0
   127
	*/
sl@0
   128
	CMMFVideoSetInitScreenCustomCommandParser(MMMFVideoSetInitScreenCustomCommandImplementor& aImplementor);
sl@0
   129
	void DoHandleRequestL(TMMFMessage& aMessage);
sl@0
   130
	TBool DoSetInitScreenNumberL(TMMFMessage& aMessage);
sl@0
   131
sl@0
   132
private:
sl@0
   133
	MMMFVideoSetInitScreenCustomCommandImplementor& iImplementor;
sl@0
   134
	};
sl@0
   135
sl@0
   136
sl@0
   137
/**
sl@0
   138
WARNING: For internal use ONLY. Compatibility is not guaranteed in future releases.
sl@0
   139
@internalComponent
sl@0
   140
*/
sl@0
   141
enum TMMFVideoPixelAspectRatioMessages
sl@0
   142
	{
sl@0
   143
	EMMFVideoGetPixelAspectRatio,
sl@0
   144
	EMMFVideoSetPixelAspectRatio,
sl@0
   145
	EMMFVideoGetSupportedPixelAspectRatios,
sl@0
   146
	EMMFVideoPixelAspectRatioCopyArrayData
sl@0
   147
	};
sl@0
   148
sl@0
   149
/**
sl@0
   150
WARNING: For internal use ONLY. Compatibility is not guaranteed in future releases.
sl@0
   151
@internalComponent
sl@0
   152
*/
sl@0
   153
enum TMMFVideoAudioSamplingRateAndChannelConfigMessages
sl@0
   154
	{
sl@0
   155
	EMMFVideoGetAudioChannels,
sl@0
   156
	EMMFVideoSetAudioChannels,
sl@0
   157
	EMMFVideoGetSupportedAudioChannels,
sl@0
   158
	EMMFVideoGetAudioSampleRate,
sl@0
   159
	EMMFVideoSetAudioSampleRate,
sl@0
   160
	EMMFVideoGetSupportedAudioSampleRates,
sl@0
   161
	EMMFVideoAudioSamplingRateAndChannelConfigCopyArrayData
sl@0
   162
	};
sl@0
   163
sl@0
   164
sl@0
   165
/**
sl@0
   166
@publishedPartner
sl@0
   167
@released
sl@0
   168
sl@0
   169
Client class to allow setting and getting the pixel aspect ratio for video recording.
sl@0
   170
sl@0
   171
*/
sl@0
   172
class RMMFVideoPixelAspectRatioCustomCommands : public RMMFCustomCommandsBase
sl@0
   173
	{
sl@0
   174
public:
sl@0
   175
sl@0
   176
	/**
sl@0
   177
	Constructor.
sl@0
   178
sl@0
   179
	@param  aController
sl@0
   180
	        The client side controller object to be used by this custom command interface.
sl@0
   181
sl@0
   182
	*/
sl@0
   183
	IMPORT_C RMMFVideoPixelAspectRatioCustomCommands(RMMFController& aController);
sl@0
   184
sl@0
   185
	/**
sl@0
   186
	Sets the pixel aspect ratio for the video recording on the controller.
sl@0
   187
sl@0
   188
	@param  aAspectRatio
sl@0
   189
	        The new pixel aspect ratio. The default pixel aspect ratio is 1:1.
sl@0
   190
	
sl@0
   191
	@return One of the system-wide error codes.
sl@0
   192
	
sl@0
   193
	*/
sl@0
   194
	IMPORT_C TInt SetPixelAspectRatio(const TVideoAspectRatio& aAspectRatio);
sl@0
   195
	
sl@0
   196
	/**
sl@0
   197
	Gets the current pixel aspect ratio for the video recording on the controller.
sl@0
   198
sl@0
   199
	@param  aAspectRatio
sl@0
   200
	        The current video pixel aspect ratio.
sl@0
   201
sl@0
   202
	@return One of the system-wide error codes.	
sl@0
   203
	*/
sl@0
   204
	IMPORT_C TInt GetPixelAspectRatio(TVideoAspectRatio& aAspectRatio) const;
sl@0
   205
	
sl@0
   206
	/**
sl@0
   207
	Gets the list of supported pixel aspect ratios for the video recording on the controller.
sl@0
   208
sl@0
   209
	@param  aAspectRatios
sl@0
   210
	        The supported pixel aspect ratios.
sl@0
   211
	
sl@0
   212
	@leave	This method may leave with one of the system-wide error codes.
sl@0
   213
	*/
sl@0
   214
	IMPORT_C void GetSupportedPixelAspectRatiosL(RArray<TVideoAspectRatio>& aAspectRatios) const;
sl@0
   215
sl@0
   216
private:
sl@0
   217
	void DoGetVideoPixelAspectRatioArrayL(RArray<TVideoAspectRatio>& aArray, TMMFVideoPixelAspectRatioMessages aIpc) const;
sl@0
   218
	};
sl@0
   219
sl@0
   220
sl@0
   221
/**
sl@0
   222
@publishedPartner
sl@0
   223
@released
sl@0
   224
sl@0
   225
Mixin class to be derived from controller plug-ins that could support setting and getting the pixel aspect ratio for video recording. 
sl@0
   226
*/
sl@0
   227
class MMMFVideoPixelAspectRatioCustomCommandImplementor
sl@0
   228
	{
sl@0
   229
public:
sl@0
   230
sl@0
   231
	/**
sl@0
   232
	Sets the pixel aspect ratio.
sl@0
   233
sl@0
   234
	@param  aAspectRatio
sl@0
   235
	        The pixel aspect ratio to use.
sl@0
   236
	*/
sl@0
   237
	virtual void MvparSetPixelAspectRatioL(const TVideoAspectRatio& aAspectRatio) = 0;
sl@0
   238
sl@0
   239
	/**
sl@0
   240
	Gets the current pixel aspect ratio.
sl@0
   241
sl@0
   242
	@param  aAspectRatio
sl@0
   243
	        The current pixel aspect ratio.
sl@0
   244
	*/
sl@0
   245
	virtual void MvparGetPixelAspectRatioL(TVideoAspectRatio& aAspectRatio) = 0;
sl@0
   246
	
sl@0
   247
	/**
sl@0
   248
	Gets the list of supported pixel aspect ratios.
sl@0
   249
sl@0
   250
	@param  aAspectRatios
sl@0
   251
	        The list of supported pixel aspect ratios.
sl@0
   252
	*/
sl@0
   253
	virtual void MvparGetSupportedPixelAspectRatiosL(RArray<TVideoAspectRatio>& aAspectRatios) = 0;
sl@0
   254
	};
sl@0
   255
sl@0
   256
sl@0
   257
/**
sl@0
   258
@publishedPartner
sl@0
   259
@released
sl@0
   260
sl@0
   261
Custom command parser class to be used by controller plug-ins wishing to support setting and getting the pixel aspect 
sl@0
   262
ratio for the video recording.
sl@0
   263
sl@0
   264
The controller plug-in should create an object of this type and add it to the list of custom command parsers 
sl@0
   265
in the controller framework. The controller plug-in must be derived from MMMFVideoPixelAspectRatioCustomCommandImplementor 
sl@0
   266
to use this class. 
sl@0
   267
*/
sl@0
   268
class CMMFVideoPixelAspectRatioCustomCommandParser : public CMMFCustomCommandParserBase
sl@0
   269
	{
sl@0
   270
public:
sl@0
   271
sl@0
   272
	/**
sl@0
   273
	Creates a new custom command parser that supports setting and getting pixel aspect ratio for video recording.
sl@0
   274
sl@0
   275
	@param  aImplementor
sl@0
   276
	        A reference to the controller plug-in that owns this new object.
sl@0
   277
sl@0
   278
	@return A pointer to the object created.
sl@0
   279
sl@0
   280
	*/
sl@0
   281
	IMPORT_C static CMMFVideoPixelAspectRatioCustomCommandParser* NewL(MMMFVideoPixelAspectRatioCustomCommandImplementor& aImplementor);
sl@0
   282
sl@0
   283
	/**
sl@0
   284
	Destructor.
sl@0
   285
sl@0
   286
	*/
sl@0
   287
	IMPORT_C ~CMMFVideoPixelAspectRatioCustomCommandParser();
sl@0
   288
sl@0
   289
	/**
sl@0
   290
	Handles a request from the client. Called by the controller framework.
sl@0
   291
sl@0
   292
	@param  aMessage
sl@0
   293
	        The message to be handled.
sl@0
   294
sl@0
   295
	*/
sl@0
   296
	void HandleRequest(TMMFMessage& aMessage);
sl@0
   297
sl@0
   298
private:
sl@0
   299
	CMMFVideoPixelAspectRatioCustomCommandParser(MMMFVideoPixelAspectRatioCustomCommandImplementor& aImplementor);
sl@0
   300
	void DoHandleRequestL(TMMFMessage& aMessage);
sl@0
   301
	TBool DoSetPixelAspectRatioL(TMMFMessage& aMessage);
sl@0
   302
	TBool DoGetPixelAspectRatioL(TMMFMessage& aMessage);
sl@0
   303
	TBool DoGetSupportedPixelAspectRatiosL(TMMFMessage& aMessage);
sl@0
   304
	TBool DoCopyArrayDataL(TMMFMessage& aMessage);
sl@0
   305
	void DoCreateBufFromVideoAspectRatioArrayL(RArray<TVideoAspectRatio>& aArray);
sl@0
   306
sl@0
   307
private:
sl@0
   308
	MMMFVideoPixelAspectRatioCustomCommandImplementor& iImplementor;
sl@0
   309
	
sl@0
   310
	CBufFlat* iDataCopyBuffer;
sl@0
   311
	};
sl@0
   312
sl@0
   313
sl@0
   314
/**
sl@0
   315
@publishedPartner
sl@0
   316
@released
sl@0
   317
sl@0
   318
Client class to allow the audio sampling rate and channels configuration for video recording.
sl@0
   319
sl@0
   320
*/
sl@0
   321
class RMMFVideoAudioSamplingRateAndChannelConfigCustomCommands : public RMMFCustomCommandsBase
sl@0
   322
	{
sl@0
   323
public:
sl@0
   324
sl@0
   325
	/**
sl@0
   326
	Constructor.
sl@0
   327
sl@0
   328
	@param  aController
sl@0
   329
	        The client side controller object to be used by this custom command interface.
sl@0
   330
sl@0
   331
	*/
sl@0
   332
	IMPORT_C RMMFVideoAudioSamplingRateAndChannelConfigCustomCommands(RMMFController& aController);
sl@0
   333
sl@0
   334
	/**
sl@0
   335
	Sets the number of audio channels to record (1 for mono, 2 for stereo).
sl@0
   336
sl@0
   337
	@param  aChannels
sl@0
   338
	        The number of audio channels to record.
sl@0
   339
sl@0
   340
	@return One of the system-wide error codes.
sl@0
   341
	
sl@0
   342
	*/
sl@0
   343
	IMPORT_C TInt SetAudioChannels(const TUint aChannels);
sl@0
   344
sl@0
   345
	/**
sl@0
   346
	Gets the current number of audio channels to record (1 for mono, 2 for stereo).
sl@0
   347
sl@0
   348
	@param  aChannels
sl@0
   349
	        The current number of audio channels to record.
sl@0
   350
sl@0
   351
	@return One of the system-wide error codes.
sl@0
   352
	
sl@0
   353
	*/
sl@0
   354
	IMPORT_C TInt GetAudioChannels(TUint& aChannels) const;
sl@0
   355
sl@0
   356
	/**
sl@0
   357
	Gets the list of supported number of audio channels for video recording.
sl@0
   358
sl@0
   359
	@param  aChannels
sl@0
   360
	        The supported numbers of audio channels.
sl@0
   361
	
sl@0
   362
	@leave	This method may leave with one of the system-wide error codes.
sl@0
   363
	*/
sl@0
   364
	IMPORT_C void GetSupportedAudioChannelsL(RArray<TUint>& aChannels) const;
sl@0
   365
	
sl@0
   366
	/**
sl@0
   367
	Sets the audio sample rate for video recording.
sl@0
   368
sl@0
   369
	@param  aSampleRate
sl@0
   370
	        The sample rate for audio recording.
sl@0
   371
sl@0
   372
	@return One of the system-wide error codes.
sl@0
   373
	
sl@0
   374
	*/
sl@0
   375
	IMPORT_C TInt SetAudioSampleRate(const TUint aSampleRate);
sl@0
   376
sl@0
   377
	/**
sl@0
   378
	Gets the current audio sample rate for recording.
sl@0
   379
sl@0
   380
	@param  aSampleRate
sl@0
   381
	        The current audio sample rate for recording.
sl@0
   382
sl@0
   383
	@return One of the system-wide error codes.
sl@0
   384
	
sl@0
   385
	*/
sl@0
   386
	IMPORT_C TInt GetAudioSampleRate(TUint& aSampleRate) const;
sl@0
   387
sl@0
   388
	/**
sl@0
   389
	Gets the list of supported audio sample rates for video recording.
sl@0
   390
sl@0
   391
	@param  aSampleRates
sl@0
   392
	        The supported audio sample rates.
sl@0
   393
	
sl@0
   394
	@leave	This method may leave with one of the system-wide error codes.
sl@0
   395
	*/
sl@0
   396
	IMPORT_C void GetSupportedAudioSampleRatesL(RArray<TUint>& aSampleRates) const;
sl@0
   397
	
sl@0
   398
private:
sl@0
   399
	void DoGetUintArrayL(RArray<TUint>& aArray, TMMFVideoAudioSamplingRateAndChannelConfigMessages aIpc) const;
sl@0
   400
	};
sl@0
   401
sl@0
   402
sl@0
   403
/**
sl@0
   404
@publishedPartner
sl@0
   405
@released
sl@0
   406
sl@0
   407
Mixin class to be derived from controller plug-ins that could support the audio sampling rate and channels configuration. 
sl@0
   408
*/
sl@0
   409
class MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor
sl@0
   410
	{
sl@0
   411
public:
sl@0
   412
sl@0
   413
	/**
sl@0
   414
	Sets the number of audio channels.
sl@0
   415
sl@0
   416
	@param  aChannels
sl@0
   417
	        The number of audio channels to use.
sl@0
   418
	*/
sl@0
   419
	virtual void MvasrccSetAudioChannelsL(const TUint aChannels) = 0;
sl@0
   420
sl@0
   421
	/**
sl@0
   422
	Gets the current number of audio channels.
sl@0
   423
sl@0
   424
	@param  aChannels
sl@0
   425
	        The current number of audio channels.
sl@0
   426
	*/
sl@0
   427
	virtual void MvasrccGetAudioChannelsL(TUint& aChannels) = 0;
sl@0
   428
sl@0
   429
	/**
sl@0
   430
	Gets the list of supported number of audio channels.
sl@0
   431
sl@0
   432
	@param  aChannels
sl@0
   433
	        The list of supported number of audio channels.
sl@0
   434
	*/
sl@0
   435
	virtual void MvasrccGetSupportedAudioChannelsL(RArray<TUint>& aChannels) = 0;
sl@0
   436
	
sl@0
   437
	/**
sl@0
   438
	Sets the audio sample rate.
sl@0
   439
sl@0
   440
	@param  aSampleRate
sl@0
   441
	        The audio sample rate to use.
sl@0
   442
	*/
sl@0
   443
	virtual void MvasrccSetAudioSampleRateL(const TUint aSampleRate) = 0;
sl@0
   444
sl@0
   445
	/**
sl@0
   446
	Gets the current audio sample rate.
sl@0
   447
sl@0
   448
	@param  aSampleRate
sl@0
   449
	        The current audio sample rate.
sl@0
   450
	*/
sl@0
   451
	virtual void MvasrccGetAudioSampleRateL(TUint& aSampleRate) = 0;
sl@0
   452
sl@0
   453
	/**
sl@0
   454
	Gets the list of supported audio sample rates.
sl@0
   455
sl@0
   456
	@param  aSampleRates
sl@0
   457
	        The list of supported audio sample rates.
sl@0
   458
	*/
sl@0
   459
	virtual void MvasrccGetSupportedAudioSampleRatesL(RArray<TUint>& aSampleRates) = 0;
sl@0
   460
	};
sl@0
   461
sl@0
   462
/**
sl@0
   463
@publishedPartner
sl@0
   464
@released
sl@0
   465
sl@0
   466
Custom command parser class to be used by controller plug-ins wishing to support the audio sampling rate and channels
sl@0
   467
configuration for the video recording.
sl@0
   468
sl@0
   469
The controller plug-in should create an object of this type and add it to the list of custom command parsers 
sl@0
   470
in the controller framework. The controller plug-in must be derived from MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor 
sl@0
   471
to use this class. 
sl@0
   472
*/
sl@0
   473
class CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser : public CMMFCustomCommandParserBase
sl@0
   474
	{
sl@0
   475
public:
sl@0
   476
sl@0
   477
	/**
sl@0
   478
	Creates a new custom command parser that supports the audio sampling rate and channels configuration for video recording.
sl@0
   479
sl@0
   480
	@param  aImplementor
sl@0
   481
	        A reference to the controller plug-in that owns this new object.
sl@0
   482
sl@0
   483
	@return A pointer to the object created.
sl@0
   484
sl@0
   485
	*/
sl@0
   486
	IMPORT_C static CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser* NewL(MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor& aImplementor);
sl@0
   487
sl@0
   488
	/**
sl@0
   489
	Destructor.
sl@0
   490
sl@0
   491
	*/
sl@0
   492
	IMPORT_C ~CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser();
sl@0
   493
sl@0
   494
	/**
sl@0
   495
	Handles a request from the client. Called by the controller framework.
sl@0
   496
sl@0
   497
	@param  aMessage
sl@0
   498
	        The message to be handled.
sl@0
   499
sl@0
   500
	*/
sl@0
   501
	void HandleRequest(TMMFMessage& aMessage);
sl@0
   502
sl@0
   503
private:
sl@0
   504
	CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser(MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor& aImplementor);
sl@0
   505
	void DoHandleRequestL(TMMFMessage& aMessage);
sl@0
   506
	TBool DoSetAudioChannelsL(TMMFMessage& aMessage);
sl@0
   507
	TBool DoGetAudioChannelsL(TMMFMessage& aMessage);
sl@0
   508
	TBool DoGetSupportedAudioChannelsL(TMMFMessage& aMessage);
sl@0
   509
	
sl@0
   510
	TBool DoSetAudioSampleRateL(TMMFMessage& aMessage);
sl@0
   511
	TBool DoGetAudioSampleRateL(TMMFMessage& aMessage);
sl@0
   512
	TBool DoGetSupportedAudioSampleRatesL(TMMFMessage& aMessage);
sl@0
   513
	
sl@0
   514
	TBool DoCopyArrayDataL(TMMFMessage& aMessage);
sl@0
   515
	
sl@0
   516
	void DoCreateBufFromUintArrayL(RArray<TUint>& aArray);
sl@0
   517
sl@0
   518
private:
sl@0
   519
	MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor& iImplementor;
sl@0
   520
	
sl@0
   521
	CBufFlat* iDataCopyBuffer;
sl@0
   522
	};
sl@0
   523
sl@0
   524
/**
sl@0
   525
@publishedPartner
sl@0
   526
@released
sl@0
   527
*/
sl@0
   528
const TUid KUidInterfaceMMFVideoPlayExt = {0x10283437};	
sl@0
   529
sl@0
   530
class TVideoPlayRateCapabilities;
sl@0
   531
sl@0
   532
/**
sl@0
   533
Mixin class to be derived from controller plug-ins that could support
sl@0
   534
play velocity, enabling/disabling audio/video, and auto scaling.
sl@0
   535
sl@0
   536
@publishedPartner
sl@0
   537
@released
sl@0
   538
*/	
sl@0
   539
class MMMFVideoPlayControllerExtCustomCommandImplementor
sl@0
   540
	{
sl@0
   541
public:
sl@0
   542
sl@0
   543
	/**
sl@0
   544
	Sets play velocity. 
sl@0
   545
	Behaviour is same as CVideoPlayerUtility::SetPlayVelocityL
sl@0
   546
	
sl@0
   547
	@see CVideoPlayerUtility::SetPlayVelocityL
sl@0
   548
	*/
sl@0
   549
	virtual void MvpecSetPlayVelocityL(TInt aVelocity)=0;
sl@0
   550
	
sl@0
   551
	/**
sl@0
   552
	Gets play velocity.
sl@0
   553
	Behaviour is same as CVideoPlayerUtility::PlayVelocityL	
sl@0
   554
	
sl@0
   555
	@see CVideoPlayerUtility::PlayVelocityL
sl@0
   556
	*/
sl@0
   557
	virtual TInt MvpecPlayVelocityL()=0;
sl@0
   558
	
sl@0
   559
	/**
sl@0
   560
	Steps through frames in pause mode.
sl@0
   561
	Behaviour is same as CVideoPlayerUtility::StepFrameL	
sl@0
   562
		
sl@0
   563
	@see CVideoPlayerUtility::StepFrameL
sl@0
   564
	*/
sl@0
   565
	virtual void MvpecStepFrameL(TInt aStep)=0;
sl@0
   566
	
sl@0
   567
	/**
sl@0
   568
	Gets play rate capabilities.
sl@0
   569
	Behaviour is same as CVideoPlayerUtility::GetPlayRateCapabilitiesL	
sl@0
   570
		
sl@0
   571
	@see CVideoPlayerUtility::GetPlayRateCapabilitiesL
sl@0
   572
	*/
sl@0
   573
	virtual void MvpecGetPlayRateCapabilitiesL(TVideoPlayRateCapabilities& aCapabilities)=0;
sl@0
   574
	
sl@0
   575
	/**
sl@0
   576
	Enables/Disables video playback.
sl@0
   577
	Behaviour is same as CVideoPlayerUtility::SetVideoEnabledL	
sl@0
   578
	
sl@0
   579
	@see CVideoPlayerUtility::SetVideoEnabledL
sl@0
   580
	*/
sl@0
   581
	virtual void MvpecSetVideoEnabledL(TBool aVideoEnabled)=0;
sl@0
   582
	
sl@0
   583
	/**
sl@0
   584
    Queries whether video playback is currently enabled or not.
sl@0
   585
	Behaviour is same as CVideoPlayerUtility::VideoEnabledL	
sl@0
   586
	
sl@0
   587
	@see CVideoPlayerUtility::VideoEnabledL
sl@0
   588
	*/
sl@0
   589
	virtual TBool MvpecVideoEnabledL()=0;
sl@0
   590
	
sl@0
   591
	/**
sl@0
   592
	Enables or disables audio playback.
sl@0
   593
	Behaviour is same as CVideoPlayerUtility::SetAudioEnabled	
sl@0
   594
	
sl@0
   595
	@see CVideoPlayerUtility::SetAudioEnabled
sl@0
   596
	*/
sl@0
   597
	virtual void MvpecSetAudioEnabledL(TBool aAudioEnabled)=0;
sl@0
   598
	
sl@0
   599
	/**
sl@0
   600
	Sets Auto scale mode.
sl@0
   601
	Behaviour is same as CVideoPlayerUtility::SetAutoScaleL	
sl@0
   602
	
sl@0
   603
	@see CVideoPlayerUtility::SetAutoScaleL
sl@0
   604
	*/
sl@0
   605
	virtual void MvpecSetAutoScaleL(TAutoScaleType aScaleType, TInt aHorizPos, TInt aVertPos)=0;
sl@0
   606
	};
sl@0
   607
sl@0
   608
sl@0
   609
sl@0
   610
/**
sl@0
   611
Custom command parser class to be used by controller plug-ins wishing to support play velocity, 
sl@0
   612
enabling/disabling audio/video, and auto scaling.
sl@0
   613
sl@0
   614
The controller plug-in should create an object of this type and add it to the list of custom command parsers 
sl@0
   615
in the controller framework. The controller plug-in must be derived from MMMFVideoPlayControllerExtCustomCommandImplementor 
sl@0
   616
to use this class. 
sl@0
   617
sl@0
   618
@publishedPartner
sl@0
   619
@released
sl@0
   620
*/
sl@0
   621
class CMMFVideoPlayControllerExtCustomCommandParser : public CMMFCustomCommandParserBase
sl@0
   622
	{
sl@0
   623
public:
sl@0
   624
sl@0
   625
	/**
sl@0
   626
	Creates a new custom command parser that supports the video rate control and auto scaling.
sl@0
   627
sl@0
   628
	@param  aImplementor
sl@0
   629
	        A reference to the controller plug-in that owns this new object.
sl@0
   630
sl@0
   631
	@return A pointer to the object created.
sl@0
   632
sl@0
   633
	*/
sl@0
   634
	IMPORT_C static CMMFVideoPlayControllerExtCustomCommandParser* NewL(MMMFVideoPlayControllerExtCustomCommandImplementor& aImplementor);
sl@0
   635
sl@0
   636
	/**
sl@0
   637
	Destructor.
sl@0
   638
sl@0
   639
	*/
sl@0
   640
	IMPORT_C ~CMMFVideoPlayControllerExtCustomCommandParser();
sl@0
   641
sl@0
   642
	/**
sl@0
   643
	Handles a request from the client. Called by the controller framework.
sl@0
   644
sl@0
   645
	@param  aMessage
sl@0
   646
	        The message to be handled.
sl@0
   647
sl@0
   648
	*/
sl@0
   649
	void HandleRequest(TMMFMessage& aMessage);
sl@0
   650
sl@0
   651
private:
sl@0
   652
	CMMFVideoPlayControllerExtCustomCommandParser(MMMFVideoPlayControllerExtCustomCommandImplementor& aImplementor);
sl@0
   653
	void DoHandleRequestL(TMMFMessage& aMessage);
sl@0
   654
	TBool DoSetPlayVelocityL(TMMFMessage& aMessage);
sl@0
   655
	TBool DoPlayVelocityL(TMMFMessage& aMessage);
sl@0
   656
	TBool DoStepFrameL(TMMFMessage& aMessage);
sl@0
   657
	TBool DoGetPlayRateCapabilitiesL(TMMFMessage& aMessage);
sl@0
   658
	TBool DoSetVideoEnabledL(TMMFMessage& aMessage);
sl@0
   659
	TBool DoVideoEnabledL(TMMFMessage& aMessage);
sl@0
   660
	TBool DoSetAudioEnabledL(TMMFMessage& aMessage);
sl@0
   661
	TBool DoSetAutoScaleL(TMMFMessage& aMessage);
sl@0
   662
private:
sl@0
   663
	MMMFVideoPlayControllerExtCustomCommandImplementor& iImplementor;
sl@0
   664
	};
sl@0
   665
sl@0
   666
/**
sl@0
   667
Resource class to be used by player utility for sending custom commands.
sl@0
   668
sl@0
   669
@publishedPartner
sl@0
   670
@released
sl@0
   671
*/	
sl@0
   672
class RMMFVideoPlayControllerExtCustomCommands: public RMMFCustomCommandsBase
sl@0
   673
	{
sl@0
   674
public:
sl@0
   675
	/**
sl@0
   676
	Constructor.
sl@0
   677
sl@0
   678
	@param  aController
sl@0
   679
	        The client side controller object to be used by this custom command interface.
sl@0
   680
	*/
sl@0
   681
	IMPORT_C RMMFVideoPlayControllerExtCustomCommands(RMMFController& aController);
sl@0
   682
	
sl@0
   683
	/**
sl@0
   684
	Sets play velocity.
sl@0
   685
	Behaviour is same as CVideoPlayerUtility::SetPlayVelocityL
sl@0
   686
		
sl@0
   687
	@param  aVelocity 
sl@0
   688
			Velocity of the playback.
sl@0
   689
sl@0
   690
	@return One of the system-wide error codes.	
sl@0
   691
sl@0
   692
	@see CVideoPlayerUtility::SetPlayVelocityL	
sl@0
   693
	*/
sl@0
   694
	IMPORT_C TInt SetPlayVelocity(TInt aVelocity);
sl@0
   695
sl@0
   696
	/**
sl@0
   697
	Gets play velocity.
sl@0
   698
	Behaviour is same as CVideoPlayerUtility::PlayVelocityL	
sl@0
   699
sl@0
   700
	@param  aVelocity 
sl@0
   701
			Velocity of the playback.
sl@0
   702
sl@0
   703
	@return One of the system-wide error codes.	
sl@0
   704
		
sl@0
   705
	@see CVideoPlayerUtility::PlayVelocityL
sl@0
   706
	*/
sl@0
   707
	IMPORT_C TInt PlayVelocity(TInt &aVelocity)const;
sl@0
   708
sl@0
   709
	/**
sl@0
   710
	Steps through frames in pause mode.
sl@0
   711
	Behaviour is same as CVideoPlayerUtility::StepFrameL	
sl@0
   712
sl@0
   713
	@param  aStep 
sl@0
   714
			Count indicating number of frames to step playback position.
sl@0
   715
sl@0
   716
	@return One of the system-wide error codes.
sl@0
   717
sl@0
   718
	@see CVideoPlayerUtility::StepFrameL
sl@0
   719
	*/
sl@0
   720
	IMPORT_C TInt StepFrame(TInt aStep);
sl@0
   721
	
sl@0
   722
	/**
sl@0
   723
	Gets play rate capabilities.
sl@0
   724
	Behaviour is same as CVideoPlayerUtility::GetPlayRateCapabilitiesL	
sl@0
   725
sl@0
   726
    @param aCapabilities Playback rate capabilities
sl@0
   727
sl@0
   728
	@return One of the system-wide error codes.
sl@0
   729
		
sl@0
   730
	@see CVideoPlayerUtility::GetPlayRateCapabilitiesL
sl@0
   731
	*/
sl@0
   732
	IMPORT_C TInt GetPlayRateCapabilities(TVideoPlayRateCapabilities& aCapabilities)const;
sl@0
   733
sl@0
   734
	/**
sl@0
   735
	Enables/Disables video playback.
sl@0
   736
	Behaviour is same as CVideoPlayerUtility::SetVideoEnabledL	
sl@0
   737
    
sl@0
   738
    @param aVideoEnabled ETrue to enable video playback, EFalse to disable
sl@0
   739
sl@0
   740
	@return One of the system-wide error codes.    	
sl@0
   741
sl@0
   742
	@see CVideoPlayerUtility::SetVideoEnabledL
sl@0
   743
	*/
sl@0
   744
	IMPORT_C TInt SetVideoEnabled(TBool aVideoEnabled);
sl@0
   745
	
sl@0
   746
	/**
sl@0
   747
    Queries whether video playback is currently enabled or not.
sl@0
   748
	Behaviour is same as CVideoPlayerUtility::VideoEnabledL
sl@0
   749
sl@0
   750
    @param aVideoEnabled 
sl@0
   751
    	   Out parameter returns ETrue if video playback is enabled, EFalse if not.
sl@0
   752
sl@0
   753
	@return One of the system-wide error codes.
sl@0
   754
	
sl@0
   755
	@see CVideoPlayerUtility::VideoEnabledL
sl@0
   756
	*/
sl@0
   757
	IMPORT_C TInt VideoEnabled(TBool &aVideoEnabled)const;
sl@0
   758
	
sl@0
   759
	/**
sl@0
   760
	Enables or disables audio playback.
sl@0
   761
	Behaviour is same as CVideoPlayerUtility::SetAudioEnabledL
sl@0
   762
sl@0
   763
    @param aVideoEnabled ETrue to enable audio playback, EFalse to disable		
sl@0
   764
sl@0
   765
	@return One of the system-wide error codes.
sl@0
   766
sl@0
   767
	@see CVideoPlayerUtility::SetAudioEnabledL
sl@0
   768
	*/
sl@0
   769
	IMPORT_C TInt SetAudioEnabled(TBool aAudioEnabled);
sl@0
   770
sl@0
   771
	/**
sl@0
   772
	Sets Auto scale mode.
sl@0
   773
 	Behaviour is same as CVideoPlayerUtility::SetAutoScaleL
sl@0
   774
	
sl@0
   775
    @param aScaleType Automatic scaling type
sl@0
   776
    @param aHorizPos Video picture horizontal position, relative to the
sl@0
   777
                     video window.
sl@0
   778
    @param aVertPos Video picture vertical position, relative to the
sl@0
   779
                     video window.
sl@0
   780
	@return One of the system-wide error codes.
sl@0
   781
		
sl@0
   782
	@see CVideoPlayerUtility::SetAutoScaleL
sl@0
   783
	*/
sl@0
   784
	IMPORT_C TInt SetAutoScale(TAutoScaleType aScaleType, TInt aHorizPos, TInt aVertPos);
sl@0
   785
	};
sl@0
   786
sl@0
   787
/**
sl@0
   788
@publishedPartner
sl@0
   789
@released
sl@0
   790
*/
sl@0
   791
const TUid KUidInterfaceMMFVideoRecorderExt = {0x10283438};
sl@0
   792
sl@0
   793
/**
sl@0
   794
Mixin class to be derived from controller plug-ins that could support quality and enabling video. 
sl@0
   795
sl@0
   796
@publishedPartner
sl@0
   797
@released
sl@0
   798
*/	
sl@0
   799
class MMMFVideoRecordControllerExtCustomCommandImplementor
sl@0
   800
	{
sl@0
   801
public:
sl@0
   802
sl@0
   803
	/**
sl@0
   804
	Enabled or disables video in recorder.
sl@0
   805
	Behaviour is same as CVideoRecorderUtility::SetVideoEnabledL	
sl@0
   806
sl@0
   807
	@see CVideoRecorderUtility::SetVideoEnabledL
sl@0
   808
	*/
sl@0
   809
    virtual void MvrecSetVideoEnabledL(TBool aEnabled)=0;
sl@0
   810
	/**
sl@0
   811
	Gets the flag that indicates video enabled or not.
sl@0
   812
	Behaviour is same as CVideoRecorderUtility::VideoEnabledL	
sl@0
   813
sl@0
   814
	@see CVideoRecorderUtility::VideoEnabledL
sl@0
   815
	*/
sl@0
   816
    virtual TBool MvrecVideoEnabledL() const=0;
sl@0
   817
	/**
sl@0
   818
	Sets the quality of video being recorded.
sl@0
   819
	Behaviour is same as CVideoRecorderUtility::SetVideoQualityL	
sl@0
   820
sl@0
   821
	@see CVideoRecorderUtility::SetVideoQualityL
sl@0
   822
	*/
sl@0
   823
    virtual void MvrecSetVideoQualityL(TInt aQuality)=0;
sl@0
   824
	/**
sl@0
   825
	Gets video quality level set using SetVideoQualityL.
sl@0
   826
	Behaviour is same as CVideoRecorderUtility::VideoQualityL	
sl@0
   827
sl@0
   828
	@see CVideoRecorderUtility::VideoQualityL
sl@0
   829
	*/
sl@0
   830
    virtual TInt MvrecVideoQualityL() const=0;
sl@0
   831
	/**
sl@0
   832
	Sets the video framerate to fixed.
sl@0
   833
	Behaviour is same as CVideoRecorderUtility::SetVideoFrameRateFixedL	
sl@0
   834
sl@0
   835
	@see CVideoRecorderUtility::SetVideoFrameRateFixedL
sl@0
   836
	*/
sl@0
   837
    virtual void MvrecSetVideoFrameRateFixedL(TBool aFixedFrameRate)=0;
sl@0
   838
	/**
sl@0
   839
	Gets FrameRateFixed flag set using SetVideoFrameRateFixedL.
sl@0
   840
	Behaviour is same as CVideoRecorderUtility::VideoFrameRateFixedL	
sl@0
   841
sl@0
   842
	@see CVideoRecorderUtility::VideoFrameRateFixedL
sl@0
   843
	*/
sl@0
   844
    virtual TBool MvrecVideoFrameRateFixedL() const=0;
sl@0
   845
	};
sl@0
   846
sl@0
   847
sl@0
   848
sl@0
   849
/**
sl@0
   850
Custom command parser class to be used by controller plug-ins wishing to implement VideoRecorderExt custom commands.
sl@0
   851
sl@0
   852
The controller plug-in should create an object of this type and add it to the list of custom command parsers 
sl@0
   853
in the controller framework. The controller plug-in must be derived from MMMFVideoRecordControllerExtCustomCommandImplementor
sl@0
   854
to use this class.
sl@0
   855
sl@0
   856
@publishedPartner
sl@0
   857
@released
sl@0
   858
*/
sl@0
   859
class CMMFVideoRecordControllerExtCustomCommandParser : public CMMFCustomCommandParserBase
sl@0
   860
	{
sl@0
   861
public:
sl@0
   862
sl@0
   863
	/**
sl@0
   864
	Creates a new custom command parser that supports the video rate control and auto scaling.
sl@0
   865
sl@0
   866
	@param  aImplementor A reference to the controller plug-in that owns this new object.
sl@0
   867
	@return A pointer to the object created.
sl@0
   868
	*/
sl@0
   869
	IMPORT_C static CMMFVideoRecordControllerExtCustomCommandParser* NewL(MMMFVideoRecordControllerExtCustomCommandImplementor& aImplementor);
sl@0
   870
sl@0
   871
	/**
sl@0
   872
	Destructor.
sl@0
   873
	*/
sl@0
   874
	IMPORT_C ~CMMFVideoRecordControllerExtCustomCommandParser();
sl@0
   875
sl@0
   876
	/**
sl@0
   877
	Handles a request from the client. Called by the controller framework.
sl@0
   878
sl@0
   879
	@param  aMessage The message to be handled.
sl@0
   880
	*/
sl@0
   881
	void HandleRequest(TMMFMessage& aMessage);
sl@0
   882
sl@0
   883
private:
sl@0
   884
	CMMFVideoRecordControllerExtCustomCommandParser(MMMFVideoRecordControllerExtCustomCommandImplementor& aImplementor);
sl@0
   885
	void DoHandleRequestL(TMMFMessage& aMessage);
sl@0
   886
	TBool DoSetVideoEnabledL(TMMFMessage& aMessage);
sl@0
   887
	TBool DoVideoEnabledL(TMMFMessage& aMessage);
sl@0
   888
	TBool DoSetVideoQualityL(TMMFMessage& aMessage);
sl@0
   889
	TBool DoVideoQualityL(TMMFMessage& aMessage);
sl@0
   890
	TBool DoSetVideoFrameRateFixedL(TMMFMessage& aMessage);
sl@0
   891
	TBool DoVideoFrameRateFixedL(TMMFMessage& aMessage);
sl@0
   892
private:
sl@0
   893
	MMMFVideoRecordControllerExtCustomCommandImplementor& iImplementor;
sl@0
   894
	};
sl@0
   895
sl@0
   896
/**
sl@0
   897
Resource class to be used by Recorder utility for sending custom commands.
sl@0
   898
sl@0
   899
@publishedPartner
sl@0
   900
@released
sl@0
   901
*/	
sl@0
   902
class RMMFVideoRecordControllerExtCustomCommands: public RMMFCustomCommandsBase
sl@0
   903
	{
sl@0
   904
public:
sl@0
   905
	/**
sl@0
   906
	Constructor.
sl@0
   907
sl@0
   908
	@param  aController
sl@0
   909
	        The client side controller object to be used by this custom command interface.
sl@0
   910
	@return One of the system-wide error codes.
sl@0
   911
	*/
sl@0
   912
	IMPORT_C RMMFVideoRecordControllerExtCustomCommands(RMMFController& aController);
sl@0
   913
	
sl@0
   914
	/**
sl@0
   915
	Enabled or disables video in recorder.
sl@0
   916
	Behaviour is same as CVideoRecorderUtility::SetVideoEnabledL	
sl@0
   917
sl@0
   918
    @param aEnabled ETrue to enable video recording, EFalse to enable it
sl@0
   919
sl@0
   920
	@return One of the system-wide error codes.	
sl@0
   921
	@see CVideoRecorderUtility::SetVideoEnabledL
sl@0
   922
	*/
sl@0
   923
    IMPORT_C TInt SetVideoEnabled(TBool aEnabled);
sl@0
   924
    
sl@0
   925
	/**
sl@0
   926
	Gets the flag that indicates video enabled or not.
sl@0
   927
	Behaviour is same as CVideoRecorderUtility::VideoEnabledL	
sl@0
   928
sl@0
   929
    @param aEnabled 
sl@0
   930
    	   Out parameter returns ETrue if video recording is enabled , EFalse otherwise.
sl@0
   931
sl@0
   932
	@return One of the system-wide error codes.	
sl@0
   933
	@see CVideoRecorderUtility::VideoEnabledL
sl@0
   934
	*/
sl@0
   935
    IMPORT_C TInt VideoEnabled(TBool &aEnabled) const;
sl@0
   936
    
sl@0
   937
	/**
sl@0
   938
	Sets the quality of video being recorded.
sl@0
   939
	Behaviour is same as CVideoRecorderUtility::SetVideoQualityL	
sl@0
   940
sl@0
   941
    @param aQuality Video quality, in the range of 0 to 100, inclusive.
sl@0
   942
sl@0
   943
	@return One of the system-wide error codes.	
sl@0
   944
	@see CVideoRecorderUtility::SetVideoQualityL
sl@0
   945
	*/
sl@0
   946
    IMPORT_C TInt SetVideoQuality(TInt aQuality);
sl@0
   947
    
sl@0
   948
	/**
sl@0
   949
	Gets video quality level set using SetVideoQualityL.
sl@0
   950
	Behaviour is same as CVideoRecorderUtility::VideoQualityL	
sl@0
   951
    
sl@0
   952
    @param aQuality Out parameter returning Video quality in the range 0-100.
sl@0
   953
    
sl@0
   954
    @return One of the system-wide error codes.	
sl@0
   955
	@see CVideoRecorderUtility::VideoQualityL
sl@0
   956
	*/
sl@0
   957
    IMPORT_C TInt VideoQuality(TInt &aQuality) const;
sl@0
   958
    
sl@0
   959
	/**
sl@0
   960
	Sets the video framerate to fixed.
sl@0
   961
	Behaviour is same as CVideoRecorderUtility::SetVideoFrameRateFixedL	
sl@0
   962
	
sl@0
   963
    @param aFixedFrameRate ETrue to request a fixed framerate, EFalse to
sl@0
   964
                          request a variable framerate.
sl@0
   965
sl@0
   966
	@return One of the system-wide error codes.	
sl@0
   967
	@see CVideoRecorderUtility::SetVideoFrameRateFixedL
sl@0
   968
	*/
sl@0
   969
    IMPORT_C TInt SetVideoFrameRateFixed(TBool aFixedFrameRate);
sl@0
   970
    
sl@0
   971
	/**
sl@0
   972
	Gets FrameRateFixed flag set using SetVideoFrameRateFixedL.
sl@0
   973
	Behaviour is same as CVideoRecorderUtility::VideoFrameRateFixedL	
sl@0
   974
sl@0
   975
    @param aFixedFrameRate Out parameter returns ETrue if fixed framerate
sl@0
   976
     						is enabled, EFalse otherwise.
sl@0
   977
    
sl@0
   978
	@return One of the system-wide error codes.	
sl@0
   979
	@see CVideoRecorderUtility::VideoFrameRateFixedL
sl@0
   980
	*/
sl@0
   981
    IMPORT_C TInt VideoFrameRateFixed(TBool &aFixedFrameRate) const;
sl@0
   982
    };
sl@0
   983
sl@0
   984
/**
sl@0
   985
@publishedPartner
sl@0
   986
@released
sl@0
   987
sl@0
   988
Interface UID and messages for the Audio Play Controller Set Repeats API.
sl@0
   989
*/
sl@0
   990
const TUid KUidInterfaceMMFAudioPlaySetRepeatsController = {0x102834D5};
sl@0
   991
sl@0
   992
sl@0
   993
/**
sl@0
   994
@publishedPartner
sl@0
   995
@released
sl@0
   996
sl@0
   997
Client class to access loop play functionality of audio play controller.
sl@0
   998
sl@0
   999
The class uses the custom command function of the controller plugin, and removes the necessity
sl@0
  1000
for the client to formulate the custom commands.
sl@0
  1001
*/
sl@0
  1002
class RMMFAudioPlayControllerSetRepeatsCustomCommands : public RMMFCustomCommandsBase
sl@0
  1003
	{
sl@0
  1004
public:
sl@0
  1005
	
sl@0
  1006
	/**
sl@0
  1007
	Constructor.
sl@0
  1008
sl@0
  1009
	@param  aController
sl@0
  1010
	        The client side controller object to be used by this custom command interface.
sl@0
  1011
	*/
sl@0
  1012
	IMPORT_C RMMFAudioPlayControllerSetRepeatsCustomCommands(RMMFController& aController);
sl@0
  1013
sl@0
  1014
	/**
sl@0
  1015
	Sets the number of times the audio sample to be repeated and the trailing silence period
sl@0
  1016
	
sl@0
  1017
	@param  aRepeatNumberOfTimes
sl@0
  1018
			The number of times the audio sample needs to be repeated
sl@0
  1019
	
sl@0
  1020
	@param  aTrailingSilence
sl@0
  1021
	        The time interval of the trailing silence in microseconds.
sl@0
  1022
	        
sl@0
  1023
	@return KErrNotSupported if the controller plugin does not support the loop play functionality.
sl@0
  1024
	*/
sl@0
  1025
	IMPORT_C TInt SetRepeats(TInt aRepeatNumberOfTimes, const TTimeIntervalMicroSeconds& aTrailingSilence);
sl@0
  1026
	};
sl@0
  1027
sl@0
  1028
/**
sl@0
  1029
@publishedPartner
sl@0
  1030
@released
sl@0
  1031
sl@0
  1032
Mixin class to be derived from by controller plugins that could support the set repeats custom command.
sl@0
  1033
*/
sl@0
  1034
class MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor
sl@0
  1035
	{
sl@0
  1036
public:
sl@0
  1037
sl@0
  1038
	/**
sl@0
  1039
	Sets the number of times the audio sample is to be repeated during the playback operation.	
sl@0
  1040
	A period of silence can follow each playing of the sample. The audio sample can be repeated indefinitely.
sl@0
  1041
	
sl@0
  1042
	@param	aRepeatNumberOfTimes
sl@0
  1043
    		The number of times the audio sample, together with the trailing silence, is to be repeated. 
sl@0
  1044
    		If this is set to KMdaRepeatForever, then the audio sample, together with the trailing silence, 
sl@0
  1045
    		is repeated indefinitely or until Stop() is called. 
sl@0
  1046
    		If this is set to zero, then the audio sample is not repeated.
sl@0
  1047
	
sl@0
  1048
	@param  aTrailingSilence
sl@0
  1049
         	The time interval of the trailing silence in microseconds.
sl@0
  1050
	
sl@0
  1051
	@return	KErrNone if the controller plugin supports the loop play functionality
sl@0
  1052
			KErrNotSupported if the controller plugin does not support the loop play functionality
sl@0
  1053
			KErrNotReady if the controller plugin is not yet added the audio sink
sl@0
  1054
	*/		
sl@0
  1055
	virtual TInt MapcSetRepeats(TInt aRepeatNumberOfTimes, const TTimeIntervalMicroSeconds& aTrailingSilence) = 0;		
sl@0
  1056
	};
sl@0
  1057
sl@0
  1058
/**
sl@0
  1059
@publishedPartner
sl@0
  1060
@released
sl@0
  1061
sl@0
  1062
Custom command parser class to be used by controller plugins wishing to support set repeats functionality
sl@0
  1063
sl@0
  1064
The controller plugin should create an object of this type and add it to the list of custom command parsers 
sl@0
  1065
in the controller framework. The controller plugin must be derived from 
sl@0
  1066
MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor to use this class. 
sl@0
  1067
*/
sl@0
  1068
sl@0
  1069
class CMMFAudioPlayControllerSetRepeatsCustomCommandParser : public CMMFCustomCommandParserBase
sl@0
  1070
	{
sl@0
  1071
public:
sl@0
  1072
sl@0
  1073
	/**
sl@0
  1074
	Creates a new custom command parser capable of handling set repeats controller commands.
sl@0
  1075
sl@0
  1076
	@param  aImplementor
sl@0
  1077
	        A reference to the controller plugin that owns this new object.
sl@0
  1078
sl@0
  1079
	@return A pointer to the object created.
sl@0
  1080
sl@0
  1081
	*/
sl@0
  1082
	IMPORT_C static CMMFAudioPlayControllerSetRepeatsCustomCommandParser* NewL(MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor& aImplementor);
sl@0
  1083
sl@0
  1084
	/**
sl@0
  1085
	Destructor.
sl@0
  1086
sl@0
  1087
	*/
sl@0
  1088
	IMPORT_C ~CMMFAudioPlayControllerSetRepeatsCustomCommandParser();
sl@0
  1089
sl@0
  1090
	/**
sl@0
  1091
	Handles a request from the client. Called by the controller framework.
sl@0
  1092
sl@0
  1093
	@param  aMessage
sl@0
  1094
	        The message to be handled.
sl@0
  1095
sl@0
  1096
	*/
sl@0
  1097
	void HandleRequest(TMMFMessage& aMessage);
sl@0
  1098
private:
sl@0
  1099
sl@0
  1100
	/**
sl@0
  1101
	Constructor.
sl@0
  1102
sl@0
  1103
	@param  aImplementor
sl@0
  1104
	        A reference to the controller plugin that owns this new object.
sl@0
  1105
sl@0
  1106
	*/
sl@0
  1107
	CMMFAudioPlayControllerSetRepeatsCustomCommandParser(MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor& aImplementor);
sl@0
  1108
	// Internal request handling methods.
sl@0
  1109
	void DoHandleRequestL(TMMFMessage& aMessage);
sl@0
  1110
	TBool DoSetRepeatsL(TMMFMessage& aMessage);
sl@0
  1111
private:
sl@0
  1112
	/** 
sl@0
  1113
	The object that implements the set repeats custom command i.e controller plugin
sl@0
  1114
	*/
sl@0
  1115
	MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor& iImplementor;
sl@0
  1116
	};
sl@0
  1117
sl@0
  1118
#endif