os/mm/devsoundextensions/mmfcustominterfaces/WmaDecoderIntfc/WmaDecoderIntfcMsgHdlr/src/WmaDecoderIntfcMsgHdlr.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) 2006 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:   Message handler for WMA 10 Pro decoder custom interface.
sl@0
    15
*
sl@0
    16
*/
sl@0
    17
sl@0
    18
sl@0
    19
sl@0
    20
// INCLUDE FILES
sl@0
    21
#include    "WmaDecoderIntfcMsgs.h"
sl@0
    22
#include    "WmaDecoderIntfcMsgHdlr.h"
sl@0
    23
//#include "WmaDecoderIntfc.h"
sl@0
    24
sl@0
    25
// EXTERNAL DATA STRUCTURES
sl@0
    26
sl@0
    27
// EXTERNAL FUNCTION PROTOTYPES
sl@0
    28
sl@0
    29
// CONSTANTS
sl@0
    30
sl@0
    31
// MACROS
sl@0
    32
sl@0
    33
// LOCAL CONSTANTS AND MACROS
sl@0
    34
sl@0
    35
// MODULE DATA STRUCTURES
sl@0
    36
sl@0
    37
// LOCAL FUNCTION PROTOTYPES
sl@0
    38
sl@0
    39
// FORWARD DECLARATIONS
sl@0
    40
sl@0
    41
// ============================= LOCAL FUNCTIONS ===============================
sl@0
    42
sl@0
    43
// ============================ MEMBER FUNCTIONS ===============================
sl@0
    44
sl@0
    45
//------------------------------------------------------------------------------
sl@0
    46
// CWmaDecoderIntfcMsgHdlr::CWmaDecoderIntfcMsgHdlr
sl@0
    47
// C++ default constructor can NOT contain any code, that might leave.
sl@0
    48
//------------------------------------------------------------------------------
sl@0
    49
CWmaDecoderIntfcMsgHdlr::CWmaDecoderIntfcMsgHdlr(
sl@0
    50
                              CWmaDecoderIntfc* aWmaDecoderConfigCI) :
sl@0
    51
	CMMFObject(KUidWmaDecoderIntfc)
sl@0
    52
    {
sl@0
    53
    iWmaDecoderIntfcCI = aWmaDecoderConfigCI;
sl@0
    54
    }
sl@0
    55
sl@0
    56
//------------------------------------------------------------------------------
sl@0
    57
// CWmaDecoderIntfcMsgHdlr::ConstructL
sl@0
    58
// Symbian 2nd phase constructor can leave.
sl@0
    59
//------------------------------------------------------------------------------
sl@0
    60
void CWmaDecoderIntfcMsgHdlr::ConstructL()
sl@0
    61
    {
sl@0
    62
    }
sl@0
    63
sl@0
    64
//------------------------------------------------------------------------------
sl@0
    65
// WmaDecoderIntfcMsgHdlr::NewL
sl@0
    66
// Two-phased constructor.
sl@0
    67
//------------------------------------------------------------------------------
sl@0
    68
EXPORT_C CWmaDecoderIntfcMsgHdlr* CWmaDecoderIntfcMsgHdlr::NewL(
sl@0
    69
                                       TAny* aWmaDecoderConfigCI)
sl@0
    70
    {
sl@0
    71
    CWmaDecoderIntfc* WmaDecoderConfigCI =
sl@0
    72
                (CWmaDecoderIntfc*)aWmaDecoderConfigCI;
sl@0
    73
    CWmaDecoderIntfcMsgHdlr* self =
sl@0
    74
                new (ELeave) CWmaDecoderIntfcMsgHdlr(WmaDecoderConfigCI);
sl@0
    75
    CleanupStack::PushL( self );
sl@0
    76
    self->ConstructL();
sl@0
    77
    CleanupStack::Pop( self );
sl@0
    78
sl@0
    79
    return self;
sl@0
    80
    }
sl@0
    81
sl@0
    82
//------------------------------------------------------------------------------
sl@0
    83
// Destructor
sl@0
    84
//------------------------------------------------------------------------------
sl@0
    85
EXPORT_C CWmaDecoderIntfcMsgHdlr::~CWmaDecoderIntfcMsgHdlr()
sl@0
    86
	{
sl@0
    87
    iSupportedFormats.Close();
sl@0
    88
    iSupportedTools.Close();
sl@0
    89
    iControllableTools.Close();
sl@0
    90
sl@0
    91
	delete iDataCopyBuffer;
sl@0
    92
	delete iWmaDecoderIntfcCI;
sl@0
    93
	}
sl@0
    94
sl@0
    95
//------------------------------------------------------------------------------
sl@0
    96
// CWmaDecoderIntfcMsgHdlr::HandleRequest
sl@0
    97
// Handles the messages from the proxy.
sl@0
    98
//------------------------------------------------------------------------------ 
sl@0
    99
EXPORT_C void CWmaDecoderIntfcMsgHdlr::HandleRequest(
sl@0
   100
                                            TMMFMessage& aMessage)
sl@0
   101
	{
sl@0
   102
	ASSERT(aMessage.Destination().InterfaceId() == KUidWmaDecoderIntfc);
sl@0
   103
sl@0
   104
	TRAPD(error, DoHandleRequestL(aMessage));
sl@0
   105
sl@0
   106
	if(error)
sl@0
   107
		{
sl@0
   108
		aMessage.Complete(error);
sl@0
   109
		}
sl@0
   110
	}
sl@0
   111
sl@0
   112
//------------------------------------------------------------------------------
sl@0
   113
// CWmaDecoderIntfcMsgHdlr::DoHandleRequestL
sl@0
   114
// Determines which custom interface to call.
sl@0
   115
//------------------------------------------------------------------------------
sl@0
   116
void CWmaDecoderIntfcMsgHdlr::DoHandleRequestL(TMMFMessage& aMessage)
sl@0
   117
	{
sl@0
   118
	switch(aMessage.Function())
sl@0
   119
		{
sl@0
   120
		case EWmaGetSupportedFormats:
sl@0
   121
			{
sl@0
   122
    		DoGetSupportedFormatsL(aMessage);
sl@0
   123
			break;
sl@0
   124
			}
sl@0
   125
		case EWmaGetSupportedTools:
sl@0
   126
			{
sl@0
   127
    		DoGetSupportedToolsL(aMessage);
sl@0
   128
			break;
sl@0
   129
			}
sl@0
   130
		case EWmaGetSupportedMaxChannels:
sl@0
   131
			{
sl@0
   132
    		DoGetSupportedMaxChannelsL(aMessage);
sl@0
   133
			break;
sl@0
   134
			}
sl@0
   135
		case EWmaGetSupportedMaxBitrate:
sl@0
   136
			{
sl@0
   137
    		DoGetSupportedMaxBitrateL(aMessage);
sl@0
   138
			break;
sl@0
   139
			}
sl@0
   140
		case EWmaGetSupportedMaxSampleRate:
sl@0
   141
			{
sl@0
   142
    		DoGetSupportedMaxSampleRateL(aMessage);
sl@0
   143
			break;
sl@0
   144
			}
sl@0
   145
		case EWmaGetControllableTools:
sl@0
   146
			{
sl@0
   147
    		DoGetControllableToolsL(aMessage);
sl@0
   148
			break;
sl@0
   149
			}
sl@0
   150
		case EWmaGetAllMsg:
sl@0
   151
			{
sl@0
   152
    		DoGetAllL(aMessage);
sl@0
   153
			break;
sl@0
   154
			}		
sl@0
   155
		case EWmaApplyConfig:
sl@0
   156
			{
sl@0
   157
    		DoApplyConfigL(aMessage);
sl@0
   158
			break;
sl@0
   159
			}
sl@0
   160
		case EWmaGetNumOfSupportedFormats:
sl@0
   161
 			{
sl@0
   162
    		DoGetNumOfSupportedFormatsL(aMessage);
sl@0
   163
			break;
sl@0
   164
			}
sl@0
   165
   		case EWmaGetNumOfSupportedTools:
sl@0
   166
			{
sl@0
   167
    		DoGetNumOfSupportedToolsL(aMessage);
sl@0
   168
			break;
sl@0
   169
			}		
sl@0
   170
		case EWmaGetNumOfControllableTools:
sl@0
   171
   			{
sl@0
   172
    		DoGetNumOfControllableToolsL(aMessage);
sl@0
   173
			break;
sl@0
   174
			}
sl@0
   175
 
sl@0
   176
		default:
sl@0
   177
			{
sl@0
   178
			aMessage.Complete(KErrNotSupported);
sl@0
   179
			break;
sl@0
   180
			}
sl@0
   181
		}
sl@0
   182
	}
sl@0
   183
sl@0
   184
//------------------------------------------------------------------------------
sl@0
   185
// CWmaDecoderIntfcMsgHdlr::DoGetSupportedFormatsL
sl@0
   186
// Get supported formats.
sl@0
   187
//------------------------------------------------------------------------------
sl@0
   188
void CWmaDecoderIntfcMsgHdlr::DoGetSupportedFormatsL(TMMFMessage& aMessage)
sl@0
   189
	{
sl@0
   190
	if (!iDataCopyBuffer)
sl@0
   191
		{
sl@0
   192
		User::Leave(KErrNotReady);			
sl@0
   193
		}
sl@0
   194
	aMessage.WriteDataToClientL(iDataCopyBuffer->Ptr(0));
sl@0
   195
    aMessage.Complete(KErrNone);
sl@0
   196
    }
sl@0
   197
sl@0
   198
//------------------------------------------------------------------------------
sl@0
   199
// CWmaDecoderIntfcMsgHdlr::DoGetSupportedToolsL
sl@0
   200
// Get supported tools.
sl@0
   201
//------------------------------------------------------------------------------
sl@0
   202
void CWmaDecoderIntfcMsgHdlr::DoGetSupportedToolsL(TMMFMessage& aMessage)
sl@0
   203
	{
sl@0
   204
	if (!iDataCopyBuffer)
sl@0
   205
		{
sl@0
   206
		User::Leave(KErrNotReady);			
sl@0
   207
		}
sl@0
   208
	aMessage.WriteDataToClientL(iDataCopyBuffer->Ptr(0));
sl@0
   209
    aMessage.Complete(KErrNone);
sl@0
   210
	}
sl@0
   211
	
sl@0
   212
//------------------------------------------------------------------------------
sl@0
   213
// CWmaDecoderIntfcMsgHdlr::DoGetSupportedMaxChannelsL
sl@0
   214
// Get max number of channels.
sl@0
   215
//------------------------------------------------------------------------------
sl@0
   216
void CWmaDecoderIntfcMsgHdlr::DoGetSupportedMaxChannelsL(TMMFMessage& aMessage)
sl@0
   217
	{
sl@0
   218
	TUint maxChannels = 0;
sl@0
   219
	TInt status = iWmaDecoderIntfcCI->GetSupportedMaxChannelsIn(maxChannels);
sl@0
   220
sl@0
   221
    TPckgBuf<TUint> pckg;
sl@0
   222
    pckg() = maxChannels;
sl@0
   223
	aMessage.WriteDataToClientL(pckg);
sl@0
   224
    	
sl@0
   225
    aMessage.Complete(status);		
sl@0
   226
	}
sl@0
   227
sl@0
   228
//------------------------------------------------------------------------------
sl@0
   229
// CWmaDecoderIntfcMsgHdlr::DoGetSupportedMaxBitrateL
sl@0
   230
// Get supported max bit rates.
sl@0
   231
//------------------------------------------------------------------------------
sl@0
   232
void CWmaDecoderIntfcMsgHdlr::DoGetSupportedMaxBitrateL(TMMFMessage& aMessage)
sl@0
   233
	{
sl@0
   234
	TUint maxBitrate = 0;
sl@0
   235
	TInt status = iWmaDecoderIntfcCI->GetSupportedMaxBitrate(maxBitrate);
sl@0
   236
sl@0
   237
   	TPckgBuf<TUint> pckg;
sl@0
   238
   	pckg() = maxBitrate;
sl@0
   239
    aMessage.WriteDataToClientL(pckg);
sl@0
   240
   
sl@0
   241
    aMessage.Complete(status);			
sl@0
   242
	}
sl@0
   243
sl@0
   244
//------------------------------------------------------------------------------
sl@0
   245
// CWmaDecoderIntfcMsgHdlr::DoGetSupportedMaxSampleRateL
sl@0
   246
// Get supported max sample rate.
sl@0
   247
//------------------------------------------------------------------------------
sl@0
   248
void CWmaDecoderIntfcMsgHdlr::DoGetSupportedMaxSampleRateL(TMMFMessage& aMessage)
sl@0
   249
	{
sl@0
   250
	TUint maxSamplerate = 0;
sl@0
   251
	TInt status = iWmaDecoderIntfcCI->GetSupportedMaxSampleRate(maxSamplerate);
sl@0
   252
sl@0
   253
    TPckgBuf<TUint> pckg;
sl@0
   254
    pckg() = maxSamplerate;
sl@0
   255
	aMessage.WriteDataToClientL(pckg);
sl@0
   256
    
sl@0
   257
    aMessage.Complete(status);		
sl@0
   258
		
sl@0
   259
	}
sl@0
   260
sl@0
   261
//------------------------------------------------------------------------------
sl@0
   262
// CWmaDecoderIntfcMsgHdlr::DoGetControllableToolsL
sl@0
   263
// Get supported controllable tools.
sl@0
   264
//------------------------------------------------------------------------------
sl@0
   265
void CWmaDecoderIntfcMsgHdlr::DoGetControllableToolsL(TMMFMessage& aMessage)
sl@0
   266
	{
sl@0
   267
	if (!iDataCopyBuffer)
sl@0
   268
		{
sl@0
   269
		User::Leave(KErrNotReady);			
sl@0
   270
		}
sl@0
   271
	aMessage.WriteDataToClientL(iDataCopyBuffer->Ptr(0));
sl@0
   272
    aMessage.Complete(KErrNone);
sl@0
   273
	}
sl@0
   274
sl@0
   275
//------------------------------------------------------------------------------
sl@0
   276
// CWmaDecoderIntfcMsgHdlr::DoGetAllL
sl@0
   277
// Get all configure parameters.
sl@0
   278
//------------------------------------------------------------------------------	
sl@0
   279
void CWmaDecoderIntfcMsgHdlr::DoGetAllL(TMMFMessage& aMessage)
sl@0
   280
	{
sl@0
   281
   	TPckgBuf<TAllParams> pckg;
sl@0
   282
	CWmaDecoderIntfc::TFormat format;
sl@0
   283
	TInt status = iWmaDecoderIntfcCI->GetFormat(format);
sl@0
   284
   	pckg().iCurrentFormat = format;
sl@0
   285
	pckg().iCurrentFormatStatus = status;    	
sl@0
   286
sl@0
   287
    TUint bitsPerSample = 0;
sl@0
   288
    status = iWmaDecoderIntfcCI->GetBitsPerSampleIn(bitsPerSample);    	
sl@0
   289
    pckg().iCurrentBitsPerSample = bitsPerSample;
sl@0
   290
	pckg().iCurrentBitsPerSampleStatus = status;    	
sl@0
   291
sl@0
   292
	TUint numOfChannels = 0;
sl@0
   293
	status = iWmaDecoderIntfcCI->GetNumOfChannelsIn(numOfChannels);
sl@0
   294
   	pckg().iCurrentNumChannelsIn = numOfChannels;
sl@0
   295
	pckg().iCurrentNumChannelsInStatus = status;    	
sl@0
   296
sl@0
   297
	TUint samplesPerSec = 0;
sl@0
   298
	status = iWmaDecoderIntfcCI->GetSamplesPerSec (samplesPerSec);
sl@0
   299
   	pckg().iCurrentSamplesPerSec = samplesPerSec;
sl@0
   300
	pckg().iCurrentSamplesPerSecStatus = status;    	
sl@0
   301
sl@0
   302
    TUint avgBytesPerSec = 0;
sl@0
   303
    status = iWmaDecoderIntfcCI->GetAvgBytesPerSec (avgBytesPerSec);
sl@0
   304
   	pckg().iCurrentAvgBytesPerSec = avgBytesPerSec;
sl@0
   305
	pckg().iCurrentAvgBytesPerSecStatus = status;    	
sl@0
   306
sl@0
   307
	TUint blockAlign = 0;
sl@0
   308
	status = iWmaDecoderIntfcCI->GetBlockAlign (blockAlign) ;
sl@0
   309
   	pckg().iCurrentBlockAlign = blockAlign;
sl@0
   310
	pckg().iCurrentBlockAlignStatus = status;    	
sl@0
   311
sl@0
   312
	TUint encodeOpts = 0;
sl@0
   313
	status = iWmaDecoderIntfcCI->GetEncodeOptions (encodeOpts);
sl@0
   314
   	pckg().iCurrentEncodeOptions = encodeOpts;
sl@0
   315
	pckg().iCurrentEncodeOptionsStatus = status;    	
sl@0
   316
sl@0
   317
	TUint encodeOpts1 = 0;
sl@0
   318
	status = iWmaDecoderIntfcCI->GetEncodeOptions1 (encodeOpts1);
sl@0
   319
   	pckg().iCurrentEncodeOptions1 = encodeOpts1;
sl@0
   320
	pckg().iCurrentEncodeOptions1Status = status;    
sl@0
   321
		
sl@0
   322
	TUint encodeOpts2 = 0;
sl@0
   323
	status = iWmaDecoderIntfcCI->GetEncodeOptions2(encodeOpts2);
sl@0
   324
   	pckg().iCurrentEncodeOptions2 = encodeOpts2;
sl@0
   325
	pckg().iCurrentEncodeOptions2Status = status;    	
sl@0
   326
   	
sl@0
   327
	TUint channelMask = 0;
sl@0
   328
	status = iWmaDecoderIntfcCI->GetChannelMaskIn (channelMask);
sl@0
   329
   	pckg().iCurrentChannelMask = channelMask;
sl@0
   330
	pckg().iCurrentChannelMaskStatus = status;    	
sl@0
   331
   	
sl@0
   332
	CWmaDecoderIntfc::TTool tool = CWmaDecoderIntfc::EToolOutput32Bit;
sl@0
   333
	TBool able = EFalse;
sl@0
   334
	status = iWmaDecoderIntfcCI->GetTool(tool, able);
sl@0
   335
   	pckg().iCurrentToolOutPut32Bit = able;
sl@0
   336
	pckg().iCurrentToolOutPut32BitStatus = status;    	
sl@0
   337
   	
sl@0
   338
	tool = CWmaDecoderIntfc::EDownMixToStereo;
sl@0
   339
	status = iWmaDecoderIntfcCI->GetTool(tool, able);
sl@0
   340
   	pckg().iCurrentToolDownMixToStereo = able;
sl@0
   341
	pckg().iCurrentToolDownMixToStereoStatus = status;    	
sl@0
   342
	   	
sl@0
   343
	tool = CWmaDecoderIntfc::ELostDataConcealment;
sl@0
   344
	status = iWmaDecoderIntfcCI->GetTool(tool, able);
sl@0
   345
   	pckg().iCurrentToolLostDataConcealment = able;
sl@0
   346
	pckg().iCurrentToolLostDataConcealmentStatus = status;    	
sl@0
   347
 
sl@0
   348
    aMessage.WriteDataToClientL(pckg);
sl@0
   349
    
sl@0
   350
    aMessage.Complete(KErrNone);
sl@0
   351
	}
sl@0
   352
sl@0
   353
sl@0
   354
//------------------------------------------------------------------------------
sl@0
   355
// CWmaDecoderIntfcMsgHdlr::DoApplyConfigL
sl@0
   356
// Handles the message from the proxy and calls the custom interface method
sl@0
   357
// to commit configuration settings to the decoder.
sl@0
   358
//------------------------------------------------------------------------------
sl@0
   359
void CWmaDecoderIntfcMsgHdlr::DoApplyConfigL(TMMFMessage& aMessage)
sl@0
   360
    {
sl@0
   361
    TInt status = KErrNone;
sl@0
   362
	TPckgBuf<TWmaDecoderConfig> pckgBuf;
sl@0
   363
	
sl@0
   364
    aMessage.ReadData1FromClientL(pckgBuf);
sl@0
   365
	
sl@0
   366
	iWmaDecoderIntfcCI->SetFormat(pckgBuf().iFormat);
sl@0
   367
	iWmaDecoderIntfcCI->SetBitsPerSampleIn(pckgBuf().iBitsPerSample);
sl@0
   368
	iWmaDecoderIntfcCI->SetNumChannelsIn(pckgBuf().iNumChannelsIn);
sl@0
   369
	iWmaDecoderIntfcCI->SetSamplesPerSec(pckgBuf().iSamplesPerSec);
sl@0
   370
	iWmaDecoderIntfcCI->SetAvgBytesPerSec(pckgBuf().iAvgBytesPerSec);
sl@0
   371
	iWmaDecoderIntfcCI->SetBlockAlign(pckgBuf().iBlockAlign);
sl@0
   372
	iWmaDecoderIntfcCI->SetEncodeOptions(pckgBuf().iEncodeOptions);
sl@0
   373
	iWmaDecoderIntfcCI->SetEncodeOptions1(pckgBuf().iEncodeOptions1);
sl@0
   374
	iWmaDecoderIntfcCI->SetEncodeOptions2(pckgBuf().iEncodeOptions2);				
sl@0
   375
	iWmaDecoderIntfcCI->SetChannelMaskIn(pckgBuf().iChannelMask);
sl@0
   376
sl@0
   377
    TBool able = pckgBuf().iToolOutPut32Bit;
sl@0
   378
    if (able)
sl@0
   379
    	{
sl@0
   380
    	iWmaDecoderIntfcCI->EnableTool(CWmaDecoderIntfc::EToolOutput32Bit);	
sl@0
   381
    	}
sl@0
   382
    else
sl@0
   383
    	{
sl@0
   384
    	iWmaDecoderIntfcCI->DisableTool(CWmaDecoderIntfc::EToolOutput32Bit);	
sl@0
   385
    	}
sl@0
   386
sl@0
   387
    able = pckgBuf().iToolDownMixToStereo;
sl@0
   388
    if (able)
sl@0
   389
    	{
sl@0
   390
    	iWmaDecoderIntfcCI->EnableTool(CWmaDecoderIntfc::EDownMixToStereo);	
sl@0
   391
    	}
sl@0
   392
    else
sl@0
   393
    	{
sl@0
   394
    	iWmaDecoderIntfcCI->DisableTool(CWmaDecoderIntfc::EDownMixToStereo);	
sl@0
   395
    	}
sl@0
   396
sl@0
   397
    able = pckgBuf().iToolLostDataConcealment;
sl@0
   398
    if (able)
sl@0
   399
    	{
sl@0
   400
    	iWmaDecoderIntfcCI->EnableTool(CWmaDecoderIntfc::ELostDataConcealment);	
sl@0
   401
    	}
sl@0
   402
    else
sl@0
   403
    	{
sl@0
   404
    	iWmaDecoderIntfcCI->DisableTool(CWmaDecoderIntfc::ELostDataConcealment);	
sl@0
   405
    	}
sl@0
   406
sl@0
   407
	status = iWmaDecoderIntfcCI->ApplyConfig();
sl@0
   408
    aMessage.Complete(status);
sl@0
   409
    }
sl@0
   410
sl@0
   411
//------------------------------------------------------------------------------
sl@0
   412
// CWmaDecoderIntfcMsgHdlr::CreateBufFromUintArrayL
sl@0
   413
// Utility function used to create a buffer and fill it with data from the
sl@0
   414
// array passed in.
sl@0
   415
//------------------------------------------------------------------------------
sl@0
   416
void CWmaDecoderIntfcMsgHdlr::CreateBufFromUintArrayL(RArray<TUint>& aArray)
sl@0
   417
	{
sl@0
   418
	delete iDataCopyBuffer;
sl@0
   419
	iDataCopyBuffer = NULL;
sl@0
   420
	iDataCopyBuffer = CBufFlat::NewL(8);
sl@0
   421
sl@0
   422
	RBufWriteStream stream;
sl@0
   423
	stream.Open(*iDataCopyBuffer);
sl@0
   424
	CleanupClosePushL(stream);
sl@0
   425
sl@0
   426
	for (TInt i = 0; i < aArray.Count(); i++)
sl@0
   427
	    {	    	    
sl@0
   428
		stream.WriteUint32L(aArray[i]);
sl@0
   429
	    }
sl@0
   430
	    
sl@0
   431
	CleanupStack::PopAndDestroy(&stream);
sl@0
   432
	}	
sl@0
   433
sl@0
   434
// ---------------------------------------------------------
sl@0
   435
// CWmaDecoderIntfcMsgHdlr::DoGetNumOfSupportedFormatsL
sl@0
   436
//
sl@0
   437
// ---------------------------------------------------------
sl@0
   438
//
sl@0
   439
void CWmaDecoderIntfcMsgHdlr::DoGetNumOfSupportedFormatsL(TMMFMessage& aMessage)
sl@0
   440
	{
sl@0
   441
	iSupportedFormats.Reset();
sl@0
   442
	TInt status = iWmaDecoderIntfcCI->GetSupportedFormats(iSupportedFormats);
sl@0
   443
sl@0
   444
	CreateBufFromUintArrayL(reinterpret_cast<RArray<TUint>&>(iSupportedFormats));
sl@0
   445
    TPckgBuf<TUint> pckg;
sl@0
   446
   	pckg() = iSupportedFormats.Count();
sl@0
   447
    aMessage.WriteDataToClientL(pckg);
sl@0
   448
	
sl@0
   449
    aMessage.Complete(status);
sl@0
   450
	}
sl@0
   451
sl@0
   452
// ---------------------------------------------------------
sl@0
   453
// CWmaDecoderIntfcMsgHdlr::DoGetNumOfSupportedToolsL(
sl@0
   454
// ---------------------------------------------------------
sl@0
   455
//
sl@0
   456
void CWmaDecoderIntfcMsgHdlr::DoGetNumOfSupportedToolsL(TMMFMessage& aMessage)
sl@0
   457
	{
sl@0
   458
	iSupportedTools.Reset();
sl@0
   459
	TInt status = iWmaDecoderIntfcCI->GetSupportedTools(iSupportedTools);
sl@0
   460
	CreateBufFromUintArrayL(reinterpret_cast<RArray<TUint>&>(iSupportedTools));
sl@0
   461
sl@0
   462
	TPckgBuf<TUint> pckg;
sl@0
   463
    pckg() = iSupportedTools.Count();
sl@0
   464
	aMessage.WriteDataToClientL(pckg);
sl@0
   465
    aMessage.Complete(status);
sl@0
   466
	}
sl@0
   467
sl@0
   468
// ---------------------------------------------------------
sl@0
   469
// CWmaDecoderIntfcMsgHdlr::DoGetNumOfControllableToolsL
sl@0
   470
// ---------------------------------------------------------
sl@0
   471
//
sl@0
   472
void CWmaDecoderIntfcMsgHdlr::DoGetNumOfControllableToolsL(TMMFMessage& aMessage)
sl@0
   473
	{
sl@0
   474
	iControllableTools.Reset();
sl@0
   475
	TInt status = iWmaDecoderIntfcCI->GetControllableTools(iControllableTools);
sl@0
   476
	CreateBufFromUintArrayL(reinterpret_cast<RArray<TUint>&>(iControllableTools));
sl@0
   477
	TPckgBuf<TUint> pckg;
sl@0
   478
    pckg() = iControllableTools.Count();
sl@0
   479
	aMessage.WriteDataToClientL(pckg); 
sl@0
   480
    aMessage.Complete(status);
sl@0
   481
	}
sl@0
   482
sl@0
   483
sl@0
   484
sl@0
   485
// End of File