|
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 "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: The MUS application's UI class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MUSUIAPPUI_H |
|
20 #define MUSUIAPPUI_H |
|
21 |
|
22 #include "musuieventobserver.h" |
|
23 #include "musuiqueryobserver.h" |
|
24 |
|
25 #include <eikapp.h> |
|
26 #include <eikdoc.h> |
|
27 #include <e32std.h> |
|
28 #include <coeccntx.h> |
|
29 #include <aknViewAppUi.h> |
|
30 #include <remconcoreapitargetobserver.h> |
|
31 |
|
32 class CMusUiStatusPaneHandler; |
|
33 class CMusUiActiveQueryDialog; |
|
34 class CRemConInterfaceSelector; |
|
35 class CRemConCoreApiTarget; |
|
36 |
|
37 /** |
|
38 * The MUS application's UI class. |
|
39 * |
|
40 * @lib musui.exe |
|
41 */ |
|
42 class CMusUiAppUi : public CAknViewAppUi, |
|
43 public MMusUiEventObserver, |
|
44 public MMusUiQueryObserver, |
|
45 public MRemConCoreApiTargetObserver |
|
46 { |
|
47 |
|
48 public: // constructors and destructor |
|
49 |
|
50 /** |
|
51 * EPOC default constructor. |
|
52 */ |
|
53 void ConstructL( ); |
|
54 |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 ~CMusUiAppUi(); |
|
59 |
|
60 public: // New functions |
|
61 |
|
62 CMusUiStatusPaneHandler* MusStatusPane(); |
|
63 |
|
64 TBool ExitValue(); |
|
65 |
|
66 |
|
67 public: // from base class CEikAppUi |
|
68 |
|
69 void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination ); |
|
70 |
|
71 void HandleForegroundEventL( TBool aForeground ); |
|
72 |
|
73 public: // from MRemConCoreApiTargetObserver |
|
74 |
|
75 void MrccatoCommand( TRemConCoreApiOperationId aOperationId, |
|
76 TRemConCoreApiButtonAction aButtonAct ); |
|
77 |
|
78 |
|
79 public: // from MMusUiQueryObserver |
|
80 |
|
81 virtual void QueryAcceptedL( TBool aAccepted ); |
|
82 |
|
83 /** |
|
84 * Error handler for QueryAcceptedL. |
|
85 * |
|
86 * @param aError is error to be handled. |
|
87 * @return KErrNone means handled value. All other values will lead to |
|
88 * a panic. |
|
89 */ |
|
90 virtual TInt HandleQueryError( TInt aError ); |
|
91 |
|
92 |
|
93 public: // from MMusUiEventObserver |
|
94 |
|
95 virtual void ActivateLocalMusViewL( TUid aViewId ); |
|
96 |
|
97 virtual void ActivateLocalMusViewL( TUid aViewId, |
|
98 TUid aCustomMessageId, |
|
99 const TDesC8& aCustomMessage ); |
|
100 |
|
101 virtual void ShowAsyncConfirmationQueryDialogL( const TDesC& aPrompt ); |
|
102 |
|
103 virtual void SetToolbarVisibility( TBool aVisible ); |
|
104 |
|
105 virtual void ShowNaviPaneIconL( TMusUiNaviMediaDecorator aIcon ); |
|
106 |
|
107 virtual CEikonEnv* EikonEnv( ) const; |
|
108 |
|
109 virtual void TerminateCall(); |
|
110 |
|
111 virtual CAknAppUiBase::TAppUiOrientation AppOrientation() const; |
|
112 |
|
113 /** |
|
114 * Switch the active view's orientation, if it's in the foreground, |
|
115 * from landscape to portrait, or vice versa. |
|
116 */ |
|
117 virtual void SwitchOrientationL( TAppUiOrientation aAppOrientation ); |
|
118 |
|
119 virtual void HandleError( const TInt aReason ); |
|
120 |
|
121 virtual void HandleExit(); |
|
122 |
|
123 virtual TBool OrientationCanBeChanged() const; |
|
124 |
|
125 virtual TInt GetUiVolumeValue(); |
|
126 |
|
127 private: // from base class CEikAppUi |
|
128 |
|
129 /** |
|
130 * Takes care of command handling. |
|
131 * |
|
132 * @param aCommand The command to be handled. |
|
133 */ |
|
134 void HandleCommandL( TInt aCommand ); |
|
135 |
|
136 /** |
|
137 * Handles a change to the application's resources which are shared |
|
138 * across the environment. |
|
139 * |
|
140 * @param aType The type of resources that have changed. |
|
141 */ |
|
142 void HandleResourceChangeL( TInt aType ); |
|
143 |
|
144 TKeyResponse HandleKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
|
145 |
|
146 // Help context from CCoeAppUi |
|
147 CArrayFix<TCoeHelpContext>* HelpContextL() const; |
|
148 |
|
149 private: |
|
150 |
|
151 void DoHandleForegroundEventL( TInt aEventType ); |
|
152 |
|
153 void FindWindowGroupIdentifiersL(); |
|
154 |
|
155 |
|
156 private: // data |
|
157 |
|
158 /** Owns. Handle to status pane handler */ |
|
159 CMusUiStatusPaneHandler* iStatusPaneHandler; |
|
160 |
|
161 CMusUiActiveQueryDialog* iConfirmationQuery; |
|
162 |
|
163 CRemConInterfaceSelector* iInterfaceSelector; |
|
164 |
|
165 CRemConCoreApiTarget* iCoreTarget; |
|
166 |
|
167 TBool iExit; |
|
168 |
|
169 TInt iLastKeyCode; |
|
170 |
|
171 /** |
|
172 * ETrue if operator specific functionality is needed |
|
173 */ |
|
174 TBool iOperatorSpecificFunctionality; |
|
175 |
|
176 // Window group id of this application. |
|
177 TInt iThisApplicationWgId; |
|
178 |
|
179 // Window group id of eikon server. |
|
180 TInt iEikonServerWgId; |
|
181 |
|
182 // Window group id for AknCapServer |
|
183 TInt iAknCapServerWgId; |
|
184 |
|
185 // Window group id for Akn Notifier Server |
|
186 TInt iAknNfyServerWgId; |
|
187 |
|
188 TBool iForeground; |
|
189 |
|
190 |
|
191 }; |
|
192 |
|
193 #endif // MUSUIAPPUI_H |
|
194 |
|
195 // end of file |