os/mm/devsoundextensions/mmextfw/customcommandutility/src/CustomCommandUtility.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description:    Custom command utility implementation
sl@0
    15
*
sl@0
    16
*/
sl@0
    17
sl@0
    18
sl@0
    19
sl@0
    20
#include <mdaaudiosampleplayer.h>
sl@0
    21
#include <mdaaudiosampleeditor.h>
sl@0
    22
#include <midiclientutility.h>
sl@0
    23
#include <DrmAudioSamplePlayer.h>
sl@0
    24
#include <CustomCommandUtility.h>
sl@0
    25
#include <videoplayer.h>
sl@0
    26
#include <videorecorder.h>
sl@0
    27
sl@0
    28
class CConvertCustomCommandUtility : public CCustomCommandUtility
sl@0
    29
	{
sl@0
    30
public:
sl@0
    31
	CConvertCustomCommandUtility(CMdaAudioConvertUtility& aUtility) :
sl@0
    32
		iUtility(aUtility)
sl@0
    33
		{
sl@0
    34
		}
sl@0
    35
sl@0
    36
	virtual TInt CustomCommandSync(const TMMFMessageDestinationPckg&  aDestination,
sl@0
    37
	                                     TInt                         aFunction,
sl@0
    38
	                               const TDesC8&                      aDataTo1,
sl@0
    39
	                               const TDesC8&                      aDataTo2,
sl@0
    40
	                                     TDes8&                       aDataFrom)
sl@0
    41
		{
sl@0
    42
		return iUtility.CustomCommandSync(aDestination, aFunction, aDataTo1, aDataTo2, aDataFrom);
sl@0
    43
		}
sl@0
    44
sl@0
    45
	virtual TInt CustomCommandSync(const TMMFMessageDestinationPckg&  aDestination,
sl@0
    46
	                                     TInt                         aFunction,
sl@0
    47
	                               const TDesC8&                      aDataTo1,
sl@0
    48
	                               const TDesC8&                      aDataTo2)
sl@0
    49
		{
sl@0
    50
		return iUtility.CustomCommandSync(aDestination, aFunction, aDataTo1, aDataTo2);
sl@0
    51
		}
sl@0
    52
sl@0
    53
	virtual void CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination,
sl@0
    54
	                                      TInt                        aFunction,
sl@0
    55
	                                const TDesC8&                     aDataTo1,
sl@0
    56
	                                const TDesC8&                     aDataTo2,
sl@0
    57
	                                      TDes8&                      aDataFrom,
sl@0
    58
	                                      TRequestStatus&             aStatus)
sl@0
    59
		{
sl@0
    60
		iUtility.CustomCommandAsync(aDestination, aFunction, aDataTo1, aDataTo2, aDataFrom, aStatus);
sl@0
    61
		}
sl@0
    62
sl@0
    63
	virtual void CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination,
sl@0
    64
	                                      TInt                        aFunction,
sl@0
    65
	                                const TDesC8&                     aDataTo1,
sl@0
    66
	                                const TDesC8&                     aDataTo2,
sl@0
    67
	                                      TRequestStatus&             aStatus)
sl@0
    68
		{
sl@0
    69
		iUtility.CustomCommandAsync(aDestination, aFunction, aDataTo1, aDataTo2, aStatus);
sl@0
    70
		}
sl@0
    71
sl@0
    72
private:
sl@0
    73
	CMdaAudioConvertUtility& iUtility;
sl@0
    74
sl@0
    75
	};
sl@0
    76
sl@0
    77
class CPlayerCustomCommandUtility : public CCustomCommandUtility
sl@0
    78
	{
sl@0
    79
public:
sl@0
    80
	CPlayerCustomCommandUtility(CMdaAudioPlayerUtility& aUtility) :
sl@0
    81
		iUtility(aUtility)
sl@0
    82
		{
sl@0
    83
		}
sl@0
    84
sl@0
    85
	virtual TInt CustomCommandSync(const TMMFMessageDestinationPckg&  aDestination,
sl@0
    86
	                                     TInt                         aFunction,
sl@0
    87
	                               const TDesC8&                      aDataTo1,
sl@0
    88
	                               const TDesC8&                      aDataTo2,
sl@0
    89
	                                     TDes8&                       aDataFrom)
sl@0
    90
		{
sl@0
    91
		return iUtility.CustomCommandSync(aDestination, aFunction, aDataTo1, aDataTo2, aDataFrom);
sl@0
    92
		}
sl@0
    93
sl@0
    94
	virtual TInt CustomCommandSync(const TMMFMessageDestinationPckg&  aDestination,
sl@0
    95
	                                     TInt                         aFunction,
sl@0
    96
	                               const TDesC8&                      aDataTo1,
sl@0
    97
	                               const TDesC8&                      aDataTo2)
sl@0
    98
		{
sl@0
    99
		return iUtility.CustomCommandSync(aDestination, aFunction, aDataTo1, aDataTo2);
sl@0
   100
		}
sl@0
   101
sl@0
   102
	virtual void CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination,
sl@0
   103
	                                      TInt                        aFunction,
sl@0
   104
	                                const TDesC8&                     aDataTo1,
sl@0
   105
	                                const TDesC8&                     aDataTo2,
sl@0
   106
	                                      TDes8&                      aDataFrom,
sl@0
   107
	                                      TRequestStatus&             aStatus)
sl@0
   108
		{
sl@0
   109
		iUtility.CustomCommandAsync(aDestination, aFunction, aDataTo1, aDataTo2, aDataFrom, aStatus);
sl@0
   110
		}
sl@0
   111
sl@0
   112
	virtual void CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination,
sl@0
   113
	                                      TInt                        aFunction,
sl@0
   114
	                                const TDesC8&                     aDataTo1,
sl@0
   115
	                                const TDesC8&                     aDataTo2,
sl@0
   116
	                                      TRequestStatus&             aStatus)
sl@0
   117
		{
sl@0
   118
		iUtility.CustomCommandAsync(aDestination, aFunction, aDataTo1, aDataTo2, aStatus);
sl@0
   119
		}
sl@0
   120
sl@0
   121
private:
sl@0
   122
	CMdaAudioPlayerUtility& iUtility;
sl@0
   123
sl@0
   124
	};
sl@0
   125
sl@0
   126
class CRecorderCustomCommandUtility : public CCustomCommandUtility
sl@0
   127
	{
sl@0
   128
public:
sl@0
   129
	CRecorderCustomCommandUtility(CMdaAudioRecorderUtility& aUtility) :
sl@0
   130
		iUtility(aUtility)
sl@0
   131
		{
sl@0
   132
		}
sl@0
   133
sl@0
   134
	virtual TInt CustomCommandSync(const TMMFMessageDestinationPckg&  aDestination,
sl@0
   135
	                                     TInt                         aFunction,
sl@0
   136
	                               const TDesC8&                      aDataTo1,
sl@0
   137
	                               const TDesC8&                      aDataTo2,
sl@0
   138
	                                     TDes8&                       aDataFrom)
sl@0
   139
		{
sl@0
   140
		return iUtility.RecordControllerCustomCommandSync(aDestination, aFunction, aDataTo1, aDataTo2, aDataFrom);
sl@0
   141
		}
sl@0
   142
sl@0
   143
	virtual TInt CustomCommandSync(const TMMFMessageDestinationPckg&  aDestination,
sl@0
   144
	                                     TInt                         aFunction,
sl@0
   145
	                               const TDesC8&                      aDataTo1,
sl@0
   146
	                               const TDesC8&                      aDataTo2)
sl@0
   147
		{
sl@0
   148
		return iUtility.RecordControllerCustomCommandSync(aDestination, aFunction, aDataTo1, aDataTo2);
sl@0
   149
		}
sl@0
   150
sl@0
   151
	virtual void CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination,
sl@0
   152
	                                      TInt                        aFunction,
sl@0
   153
	                                const TDesC8&                     aDataTo1,
sl@0
   154
	                                const TDesC8&                     aDataTo2,
sl@0
   155
	                                      TDes8&                      aDataFrom,
sl@0
   156
	                                      TRequestStatus&             aStatus)
sl@0
   157
		{
sl@0
   158
		iUtility.RecordControllerCustomCommandAsync(aDestination, aFunction, aDataTo1, aDataTo2, aDataFrom, aStatus);
sl@0
   159
		}
sl@0
   160
sl@0
   161
	virtual void CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination,
sl@0
   162
	                                      TInt                        aFunction,
sl@0
   163
	                                const TDesC8&                     aDataTo1,
sl@0
   164
	                                const TDesC8&                     aDataTo2,
sl@0
   165
	                                      TRequestStatus&             aStatus)
sl@0
   166
		{
sl@0
   167
		iUtility.RecordControllerCustomCommandAsync(aDestination, aFunction, aDataTo1, aDataTo2, aStatus);
sl@0
   168
		}
sl@0
   169
sl@0
   170
private:
sl@0
   171
	CMdaAudioRecorderUtility& iUtility;
sl@0
   172
sl@0
   173
	};
sl@0
   174
sl@0
   175
class CRecorderPlayCustomCommandUtility : public CCustomCommandUtility
sl@0
   176
	{
sl@0
   177
public:
sl@0
   178
	CRecorderPlayCustomCommandUtility(CMdaAudioRecorderUtility& aUtility) :
sl@0
   179
		iUtility(aUtility)
sl@0
   180
		{
sl@0
   181
		}
sl@0
   182
sl@0
   183
	virtual TInt CustomCommandSync(const TMMFMessageDestinationPckg&  aDestination,
sl@0
   184
	                                     TInt                         aFunction,
sl@0
   185
	                               const TDesC8&                      aDataTo1,
sl@0
   186
	                               const TDesC8&                      aDataTo2,
sl@0
   187
	                                     TDes8&                       aDataFrom)
sl@0
   188
		{
sl@0
   189
		return iUtility.PlayControllerCustomCommandSync(aDestination, aFunction, aDataTo1, aDataTo2, aDataFrom);
sl@0
   190
		}
sl@0
   191
sl@0
   192
	virtual TInt CustomCommandSync(const TMMFMessageDestinationPckg&  aDestination,
sl@0
   193
	                                     TInt                         aFunction,
sl@0
   194
	                               const TDesC8&                      aDataTo1,
sl@0
   195
	                               const TDesC8&                      aDataTo2)
sl@0
   196
		{
sl@0
   197
		return iUtility.PlayControllerCustomCommandSync(aDestination, aFunction, aDataTo1, aDataTo2);
sl@0
   198
		}
sl@0
   199
sl@0
   200
	virtual void CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination,
sl@0
   201
	                                      TInt                        aFunction,
sl@0
   202
	                                const TDesC8&                     aDataTo1,
sl@0
   203
	                                const TDesC8&                     aDataTo2,
sl@0
   204
	                                      TDes8&                      aDataFrom,
sl@0
   205
	                                      TRequestStatus&             aStatus)
sl@0
   206
		{
sl@0
   207
		iUtility.PlayControllerCustomCommandAsync(aDestination, aFunction, aDataTo1, aDataTo2, aDataFrom, aStatus);
sl@0
   208
		}
sl@0
   209
sl@0
   210
	virtual void CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination,
sl@0
   211
	                                      TInt                        aFunction,
sl@0
   212
	                                const TDesC8&                     aDataTo1,
sl@0
   213
	                                const TDesC8&                     aDataTo2,
sl@0
   214
	                                      TRequestStatus&             aStatus)
sl@0
   215
		{
sl@0
   216
		iUtility.PlayControllerCustomCommandAsync(aDestination, aFunction, aDataTo1, aDataTo2, aStatus);
sl@0
   217
		}
sl@0
   218
sl@0
   219
private:
sl@0
   220
	CMdaAudioRecorderUtility& iUtility;
sl@0
   221
sl@0
   222
	};
sl@0
   223
sl@0
   224
class CMidiCustomCommandUtility : public CCustomCommandUtility
sl@0
   225
	{
sl@0
   226
public:
sl@0
   227
	CMidiCustomCommandUtility(CMidiClientUtility& aUtility) :
sl@0
   228
		iUtility(aUtility)
sl@0
   229
		{
sl@0
   230
		}
sl@0
   231
sl@0
   232
	virtual TInt CustomCommandSync(const TMMFMessageDestinationPckg&  aDestination,
sl@0
   233
	                                     TInt                         aFunction,
sl@0
   234
	                               const TDesC8&                      aDataTo1,
sl@0
   235
	                               const TDesC8&                      aDataTo2,
sl@0
   236
	                                     TDes8&                       aDataFrom)
sl@0
   237
		{
sl@0
   238
		iUtility.CustomCommandSyncL(aDestination, aFunction, aDataTo1, aDataTo2, aDataFrom);
sl@0
   239
		return KErrNone;
sl@0
   240
		}
sl@0
   241
sl@0
   242
	virtual TInt CustomCommandSync(const TMMFMessageDestinationPckg&  aDestination,
sl@0
   243
	                                     TInt                         aFunction,
sl@0
   244
	                               const TDesC8&                      aDataTo1,
sl@0
   245
	                               const TDesC8&                      aDataTo2)
sl@0
   246
		{
sl@0
   247
		iUtility.CustomCommandSyncL(aDestination, aFunction, aDataTo1, aDataTo2);
sl@0
   248
		return KErrNone;
sl@0
   249
		}
sl@0
   250
sl@0
   251
	virtual void CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination,
sl@0
   252
	                                      TInt                        aFunction,
sl@0
   253
	                                const TDesC8&                     aDataTo1,
sl@0
   254
	                                const TDesC8&                     aDataTo2,
sl@0
   255
	                                      TDes8&                      aDataFrom,
sl@0
   256
	                                      TRequestStatus&             aStatus)
sl@0
   257
		{
sl@0
   258
		iUtility.CustomCommandAsync(aDestination, aFunction, aDataTo1, aDataTo2, aDataFrom, aStatus);
sl@0
   259
		}
sl@0
   260
sl@0
   261
	virtual void CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination,
sl@0
   262
	                                      TInt                        aFunction,
sl@0
   263
	                                const TDesC8&                     aDataTo1,
sl@0
   264
	                                const TDesC8&                     aDataTo2,
sl@0
   265
	                                      TRequestStatus&             aStatus)
sl@0
   266
		{
sl@0
   267
		iUtility.CustomCommandAsync(aDestination, aFunction, aDataTo1, aDataTo2, aStatus);
sl@0
   268
		}
sl@0
   269
sl@0
   270
private:
sl@0
   271
	CMidiClientUtility& iUtility;
sl@0
   272
	};
sl@0
   273
sl@0
   274
class CDrmCustomCommandUtility : public CCustomCommandUtility
sl@0
   275
	{
sl@0
   276
public:
sl@0
   277
	CDrmCustomCommandUtility(CDrmPlayerUtility& aUtility) :
sl@0
   278
		iUtility(aUtility)
sl@0
   279
		{
sl@0
   280
		}
sl@0
   281
sl@0
   282
    virtual TInt CustomCommandSync(const TMMFMessageDestinationPckg&  aDestination,
sl@0
   283
	                                     TInt                         aFunction,
sl@0
   284
	                               const TDesC8&                      aDataTo1,
sl@0
   285
	                               const TDesC8&                      aDataTo2,
sl@0
   286
	                                     TDes8&                       aDataFrom)
sl@0
   287
		{
sl@0
   288
		iUtility.CustomCommandSync(aDestination, aFunction, aDataTo1, aDataTo2, aDataFrom);
sl@0
   289
		return KErrNone;
sl@0
   290
		}
sl@0
   291
sl@0
   292
	virtual TInt CustomCommandSync(const TMMFMessageDestinationPckg&  aDestination,
sl@0
   293
	                                     TInt                         aFunction,
sl@0
   294
	                               const TDesC8&                      aDataTo1,
sl@0
   295
	                               const TDesC8&                      aDataTo2)
sl@0
   296
		{
sl@0
   297
		iUtility.CustomCommandSync(aDestination, aFunction, aDataTo1, aDataTo2);
sl@0
   298
		return KErrNone;
sl@0
   299
		}
sl@0
   300
sl@0
   301
	virtual void CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination,
sl@0
   302
	                                      TInt                        aFunction,
sl@0
   303
	                                const TDesC8&                     aDataTo1,
sl@0
   304
	                                const TDesC8&                     aDataTo2,
sl@0
   305
	                                      TDes8&                      aDataFrom,
sl@0
   306
	                                      TRequestStatus&             aStatus)
sl@0
   307
		{
sl@0
   308
		iUtility.CustomCommandAsync(aDestination, aFunction, aDataTo1, aDataTo2, aDataFrom, aStatus);
sl@0
   309
		}
sl@0
   310
sl@0
   311
	virtual void CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination,
sl@0
   312
	                                      TInt                        aFunction,
sl@0
   313
	                                const TDesC8&                     aDataTo1,
sl@0
   314
	                                const TDesC8&                     aDataTo2,
sl@0
   315
	                                      TRequestStatus&             aStatus)
sl@0
   316
		{
sl@0
   317
		iUtility.CustomCommandAsync(aDestination, aFunction, aDataTo1, aDataTo2, aStatus);
sl@0
   318
		}
sl@0
   319
sl@0
   320
private:
sl@0
   321
	CDrmPlayerUtility& iUtility;
sl@0
   322
	};
sl@0
   323
sl@0
   324
class CVideoRecorderCustomCommandUtility : public CCustomCommandUtility
sl@0
   325
	{
sl@0
   326
public:
sl@0
   327
	CVideoRecorderCustomCommandUtility(CVideoRecorderUtility& aUtility) :
sl@0
   328
		iUtility(aUtility)
sl@0
   329
		{
sl@0
   330
		}
sl@0
   331
sl@0
   332
    virtual TInt CustomCommandSync(const TMMFMessageDestinationPckg&  aDestination,
sl@0
   333
	                                     TInt                         aFunction,
sl@0
   334
	                               const TDesC8&                      aDataTo1,
sl@0
   335
	                               const TDesC8&                      aDataTo2,
sl@0
   336
	                                     TDes8&                       aDataFrom)
sl@0
   337
		{
sl@0
   338
		iUtility.CustomCommandSync(aDestination, aFunction, aDataTo1, aDataTo2, aDataFrom);
sl@0
   339
		return KErrNone;
sl@0
   340
		}
sl@0
   341
sl@0
   342
	virtual TInt CustomCommandSync(const TMMFMessageDestinationPckg&  aDestination,
sl@0
   343
	                                     TInt                         aFunction,
sl@0
   344
	                               const TDesC8&                      aDataTo1,
sl@0
   345
	                               const TDesC8&                      aDataTo2)
sl@0
   346
		{
sl@0
   347
		iUtility.CustomCommandSync(aDestination, aFunction, aDataTo1, aDataTo2);
sl@0
   348
		return KErrNone;
sl@0
   349
		}
sl@0
   350
sl@0
   351
	virtual void CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination,
sl@0
   352
	                                      TInt                        aFunction,
sl@0
   353
	                                const TDesC8&                     aDataTo1,
sl@0
   354
	                                const TDesC8&                     aDataTo2,
sl@0
   355
	                                      TDes8&                      aDataFrom,
sl@0
   356
	                                      TRequestStatus&             aStatus)
sl@0
   357
		{
sl@0
   358
		iUtility.CustomCommandAsync(aDestination, aFunction, aDataTo1, aDataTo2, aDataFrom, aStatus);
sl@0
   359
		}
sl@0
   360
sl@0
   361
	virtual void CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination,
sl@0
   362
	                                      TInt                        aFunction,
sl@0
   363
	                                const TDesC8&                     aDataTo1,
sl@0
   364
	                                const TDesC8&                     aDataTo2,
sl@0
   365
	                                      TRequestStatus&             aStatus)
sl@0
   366
		{
sl@0
   367
		iUtility.CustomCommandAsync(aDestination, aFunction, aDataTo1, aDataTo2, aStatus);
sl@0
   368
		}
sl@0
   369
sl@0
   370
private:
sl@0
   371
	CVideoRecorderUtility& iUtility;
sl@0
   372
	};
sl@0
   373
sl@0
   374
class CVideoPlayerCustomCommandUtility : public CCustomCommandUtility
sl@0
   375
	{
sl@0
   376
public:
sl@0
   377
	CVideoPlayerCustomCommandUtility(CVideoPlayerUtility& aUtility) :
sl@0
   378
		iUtility(aUtility)
sl@0
   379
		{
sl@0
   380
		}
sl@0
   381
sl@0
   382
    virtual TInt CustomCommandSync(const TMMFMessageDestinationPckg&  aDestination,
sl@0
   383
	                                     TInt                         aFunction,
sl@0
   384
	                               const TDesC8&                      aDataTo1,
sl@0
   385
	                               const TDesC8&                      aDataTo2,
sl@0
   386
	                                     TDes8&                       aDataFrom)
sl@0
   387
		{
sl@0
   388
		iUtility.CustomCommandSync(aDestination, aFunction, aDataTo1, aDataTo2, aDataFrom);
sl@0
   389
		return KErrNone;
sl@0
   390
		}
sl@0
   391
sl@0
   392
	virtual TInt CustomCommandSync(const TMMFMessageDestinationPckg&  aDestination,
sl@0
   393
	                                     TInt                         aFunction,
sl@0
   394
	                               const TDesC8&                      aDataTo1,
sl@0
   395
	                               const TDesC8&                      aDataTo2)
sl@0
   396
		{
sl@0
   397
		iUtility.CustomCommandSync(aDestination, aFunction, aDataTo1, aDataTo2);
sl@0
   398
		return KErrNone;
sl@0
   399
		}
sl@0
   400
sl@0
   401
	virtual void CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination,
sl@0
   402
	                                      TInt                        aFunction,
sl@0
   403
	                                const TDesC8&                     aDataTo1,
sl@0
   404
	                                const TDesC8&                     aDataTo2,
sl@0
   405
	                                      TDes8&                      aDataFrom,
sl@0
   406
	                                      TRequestStatus&             aStatus)
sl@0
   407
		{
sl@0
   408
		iUtility.CustomCommandAsync(aDestination, aFunction, aDataTo1, aDataTo2, aDataFrom, aStatus);
sl@0
   409
		}
sl@0
   410
sl@0
   411
	virtual void CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination,
sl@0
   412
	                                      TInt                        aFunction,
sl@0
   413
	                                const TDesC8&                     aDataTo1,
sl@0
   414
	                                const TDesC8&                     aDataTo2,
sl@0
   415
	                                      TRequestStatus&             aStatus)
sl@0
   416
		{
sl@0
   417
		iUtility.CustomCommandAsync(aDestination, aFunction, aDataTo1, aDataTo2, aStatus);
sl@0
   418
		}
sl@0
   419
sl@0
   420
private:
sl@0
   421
	CVideoPlayerUtility& iUtility;
sl@0
   422
	};
sl@0
   423
sl@0
   424
sl@0
   425
EXPORT_C CCustomCommandUtility* CCustomCommandUtility::NewL(CMdaAudioConvertUtility& aUtility)
sl@0
   426
	{
sl@0
   427
	CCustomCommandUtility* customCommand;
sl@0
   428
sl@0
   429
	customCommand = new(ELeave) CConvertCustomCommandUtility(aUtility);
sl@0
   430
sl@0
   431
	return customCommand;
sl@0
   432
	}
sl@0
   433
sl@0
   434
EXPORT_C CCustomCommandUtility* CCustomCommandUtility::NewL(CMdaAudioPlayerUtility& aUtility)
sl@0
   435
	{
sl@0
   436
	CCustomCommandUtility* customCommand;
sl@0
   437
sl@0
   438
	customCommand = new(ELeave) CPlayerCustomCommandUtility(aUtility);
sl@0
   439
sl@0
   440
	return customCommand;
sl@0
   441
	}
sl@0
   442
sl@0
   443
EXPORT_C CCustomCommandUtility* CCustomCommandUtility::NewL(CMdaAudioRecorderUtility& aUtility,
sl@0
   444
                                                            TBool       aRecordStream)
sl@0
   445
	{
sl@0
   446
	CCustomCommandUtility* customCommand;
sl@0
   447
sl@0
   448
	if( !aRecordStream ) //Playing
sl@0
   449
		{
sl@0
   450
		customCommand = new(ELeave) CRecorderPlayCustomCommandUtility(aUtility);
sl@0
   451
		}
sl@0
   452
	else //Recording
sl@0
   453
		{
sl@0
   454
		customCommand = new(ELeave) CRecorderCustomCommandUtility(aUtility);
sl@0
   455
		}
sl@0
   456
sl@0
   457
	return customCommand;
sl@0
   458
	}
sl@0
   459
sl@0
   460
EXPORT_C CCustomCommandUtility* CCustomCommandUtility::NewL(CMidiClientUtility& aUtility)
sl@0
   461
	{
sl@0
   462
	CCustomCommandUtility* customCommand;
sl@0
   463
sl@0
   464
	customCommand = new(ELeave) CMidiCustomCommandUtility(aUtility);
sl@0
   465
sl@0
   466
	return customCommand;
sl@0
   467
	}
sl@0
   468
sl@0
   469
EXPORT_C CCustomCommandUtility* CCustomCommandUtility::NewL(CDrmPlayerUtility& aUtility)
sl@0
   470
	{
sl@0
   471
	CCustomCommandUtility* customCommand;
sl@0
   472
sl@0
   473
	customCommand = new(ELeave) CDrmCustomCommandUtility(aUtility);
sl@0
   474
sl@0
   475
	return customCommand;
sl@0
   476
	}
sl@0
   477
sl@0
   478
EXPORT_C CCustomCommandUtility* CCustomCommandUtility::NewL(CVideoPlayerUtility& aUtility)
sl@0
   479
	{
sl@0
   480
	CCustomCommandUtility* customCommand;
sl@0
   481
sl@0
   482
	customCommand = new(ELeave) CVideoPlayerCustomCommandUtility(aUtility);
sl@0
   483
sl@0
   484
	return customCommand;
sl@0
   485
	}
sl@0
   486
sl@0
   487
EXPORT_C CCustomCommandUtility* CCustomCommandUtility::NewL(CVideoRecorderUtility& aUtility)
sl@0
   488
	{
sl@0
   489
	CCustomCommandUtility* customCommand;
sl@0
   490
sl@0
   491
	customCommand = new(ELeave) CVideoRecorderCustomCommandUtility(aUtility);
sl@0
   492
sl@0
   493
	return customCommand;
sl@0
   494
	}	
sl@0
   495
// ========================== OTHER EXPORTED FUNCTIONS =========================
sl@0
   496
sl@0
   497
sl@0
   498
sl@0
   499
// End of File