multimediacommsengine/tsrc/testdriver/siptester/src/TCmdCreateNewConnection.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 "CTcSIPConnectionContainer.h"
       
    19 #include "SIPConstants.h"
       
    20 #include "TCmdCreateNewConnection.h"
       
    21 
       
    22 /**
       
    23  * INPUT:
       
    24  *   Headers:		-
       
    25  *   Parameters:	IAPName
       
    26  *   IDs:			-
       
    27  *
       
    28  * OUTPUT:
       
    29  *   Parameters:	-
       
    30  *   IDs:			ConnectionId
       
    31  */
       
    32 void TCmdCreateNewConnection::ExecuteL()
       
    33 	{
       
    34 	// -- Setup ---------------------------------------------------------------
       
    35 
       
    36 	// Get mandatory IAPName
       
    37 	TPtrC8 name = ExtractTextL( KParamIAPName );
       
    38 
       
    39 	// -- Execution -----------------------------------------------------------
       
    40 
       
    41 	// Create a new connection container (+connection) and store to registry
       
    42 	CTcSIPConnectionContainer* conn =
       
    43 						CTcSIPConnectionContainer::NewL( iContext, name );
       
    44 
       
    45 	// -- Response creation ---------------------------------------------------
       
    46 
       
    47 	AddIdResponseL( KConnectionId, conn );
       
    48 	}
       
    49 
       
    50 TBool TCmdCreateNewConnection::Match( const TTcIdentifier& aId )
       
    51 	{
       
    52 	return TTcSIPCommandBase::Match( aId, _L8("CreateNewConnection") );
       
    53 	}
       
    54 
       
    55 TTcCommandBase* TCmdCreateNewConnection::CreateL( MTcTestContext& aContext )
       
    56 	{
       
    57 	return new( ELeave ) TCmdCreateNewConnection( aContext );
       
    58 	}