|
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 <sipregistrationbinding.h> |
|
19 #include <siprouteheader.h> |
|
20 |
|
21 #include "TCmdSetOutboundProxy.h" |
|
22 #include "SIPConstants.h" |
|
23 |
|
24 /** |
|
25 * INPUT: |
|
26 * Headers: - |
|
27 * Parameters: Proxy* |
|
28 * IDs: RegistrationId |
|
29 * |
|
30 * OUTPUT: |
|
31 * Parameters: - |
|
32 * IDs: - |
|
33 */ |
|
34 void TCmdSetOutboundProxy::ExecuteL() |
|
35 { |
|
36 // -- Setup --------------------------------------------------------------- |
|
37 |
|
38 // Get SIP objects from registry |
|
39 CSIPRegistrationBinding* registration = GetRegistrationL(); |
|
40 |
|
41 // Conditionally create proxy |
|
42 CSIPRouteHeader* proxy = ExtractProxyLC(); |
|
43 |
|
44 // -- Execution ----------------------------------------------------------- |
|
45 |
|
46 registration->SetOutboundProxyL( proxy ); |
|
47 if( proxy ) |
|
48 { |
|
49 CleanupStack::Pop(); |
|
50 } |
|
51 |
|
52 // -- Response creation --------------------------------------------------- |
|
53 } |
|
54 |
|
55 TBool TCmdSetOutboundProxy::Match( const TTcIdentifier& aId ) |
|
56 { |
|
57 return TTcSIPCommandBase::Match( aId, _L8("SetOutboundProxy") ); |
|
58 } |
|
59 |
|
60 TTcCommandBase* TCmdSetOutboundProxy::CreateL( MTcTestContext& aContext ) |
|
61 { |
|
62 return new( ELeave ) TCmdSetOutboundProxy( aContext ); |
|
63 } |
|
64 |