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