multimediacommsengine/tsrc/testdriver/siptester/src/TCmdGetDialogRemoteURI.cpp
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2004 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 #include <sipdialogassocbase.h>
       
    19 #include <sipdialog.h>
       
    20 #include <uri8.h>
       
    21 
       
    22 #include "TCmdGetDialogRemoteURI.h"
       
    23 #include "SIPConstants.h"
       
    24 
       
    25 /**
       
    26  * INPUT:
       
    27  *   Headers:		-
       
    28  *   Parameters:	-
       
    29  *   IDs:			InviteDialogId*, SubscribeDialogId*
       
    30  *
       
    31  * OUTPUT:
       
    32  *   Parameters:	-
       
    33  *   IDs:			RemoteURI*
       
    34  */
       
    35 
       
    36 void TCmdGetDialogRemoteURI::ExecuteL()
       
    37 	{
       
    38 	// -- Setup ---------------------------------------------------------------
       
    39 
       
    40 	// Get SIP objects from registry
       
    41 	CSIPDialogAssocBase* dialogAssoc = GetAnyDialogAssocL();
       
    42 
       
    43 	// -- Execution -----------------------------------------------------------
       
    44 
       
    45 	// Get dialog remote URI, if present
       
    46 	const CUri8* remoteUri = &dialogAssoc->Dialog().RemoteURI();
       
    47 
       
    48 
       
    49 	// -- Response creation ---------------------------------------------------
       
    50 
       
    51 	AddTextResponseL( KParamRemoteURI, remoteUri->Uri().UriDes() );
       
    52 
       
    53 	}
       
    54 
       
    55 TBool TCmdGetDialogRemoteURI::Match( const TTcIdentifier& aId )
       
    56 	{
       
    57 	return TTcSIPCommandBase::Match( aId, _L8("GetDialogRemoteURI") );
       
    58 	}
       
    59 
       
    60 TTcCommandBase* TCmdGetDialogRemoteURI::CreateL( MTcTestContext& aContext )
       
    61 	{
       
    62 	return new( ELeave ) TCmdGetDialogRemoteURI( aContext );
       
    63 	}