|
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: Implementation of applicationmanagement components |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDES |
|
20 #include <apgwgnam.h> |
|
21 #include <aknnotewrappers.h> |
|
22 #include <StringLoader.h> |
|
23 #include <textresolver.h> |
|
24 #include "AppMgmtSrvUI.h" |
|
25 #include "AppMgmtSrvApp.h" |
|
26 #include "debug.h" |
|
27 |
|
28 // ============================ MEMBER FUNCTIONS ============================= |
|
29 // |
|
30 |
|
31 // --------------------------------------------------------------------------- |
|
32 // CAppMgmtSrvUi::ConstructL |
|
33 // Symbian 2nd phase constructor can leave. |
|
34 // --------------------------------------------------------------------------- |
|
35 // |
|
36 void CAppMgmtSrvUi::ConstructL() |
|
37 { |
|
38 |
|
39 BaseConstructL(EAknEnableSkin | EAknEnableMSK); |
|
40 |
|
41 CAppMgmtSrvApp* app = (CAppMgmtSrvApp*) Application(); |
|
42 CApplicationManagementServer* server = app->Server(); |
|
43 server->StartShutDownTimerL(); |
|
44 |
|
45 server->SendServerToBackground(); |
|
46 |
|
47 this->StatusPane()->MakeVisible(EFalse); |
|
48 |
|
49 HideApplicationFromFSW(ETrue); |
|
50 |
|
51 } |
|
52 |
|
53 // --------------------------------------------------------------------------- |
|
54 // Destructor |
|
55 // --------------------------------------------------------------------------- |
|
56 CAppMgmtSrvUi::~CAppMgmtSrvUi() |
|
57 { |
|
58 |
|
59 } |
|
60 |
|
61 // --------------------------------------------------------------------------- |
|
62 // CAppMgmtSrvUi::DynInitMenuPaneL |
|
63 // --------------------------------------------------------------------------- |
|
64 // |
|
65 void CAppMgmtSrvUi::DynInitMenuPaneL(TInt /*aResourceId*/, CEikMenuPane* /*aMenuPane*/) |
|
66 { |
|
67 |
|
68 } |
|
69 |
|
70 // --------------------------------------------------------------------------- |
|
71 // CAppMgmtSrvUi::HandleKeyEventL |
|
72 // --------------------------------------------------------------------------- |
|
73 // |
|
74 TKeyResponse CAppMgmtSrvUi::HandleKeyEventL(const TKeyEvent& aKeyEvent, |
|
75 TEventCode aType) |
|
76 { |
|
77 |
|
78 if (aType == EEventKey && aKeyEvent.iCode == EKeyEscape) |
|
79 { |
|
80 |
|
81 //Handle not required. Since UI Server goes to background and |
|
82 // brought to foreground at the time of displaying dialogs |
|
83 |
|
84 } |
|
85 |
|
86 return EKeyWasNotConsumed; |
|
87 } |
|
88 |
|
89 // --------------------------------------------------------------------------- |
|
90 // CAppMgmtSrvUi::HandleCommandL |
|
91 // --------------------------------------------------------------------------- |
|
92 // |
|
93 void CAppMgmtSrvUi::HandleCommandL(TInt aCommand) |
|
94 { |
|
95 |
|
96 switch (aCommand) |
|
97 { |
|
98 case EAknCmdExit: |
|
99 case EEikCmdExit: |
|
100 break; |
|
101 |
|
102 default: |
|
103 break; |
|
104 } |
|
105 |
|
106 } |
|
107 |
|
108 // --------------------------------------------------------------------------- |
|
109 // CAppMgmtAppUi::OpenFileL |
|
110 // This is called by framework when application is already open in background |
|
111 // and user open other file in eg. FileBrowse. |
|
112 // New file to been shown is passed via aFileName. |
|
113 // --------------------------------------------------------------------------- |
|
114 // |
|
115 void CAppMgmtSrvUi::OpenFileL(const TDesC& aFileName) |
|
116 { |
|
117 |
|
118 } |
|
119 |
|
120 // --------------------------------------------------------------------------- |
|
121 // CAppMgmtAppUi::PrepareToExit |
|
122 // This is called by framework when application is about to exit |
|
123 // and server can prepare to stop any active downloads |
|
124 // --------------------------------------------------------------------------- |
|
125 // |
|
126 void CAppMgmtSrvUi::PrepareToExit() |
|
127 { |
|
128 |
|
129 } |
|
130 |
|
131 void CAppMgmtSrvUi::HandleForegroundEventL(TBool aValue) |
|
132 { |
|
133 if (aValue == EFalse) |
|
134 RDEBUG( "CAppMgmtSrvUi::HandleForegroundEventL aValue::EFalse" ); |
|
135 else |
|
136 RDEBUG( "CAppMgmtSrvUi::HandleForegroundEventL aValue::ETrue" ); |
|
137 |
|
138 CAknAppUi::HandleForegroundEventL(aValue); |
|
139 // No Handle required |
|
140 } |