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