multimediacommsengine/tsrc/testdriver/siptester/src/TCmdCreateInviteDialogAssociation.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 <sipinvitedialogassoc.h>
       
    19 #include <sipservertransaction.h>
       
    20 #include <sipsubscriptionstateheader.h>
       
    21 #include <sipeventheader.h>
       
    22 
       
    23 #include "TCmdCreateInviteDialogAssociation.h"
       
    24 #include "SIPConstants.h"
       
    25 
       
    26 /**
       
    27  * INPUT:
       
    28  *   Headers:		-
       
    29  *   Parameters:	-
       
    30  *   IDs:			ServerTransactionId
       
    31  *
       
    32  * OUTPUT:
       
    33  *   Parameters:	-
       
    34  *   IDs:			InviteDialogId
       
    35  */
       
    36 void TCmdCreateInviteDialogAssociation::ExecuteL()
       
    37 	{
       
    38 	// -- Setup ---------------------------------------------------------------
       
    39 
       
    40 	// Get SIP objects from registry
       
    41 	CSIPServerTransaction* serverTransaction = GetServerTransactionL();
       
    42 
       
    43 	// -- Execution -----------------------------------------------------------
       
    44 
       
    45 	// Create an Invite dialog association
       
    46 	CSIPInviteDialogAssoc* dialogAssoc =
       
    47 					CSIPInviteDialogAssoc::NewLC( *serverTransaction );
       
    48 					
       
    49 	// -- Response creation ---------------------------------------------------
       
    50 
       
    51 	CleanupStack::Pop( 1 ); //dialogAssoc
       
    52 	AddIdResponseL( KInviteDialogId, dialogAssoc );
       
    53 	}
       
    54 
       
    55 TBool TCmdCreateInviteDialogAssociation::Match( const TTcIdentifier& aId )
       
    56 	{
       
    57 	return TTcSIPCommandBase::Match( aId, _L8("CreateInviteDialogAssociation") );
       
    58 	}
       
    59 
       
    60 TTcCommandBase* TCmdCreateInviteDialogAssociation::CreateL( MTcTestContext& aContext )
       
    61 	{
       
    62 	return new( ELeave )TCmdCreateInviteDialogAssociation( aContext );
       
    63 	}
       
    64