|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <memspy/engine/memspyenginehelperrom.h> |
|
19 |
|
20 // User includes |
|
21 #include <memspy/engine/memspyengine.h> |
|
22 #include <memspy/engine/memspyengineutils.h> |
|
23 #include <memspy/engine/memspyengineoutputlist.h> |
|
24 #include "MemSpyEngineOutputListItem.h" |
|
25 #include <memspy/engine/memspyengineoutputsink.h> |
|
26 |
|
27 |
|
28 CMemSpyEngineHelperROM::CMemSpyEngineHelperROM( CMemSpyEngine& aEngine ) |
|
29 : iEngine( aEngine ) |
|
30 { |
|
31 } |
|
32 |
|
33 |
|
34 CMemSpyEngineHelperROM::~CMemSpyEngineHelperROM() |
|
35 { |
|
36 delete iPlatformVersion; |
|
37 delete iChecksum; |
|
38 } |
|
39 |
|
40 |
|
41 void CMemSpyEngineHelperROM::ConstructL() |
|
42 { |
|
43 iPlatformVersion = HBufC::NewL( 128 ); |
|
44 iChecksum = HBufC::NewL( 10 ); |
|
45 // |
|
46 TPtr pChecksum( iChecksum->Des() ); |
|
47 TPtr pPlatformVersion( iPlatformVersion->Des() ); |
|
48 // |
|
49 MemSpyEngineUtils::GetRomInfoL( pPlatformVersion, pChecksum ); |
|
50 } |
|
51 |
|
52 |
|
53 CMemSpyEngineHelperROM* CMemSpyEngineHelperROM::NewL( CMemSpyEngine& aEngine ) |
|
54 { |
|
55 CMemSpyEngineHelperROM* self = new(ELeave) CMemSpyEngineHelperROM( aEngine ); |
|
56 CleanupStack::PushL( self ); |
|
57 self->ConstructL(); |
|
58 CleanupStack::Pop( self ); |
|
59 return self; |
|
60 } |
|
61 |
|
62 |
|
63 EXPORT_C void CMemSpyEngineHelperROM::AddInfoL( CMemSpyEngineOutputList& aList ) |
|
64 { |
|
65 _LIT( KRomChecksum, "ROM Checksum" ); |
|
66 aList.AddItemL( KRomChecksum, *iChecksum ); |
|
67 |
|
68 _LIT( KRomVersion, "ROM Version" ); |
|
69 aList.AddItemL( KRomVersion, *iPlatformVersion ); |
|
70 } |