|
1 /* |
|
2 * Copyright (c) 2008 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: App UI |
|
15 * |
|
16 */ |
|
17 |
|
18 // Version : %version: da1mmcf#14 % |
|
19 |
|
20 |
|
21 #ifndef CMPXVIDEOPLAYERAPPUI_H |
|
22 #define CMPXVIDEOPLAYERAPPUI_H |
|
23 |
|
24 #include <aknViewAppUi.h> |
|
25 |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CAiwGenericParamList; |
|
29 class CMpxVideoPlayerMediaKeyHandler; |
|
30 class CMpxVideoPlayerRemConListener; |
|
31 class CMpxVideoPlayerAppUiEngine; |
|
32 |
|
33 /** |
|
34 * Application UI class. |
|
35 * |
|
36 * @lib mpxvideoplayer.exe |
|
37 * @since MpxVideoPlayer 0.1 |
|
38 */ |
|
39 class CMpxVideoPlayerAppUi : public CAknViewAppUi |
|
40 { |
|
41 public: // Constructors and destructor |
|
42 |
|
43 /** |
|
44 * Default constructor |
|
45 */ |
|
46 CMpxVideoPlayerAppUi(); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 */ |
|
51 ~CMpxVideoPlayerAppUi(); |
|
52 |
|
53 public: // New functions |
|
54 |
|
55 /** |
|
56 * Exit |
|
57 */ |
|
58 void HandleExit(); |
|
59 |
|
60 /** |
|
61 * From CEikAppUi, processes shell commands. |
|
62 * @param aCommand |
|
63 * @param aDocumentName |
|
64 * @param aTail |
|
65 * @return ETrue if document name exists |
|
66 */ |
|
67 TBool ProcessCommandParametersL( TApaCommand aCommand, |
|
68 TFileName& aDocumentName, |
|
69 const TDesC8& aTail ); |
|
70 |
|
71 /** |
|
72 * From CEikAppUi |
|
73 * handle window server events. |
|
74 * |
|
75 * @param aEvent The window server event to be handled. |
|
76 * @param aDestination The control associated with the event. |
|
77 */ |
|
78 void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination ); |
|
79 |
|
80 /** |
|
81 * Command handling |
|
82 * @param aCmd Command ID |
|
83 */ |
|
84 void HandleCommandL( TInt aCommand ); |
|
85 |
|
86 /** |
|
87 * This function is used for querying whether the application |
|
88 * is launched in embedded mode or not. |
|
89 * @since 3.1 |
|
90 * @return ETrue: The application is launched in embedded mode. |
|
91 * EFalse: The application is launched in standalone mode. |
|
92 */ |
|
93 TBool IsEmbedded() const; |
|
94 |
|
95 /** |
|
96 * Opens the specified file in response. |
|
97 * @since 3.1 |
|
98 * @param aFile File handle to open |
|
99 * @param aParams Generic parameter list from document handler |
|
100 */ |
|
101 void OpenFileL( RFile& aFile, const CAiwGenericParamList* aParams ); |
|
102 |
|
103 /** |
|
104 * Returns the active view. |
|
105 * Ownership is not transferred. |
|
106 * |
|
107 * @return Active akn view or NULL if no views. |
|
108 */ |
|
109 CAknView* View(); |
|
110 |
|
111 /** |
|
112 * Sends a message to Matrix menu. |
|
113 * @param aMessage The message to be sent. |
|
114 */ |
|
115 void LaunchMmViewL( const TDesC8& aMessage ); |
|
116 |
|
117 private: |
|
118 /** |
|
119 * By default Symbian 2nd phase constructor is private. |
|
120 */ |
|
121 void ConstructL(); |
|
122 |
|
123 /** |
|
124 * Checks if the stored wg id is the same as the current wg id of embedded player. |
|
125 * If it is clears it. |
|
126 * @since 3.1 |
|
127 */ |
|
128 void DoWgIdUpkeep(); |
|
129 |
|
130 /** |
|
131 * From CEikAppUi |
|
132 * Receives closing notification from video storage |
|
133 * |
|
134 * @param aClientHandleOfTargetWindowGroup Target window group (this app). |
|
135 * @param aMessageUid The TUid type of the message |
|
136 * @param aMessageParameters A reference to constant descriptor of optional parameters |
|
137 */ |
|
138 MCoeMessageObserver::TMessageResponse HandleMessageL( |
|
139 TUint32 aClientHandleOfTargetWindowGroup, |
|
140 TUid aMessageUid, |
|
141 const TDesC8 &aMessageParameters); |
|
142 |
|
143 /** |
|
144 * From CEikAppUi |
|
145 * opens the specified file in response to a corresponding message. |
|
146 * |
|
147 * @param aFileName File to be opened. |
|
148 */ |
|
149 void OpenFileL( const TDesC& aFileName ); |
|
150 |
|
151 /** |
|
152 * From CCoeAppUi |
|
153 * called when event occurs of type EEventFocusLost or EEventFocusGained. |
|
154 * |
|
155 * @param aForeground ETrue if the application is in the foreground, |
|
156 * otherwise EFalse. |
|
157 */ |
|
158 void HandleForegroundEventL( TBool aForeground ); |
|
159 |
|
160 private: // data |
|
161 |
|
162 // own |
|
163 CMpxVideoPlayerAppUiEngine* iAppUiEngine; |
|
164 TBool iEndKeyExit; |
|
165 |
|
166 }; |
|
167 |
|
168 #endif // CMPXVIDEOPLAYERAPPUI_H |