|
1 /* |
|
2 * Copyright (c) 2005 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 the License "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: Feeds application UI instance. |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <e32std.h> |
|
19 |
|
20 #include "FeedsApp.hrh" |
|
21 #include "FeedsAppUi.h" |
|
22 #include "LeakTracker.h" |
|
23 #include "TestHarnessView.h" |
|
24 |
|
25 #include "Logger.h" |
|
26 |
|
27 |
|
28 // ----------------------------------------------------------------------------- |
|
29 // CFeedsAppUi::ConstructL() |
|
30 // |
|
31 // Symbian 2nd phase constructor can leave. |
|
32 // ----------------------------------------------------------------------------- |
|
33 // |
|
34 void CFeedsAppUi::ConstructL() |
|
35 { |
|
36 // Initialise app UI |
|
37 BaseConstructL(EAknEnableSkin); |
|
38 |
|
39 // Init the engine and UI |
|
40 InitEngineL(); |
|
41 InitUIL(); |
|
42 |
|
43 LEAK_TRACKER_INCREMENT(CLeakTracker::EFeedsAppUi); |
|
44 } |
|
45 |
|
46 |
|
47 // ----------------------------------------------------------------------------- |
|
48 // CFeed::~CFeed |
|
49 // |
|
50 // Deconstructor. |
|
51 // ----------------------------------------------------------------------------- |
|
52 // |
|
53 CFeedsAppUi::~CFeedsAppUi() |
|
54 { |
|
55 LEAK_TRACKER_DECREMENT(CLeakTracker::EFeedsAppUi); |
|
56 } |
|
57 |
|
58 // ----------------------------------------------------------------------------- |
|
59 // CFeedsAppUi::HandleCommandL() |
|
60 // |
|
61 // Takes care of command handling. |
|
62 // ----------------------------------------------------------------------------- |
|
63 // |
|
64 void CFeedsAppUi::HandleCommandL(TInt aCommand) |
|
65 { |
|
66 switch (aCommand) |
|
67 { |
|
68 case EShowTestHarnessView: |
|
69 ActivateLocalViewL(TUid::Uid(EFeedsTestHarnessViewUid)); |
|
70 break; |
|
71 |
|
72 case EAknCmdHelp: |
|
73 break; |
|
74 |
|
75 case EEikCmdExit: |
|
76 case EAknSoftkeyExit: |
|
77 Exit(); |
|
78 break; |
|
79 |
|
80 default: |
|
81 break; |
|
82 } |
|
83 } |
|
84 |
|
85 |
|
86 // ----------------------------------------------------------------------------- |
|
87 // CFeedsAppUi::InitEngineL. |
|
88 // |
|
89 // Inits the Engine. |
|
90 // ----------------------------------------------------------------------------- |
|
91 // |
|
92 void CFeedsAppUi::InitEngineL() |
|
93 { |
|
94 } |
|
95 |
|
96 |
|
97 // ----------------------------------------------------------------------------- |
|
98 // CFeedsAppUi::InitUIL. |
|
99 // |
|
100 // Inits the UI. |
|
101 // ----------------------------------------------------------------------------- |
|
102 // |
|
103 void CFeedsAppUi::InitUIL() |
|
104 { |
|
105 CAknView* view = NULL; |
|
106 |
|
107 // Add the Folder View. |
|
108 view = CTestHarnessView::NewL(); |
|
109 CleanupStack::PushL(view); |
|
110 AddViewL(view); |
|
111 CleanupStack::Pop(view); |
|
112 |
|
113 SetDefaultViewL(*view); |
|
114 } |