|
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 "CTcSIPConnectionContainer.h" |
|
19 #include "CTcSIPContext.h" |
|
20 #include "TCmdGetSecurityMechanisms.h" |
|
21 #include "SIPConstants.h" |
|
22 |
|
23 #include <sip.h> |
|
24 |
|
25 /** |
|
26 * INPUT: |
|
27 * Headers: - |
|
28 * Parameters: - |
|
29 * IDs: - |
|
30 * |
|
31 * OUTPUT: |
|
32 * Parameters: SecurityMechanisms |
|
33 * IDs: - |
|
34 */ |
|
35 void TCmdGetSecurityMechanisms::ExecuteL() |
|
36 { |
|
37 // -- Setup --------------------------------------------------------------- |
|
38 |
|
39 // Get security mechanism name list |
|
40 CDesC8Array* mechanisms = iContext.SIP().SupportedSecurityMechanismsL(); |
|
41 CleanupStack::PushL( mechanisms ); |
|
42 |
|
43 // -- Execution ----------------------------------------------------------- |
|
44 |
|
45 // -- Response creation --------------------------------------------------- |
|
46 |
|
47 AddArrayResponseL( KParamSecurityMechanisms, *mechanisms ); |
|
48 CleanupStack::PopAndDestroy( mechanisms ); |
|
49 } |
|
50 |
|
51 TBool TCmdGetSecurityMechanisms::Match( const TTcIdentifier& aId ) |
|
52 { |
|
53 return TTcSIPCommandBase::Match( aId, _L8("GetSecurityMechanisms") ); |
|
54 } |
|
55 |
|
56 TTcCommandBase* TCmdGetSecurityMechanisms::CreateL( MTcTestContext& aContext ) |
|
57 { |
|
58 return new( ELeave ) TCmdGetSecurityMechanisms( aContext ); |
|
59 } |
|
60 |