multimediacommsengine/tsrc/MMCTestDriver/MCETester/src/TCmdSendRR.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 "TCmdSendRR.h"
       
    22 #include "CTcMCEContext.h"
       
    23 
       
    24 #include <MceMediaSource.h>
       
    25 #include <MCERTPSource.h>
       
    26 
       
    27 void TCmdSendRR::ExecuteL()
       
    28 	{	
       
    29 	// ---------- Setup --------------------------------------------------------
       
    30 
       
    31 	/*CMceMediaSink* mediaSink = reinterpret_cast<CMceMediaSink*>
       
    32 		(GetObjectForIdL(KSinkId, ETrue));    */
       
    33 	CMceMediaSource* mediaSource = reinterpret_cast<CMceMediaSource*>
       
    34 		(GetObjectForIdL(KSourceId, ETrue));    
       
    35 
       
    36     if ( mediaSource->Type() != KMceRTPSource )
       
    37         {
       
    38         User::Leave( KErrArgument );
       
    39         }
       
    40    
       
    41     CMceRtpSource* rtp = static_cast<CMceRtpSource*>(mediaSource);
       
    42         
       
    43 	// ---------- Execution ----------------------------------------------------
       
    44 
       
    45     rtp->SendRRL();
       
    46 
       
    47 	// ---------- Response creation --------------------------------------------
       
    48  
       
    49     AddIdResponseL( KSinkId, *rtp );
       
    50 
       
    51 	}
       
    52 	
       
    53 TBool TCmdSendRR::Match( const TTcIdentifier& aId )
       
    54 	{
       
    55 	return TTcMceCommandBase::Match( aId, _L8("SendRR") );
       
    56 	}
       
    57 
       
    58 TTcCommandBase* TCmdSendRR::CreateL( MTcTestContext& aContext )
       
    59 	{
       
    60 	return new( ELeave ) TCmdSendRR( aContext );
       
    61 	}