|
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 "SIPConstants.h" |
|
19 #include "TCmdTest.h" |
|
20 |
|
21 /** |
|
22 * INPUT: |
|
23 * Headers: - |
|
24 * Parameters: TestPanic*, TestHang* |
|
25 * IDs: - |
|
26 * |
|
27 * OUTPUT: |
|
28 * Parameters: - |
|
29 * IDs: - |
|
30 */ |
|
31 void TCmdTest::ExecuteL() |
|
32 { |
|
33 // -- Setup --------------------------------------------------------------- |
|
34 |
|
35 // Get optional TestPanic |
|
36 TPtrC8 wantPanic = ExtractTextL( KParamTestPanic, EFalse ); |
|
37 |
|
38 // Get optional TestHang |
|
39 TPtrC8 wantHang = ExtractTextL( KParamTestHang, EFalse ); |
|
40 |
|
41 // -- Execution ----------------------------------------------------------- |
|
42 |
|
43 if( wantPanic != KNullDesC8 ) |
|
44 { |
|
45 User::Panic( _L("TCmdTest"), 2004 ); |
|
46 } |
|
47 |
|
48 if( wantHang != KNullDesC8 ) |
|
49 { |
|
50 User::After( 100000000 ); |
|
51 } |
|
52 |
|
53 // -- Response creation --------------------------------------------------- |
|
54 } |
|
55 |
|
56 TBool TCmdTest::Match( const TTcIdentifier& aId ) |
|
57 { |
|
58 return TTcSIPCommandBase::Match( aId, _L8("Test") ); |
|
59 } |
|
60 |
|
61 TTcCommandBase* TCmdTest::CreateL( MTcTestContext& aContext ) |
|
62 { |
|
63 return new( ELeave ) TCmdTest( aContext ); |
|
64 } |