|
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 <sipinternalstates.h> |
|
19 |
|
20 #include "TCmdGetSigCompCompartmentCount.h" |
|
21 #include "SIPConstants.h" |
|
22 |
|
23 /** |
|
24 * INPUT: |
|
25 * Headers: - |
|
26 * Parameters: - |
|
27 * IDs: - |
|
28 * |
|
29 * OUTPUT: |
|
30 * Parameters: - |
|
31 * IDs: CompartmentCount |
|
32 */ |
|
33 void TCmdGetSigCompCompartmentCount::ExecuteL() |
|
34 { |
|
35 // -- Setup --------------------------------------------------------------- |
|
36 |
|
37 // -- Execution ----------------------------------------------------------- |
|
38 |
|
39 // Get SigComp compartment count |
|
40 CSIPInternalStates* internalStates = CSIPInternalStates::NewLC(); |
|
41 TInt count = internalStates->SigCompCompartmentCount(); |
|
42 CleanupStack::PopAndDestroy(); // internalStates |
|
43 |
|
44 // -- Response creation --------------------------------------------------- |
|
45 |
|
46 AddIntegerResponseL( KParamCompartmentCount, count ); |
|
47 } |
|
48 |
|
49 TBool TCmdGetSigCompCompartmentCount::Match( const TTcIdentifier& aId ) |
|
50 { |
|
51 return TTcSIPCommandBase::Match( aId, _L8("GetSigCompCompartmentCount") ); |
|
52 } |
|
53 |
|
54 TTcCommandBase* TCmdGetSigCompCompartmentCount::CreateL( MTcTestContext& aContext ) |
|
55 { |
|
56 return new( ELeave ) TCmdGetSigCompCompartmentCount( aContext ); |
|
57 } |