multimediacommsengine/tsrc/testdriver/siptester/src/TCmdSendPrack.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 <sipclienttransaction.h>
       
    19 #include <sipinvitedialogassoc.h>
       
    20 #include <sipmessageelements.h>
       
    21 
       
    22 #include "TCmdSendPrack.h"
       
    23 #include "SIPConstants.h"
       
    24 
       
    25 /**
       
    26  * INPUT:
       
    27  *   Headers:		Contact*, Content-Type*, Content-Encoding*,
       
    28  *   Parameters:	Content*
       
    29  *   IDs:			InviteDialogId
       
    30  *
       
    31  * OUTPUT:
       
    32  *   Parameters:	-
       
    33  *   IDs:			TransactionId
       
    34  */
       
    35 void TCmdSendPrack::ExecuteL()
       
    36 	{
       
    37 	// -- Setup ---------------------------------------------------------------
       
    38 
       
    39 	// Get SIP objects from registry
       
    40 	CSIPInviteDialogAssoc* dialogAssoc = GetInviteDialogAssocL();
       
    41 
       
    42 	// Extract both headers (that are still left) and content.
       
    43 	CSIPMessageElements* elements = ExtractHeadersAndContentLC();
       
    44 
       
    45 	// -- Execution -----------------------------------------------------------
       
    46 
       
    47 	// Start SIP Update transaction.
       
    48 	CSIPClientTransaction* transaction =
       
    49 						dialogAssoc->SendPrackL( elements );
       
    50 	CleanupStack::Pop( elements );
       
    51 
       
    52 	// -- Response creation ---------------------------------------------------
       
    53 
       
    54 	AddIdResponseL( KTransactionId, transaction );
       
    55 	}
       
    56 
       
    57 TBool TCmdSendPrack::Match( const TTcIdentifier& aId )
       
    58 	{
       
    59 	return TTcSIPCommandBase::Match( aId, _L8("SendPrack") );
       
    60 	}
       
    61 
       
    62 TTcCommandBase* TCmdSendPrack::CreateL( MTcTestContext& aContext )
       
    63 	{
       
    64 	return new( ELeave ) TCmdSendPrack( aContext );
       
    65 	}
       
    66