multimediacommsengine/tsrc/MMCTestDriver/MCETester/src/TCmdGetReceiverReport.cpp
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:    Implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include "MCEConstants.h"
       
    21 #include "TCmdGetReceiverReport.h"
       
    22 #include "CTcMCEContext.h"
       
    23 #include <MceMediaStream.h>
       
    24 #include <MceRtpSource.h>
       
    25 
       
    26 
       
    27 void TCmdGetReceiverReport::ExecuteL()
       
    28 	{	
       
    29 	// ---------- Setup --------------------------------------------------------
       
    30 
       
    31 
       
    32 	// ---------- Execution ----------------------------------------------------
       
    33 	
       
    34 	// Get an item off the receive queue (waits until timeout if none is present)
       
    35 	TInt timeout = ExtractIntegerL( KParamTimeout, KDefaultReceiveTimeout, 
       
    36 									EFalse );
       
    37 	CTcMCEReceived& item = iContext.ReceivedRTPItemL( timeout );	
       
    38 
       
    39  	if (!item.MediaStream() || !item.RtpSource())
       
    40  		{
       
    41  		User::Leave( KErrNotFound );
       
    42  		}
       
    43 	// ---------- Response creation --------------------------------------------
       
    44  
       
    45 
       
    46  	AddIdResponseL( KStreamId, *(item.MediaStream()) );
       
    47 	AddIdResponseL( KSourceId, *(item.RtpSource()) );
       
    48 	
       
    49 	}
       
    50 	
       
    51 TBool TCmdGetReceiverReport::Match( const TTcIdentifier& aId )
       
    52 	{
       
    53 	return TTcMceCommandBase::Match( aId, _L8("GetReceiverReport") );
       
    54 	}
       
    55 
       
    56 TTcCommandBase* TCmdGetReceiverReport::CreateL( MTcTestContext& aContext )
       
    57 	{
       
    58 	return new( ELeave ) TCmdGetReceiverReport( aContext );
       
    59 	}