|
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 "MemSpyDocument.h" |
|
19 |
|
20 // Engine includes |
|
21 #include <memspy/engine/memspyengine.h> |
|
22 |
|
23 // User includes |
|
24 #include "MemSpyAppUi.h" |
|
25 #include "MemSpySettings.h" |
|
26 |
|
27 |
|
28 CMemSpyDocument::CMemSpyDocument(CEikApplication& aApp) |
|
29 : CAknDocument(aApp) |
|
30 { |
|
31 } |
|
32 |
|
33 |
|
34 CMemSpyDocument::~CMemSpyDocument() |
|
35 { |
|
36 delete iSettings; |
|
37 delete iEngine; |
|
38 } |
|
39 |
|
40 |
|
41 void CMemSpyDocument::ConstructL() |
|
42 { |
|
43 RFs& fsSession = CCoeEnv::Static()->FsSession(); |
|
44 // |
|
45 iEngine = CMemSpyEngine::NewL( fsSession ); |
|
46 iSettings = CMemSpySettings::NewL( fsSession, *iEngine ); |
|
47 } |
|
48 |
|
49 |
|
50 CMemSpyDocument* CMemSpyDocument::NewL(CEikApplication& aApp) |
|
51 { |
|
52 CMemSpyDocument* self = new (ELeave) CMemSpyDocument( aApp ); |
|
53 CleanupStack::PushL( self ); |
|
54 self->ConstructL(); |
|
55 CleanupStack::Pop(); |
|
56 |
|
57 return self; |
|
58 } |
|
59 |
|
60 |
|
61 CMemSpyEngine& CMemSpyDocument::Engine() |
|
62 { |
|
63 return *iEngine; |
|
64 } |
|
65 |
|
66 |
|
67 const CMemSpyEngine& CMemSpyDocument::Engine() const |
|
68 { |
|
69 return *iEngine; |
|
70 } |
|
71 |
|
72 |
|
73 CMemSpySettings& CMemSpyDocument::Settings() |
|
74 { |
|
75 return *iSettings; |
|
76 } |
|
77 |
|
78 |
|
79 const CMemSpySettings& CMemSpyDocument::Settings() const |
|
80 { |
|
81 return *iSettings; |
|
82 } |
|
83 |
|
84 |
|
85 CEikAppUi* CMemSpyDocument::CreateAppUiL() |
|
86 { |
|
87 return new (ELeave) CMemSpyAppUi( *iEngine ); |
|
88 } |
|
89 |