|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file tcds_unitBlockController.cpp |
|
18 @internalTechnology |
|
19 */ |
|
20 |
|
21 #include "tcds_kernelBlockController.h" |
|
22 |
|
23 _LIT(KCrashBoardWrapper, "CCrashBoardWrapper"); |
|
24 _LIT(KProcessCrashWrapper, "CProcessCrashWrapper"); |
|
25 _LIT(KCoreDumpMonitorWrapper, "CCoreDumpMonitor"); |
|
26 _LIT(KCoreDumpServerWrapper, "CCoreDumpServer"); |
|
27 _LIT(KSCMConfiguration, "CSCMConfig"); |
|
28 _LIT(KCSelfWrapper, "CSymbianElfWrapper"); |
|
29 |
|
30 /** |
|
31 * @return - Instance of the test block controller |
|
32 */ |
|
33 Ctcds_kernelBlockController* Ctcds_kernelBlockController::NewL() |
|
34 { |
|
35 Ctcds_kernelBlockController* block = new (ELeave) Ctcds_kernelBlockController(); |
|
36 return block; |
|
37 } |
|
38 |
|
39 /** |
|
40 * Called to create test wrapper. The argument is the wrapper to create. This argument comes |
|
41 * from the script file |
|
42 * @param aData Wrapper to create |
|
43 * @return TestWrapper |
|
44 */ |
|
45 CDataWrapper* Ctcds_kernelBlockController::CreateDataL(const TDesC& aData) |
|
46 { |
|
47 CDataWrapper* wrapper = NULL; |
|
48 if (KCrashBoardWrapper() == aData) |
|
49 { |
|
50 wrapper = CCrashBoardWrapper::NewL(); |
|
51 } |
|
52 else if(KProcessCrashWrapper() == aData) |
|
53 { |
|
54 wrapper = CProcessCrashWrapper::NewL(); |
|
55 } |
|
56 else if(KCoreDumpServerWrapper() == aData) |
|
57 { |
|
58 wrapper = CCoreDumpServerWrapper::NewL(); |
|
59 } |
|
60 else if(KCoreDumpMonitorWrapper() == aData) |
|
61 { |
|
62 wrapper = CCoreDumpMonitorWrapper::NewL(); |
|
63 } |
|
64 else if(KSCMConfiguration() == aData) |
|
65 { |
|
66 wrapper = CSCMConfigurationWrapper::NewL(); |
|
67 } |
|
68 else if(KCSelfWrapper() == aData) |
|
69 { |
|
70 wrapper = CSymbianElfWrapper::NewL(); |
|
71 } |
|
72 else |
|
73 { |
|
74 _LIT(KPanic, "%S"); |
|
75 TBuf<128> buf; |
|
76 buf.Format(KPanic, &aData); |
|
77 User::Panic(buf, KErrNotFound); |
|
78 } |
|
79 |
|
80 return wrapper; |
|
81 } |