|
1 /* |
|
2 * Copyright (c) 2006 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: Application UI class required by AVKON application architecture. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CMPXAPPUI_H |
|
21 #define CMPXAPPUI_H |
|
22 |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32std.h> |
|
26 #include <f32file.h> |
|
27 #ifdef RD_RA_SUPPORT_FOR_MUSIC_PLAYER |
|
28 #include <AknServerApp.h> |
|
29 #endif //RD_RA_SUPPORT_FOR_MUSIC_PLAYER |
|
30 #include <aknViewAppUi.h> |
|
31 #include <apparc.h> |
|
32 #include <AknProgressDialog.h> // MProgressDialogCallback |
|
33 #ifdef FF_OOM_MONITOR2_COMPONENT |
|
34 #include <oommonitorsession.h> |
|
35 #endif |
|
36 #include <iaupdateobserver.h> //IAD |
|
37 #include <mpxplaybackobserver.h> |
|
38 #include <mpxcollectionobserver.h> |
|
39 #include <mpxcollectionuihelper.h> |
|
40 #include <mpxmediakeyhandlerobserver.h> |
|
41 #include <mpxviewactivationobserver.h> |
|
42 #include <mpxcollectionhelper.h> |
|
43 #include <mpxcollectionuihelperobserver.h> |
|
44 #include "mpxsavehelper.h" |
|
45 #include "mpxcontroller.h" |
|
46 |
|
47 // FORWARD DECLARATIONS |
|
48 class MMPXPlaybackUtility; |
|
49 class MMPXCollectionUtility; |
|
50 class MMPXViewUtility; |
|
51 class CMPXCommonUiHelper; |
|
52 class MMPXMediaKeyHandler; |
|
53 class CRepository; |
|
54 class CMPXRestorePath; |
|
55 class MMPXHarvesterUtility; |
|
56 class MMPXCollectionHelper; |
|
57 class CMPXCommandHandler; |
|
58 class CIdle; |
|
59 class CIAUpdate; //IAD |
|
60 class CIAUpdateParameters; //IAD |
|
61 //class CMPXController; |
|
62 |
|
63 // Cover UI start |
|
64 //#ifdef __COVER_DISPLAY |
|
65 class CMediatorCommandInitiator; |
|
66 //#endif // __COVER_DISPLAY |
|
67 // Cover UI end |
|
68 #ifdef RD_BROWSER_PROGRESSIVE_DOWNLOAD |
|
69 class CMPXPdCommandHandler; |
|
70 #endif // RD_BROWSER_PROGRESSIVE_DOWNLOAD |
|
71 #ifdef __CAMESE_SUPERDISTRIBUTION_SUPPORT |
|
72 class CCameseDrmHandler; |
|
73 #endif |
|
74 #ifdef RD_RA_SUPPORT_FOR_MUSIC_PLAYER |
|
75 class CDocumentHandler; |
|
76 #endif //RD_RA_SUPPORT_FOR_MUSIC_PLAYER |
|
77 |
|
78 // CLASS DECLARATION |
|
79 |
|
80 /** |
|
81 * Application UI class. |
|
82 * Provides support for the following features: |
|
83 * - EIKON control architecture |
|
84 * - view architecture |
|
85 * - status pane |
|
86 * |
|
87 * @lib mpx.exe |
|
88 * @since 3.1 |
|
89 */ |
|
90 class CMPXAppUi : public CAknViewAppUi, |
|
91 public MMPXPlaybackObserver, |
|
92 public MMPXCollectionObserver, |
|
93 public MMPXCHelperEmbeddedOpenObserver, |
|
94 public MMPXMediaKeyHandlerObserver, |
|
95 public MMPXViewActivationObserver, |
|
96 public MMPXSaveHelperObserver, |
|
97 public MMPXCollectionHelperObserver, |
|
98 public MProgressDialogCallback, |
|
99 public MFileManObserver, |
|
100 public MMPXPlaybackCallback, |
|
101 public MIAUpdateObserver |
|
102 #ifdef RD_RA_SUPPORT_FOR_MUSIC_PLAYER |
|
103 ,public MAknServerAppExitObserver |
|
104 #endif //RD_RA_SUPPORT_FOR_MUSIC_PLAYER |
|
105 { |
|
106 public: |
|
107 |
|
108 /** |
|
109 * C++ default constructor. |
|
110 */ |
|
111 CMPXAppUi(); |
|
112 |
|
113 /** |
|
114 * Destructor. |
|
115 */ |
|
116 virtual ~CMPXAppUi(); |
|
117 |
|
118 /** |
|
119 * This function is used for querying whether the application |
|
120 * is launched in embedded mode or not. |
|
121 * @since 3.1 |
|
122 * @return ETrue: The application is launched in embedded mode. |
|
123 * EFalse: The application is launched in standalone mode. |
|
124 */ |
|
125 TBool IsEmbedded() const; |
|
126 |
|
127 /** |
|
128 * Opens temporary playlist or album from buffer. Buffer contents are |
|
129 * handled as album if the album name is provided. |
|
130 * @since 3.1 |
|
131 * @param aBuffer Descriptor containing playlist contents (each track's |
|
132 * path is separated with a line feed "\n"). |
|
133 * @param aName Album name. |
|
134 */ |
|
135 void OpenPlaylistFromBufferL( |
|
136 const TDesC& aBuffer, |
|
137 TDesC& aName ); |
|
138 |
|
139 /** |
|
140 * Opens the specified file in response. |
|
141 * @since 3.1 |
|
142 * @param aFileStore Not used |
|
143 * @param aFile File handle to open |
|
144 */ |
|
145 void OpenFileL( |
|
146 CFileStore*& aFileStore, |
|
147 RFile& aFile, |
|
148 const CAiwGenericParamList* aParams ); |
|
149 |
|
150 /** |
|
151 * Make Phone/Idle/ActiveIdle come to foreground. |
|
152 */ |
|
153 void ActivatePhoneAppL(); |
|
154 |
|
155 /** |
|
156 * Function for deferred exit call back |
|
157 * |
|
158 * @param aPtr Pointer to self |
|
159 * @return System wide error code |
|
160 */ |
|
161 static TInt DeferredExitCallback( TAny* aPtr ); |
|
162 |
|
163 private: |
|
164 |
|
165 /** |
|
166 * Start a waitnote dialog |
|
167 */ |
|
168 void StartWaitNoteL( TWaitNoteType aNoteType ); |
|
169 |
|
170 /** |
|
171 * Close the waitnote dialog |
|
172 */ |
|
173 void CloseWaitNoteL( ); |
|
174 |
|
175 /** |
|
176 * By default Symbian 2nd phase constructor is private. |
|
177 */ |
|
178 void ConstructL(); |
|
179 |
|
180 /** |
|
181 * Handle media key commands. |
|
182 * |
|
183 * @param aCommand Media key commands. see mpxappui.hrh |
|
184 */ |
|
185 void DoHandleMediaKeyCommandL( TMPXPlaybackCommand aCommand ); |
|
186 |
|
187 /** |
|
188 * Control popup behaviour. |
|
189 * |
|
190 * @param aCommand Media key commands. see mpxappui.hrh |
|
191 * @param aValue Parameter for aCommand |
|
192 */ |
|
193 void HandlePopupL( TMPXPlaybackCommand aCommand ); |
|
194 |
|
195 /** |
|
196 * Check if Active Idle app is on foreground. |
|
197 * |
|
198 * @return ETrue if idle app is in the foreground, EFalse otherwise. |
|
199 */ |
|
200 TBool IsIdleAppForeground(); |
|
201 |
|
202 /** |
|
203 * Check if Active Idle is enabled. |
|
204 * |
|
205 * @return ETrue if active idle is in the enabled, EFalse otherwise. |
|
206 */ |
|
207 TBool IsActiveIdleEnabled(); |
|
208 |
|
209 /** |
|
210 * Creates and initializes all member variables |
|
211 */ |
|
212 void CreateMemberVariablesL(); |
|
213 |
|
214 /** |
|
215 * Saves a file |
|
216 */ |
|
217 void DoSaveL(); |
|
218 |
|
219 /** |
|
220 * Creates a new save path filename |
|
221 * |
|
222 * @param aNewPath Contains new save path on return |
|
223 */ |
|
224 void CreateAutomaticSavePathL( TFileName& aNewPath ); |
|
225 |
|
226 /** |
|
227 * Handling to be done after save/add file is complete |
|
228 */ |
|
229 void HandlePostSaveOperationL(); |
|
230 |
|
231 /** |
|
232 * Handles WMA DRM Protected Media |
|
233 * |
|
234 * @return ETrue if it's ok to open the document, EFalse otherwise. |
|
235 */ |
|
236 TBool HandleWMAProtectionL(); |
|
237 |
|
238 /** |
|
239 * Handles both OMA and WM DRM Protected Media |
|
240 * |
|
241 * @param aMedia Media object containing the rights information. |
|
242 * @return ETrue if it's ok to open the document, EFalse otherwise. |
|
243 */ |
|
244 TBool HandleDRMProtectionL(const CMPXMedia& aMedia); |
|
245 |
|
246 /** |
|
247 * Handles broadcast messages |
|
248 */ |
|
249 void HandleBroadcastMessageL( const CMPXMessage& aMessage ); |
|
250 |
|
251 /** |
|
252 * Handles commands passed in by other applications |
|
253 */ |
|
254 void HandleCommandParametersL( const TDesC8& aCommand ); |
|
255 |
|
256 /** |
|
257 * Handle playback message |
|
258 * |
|
259 * @param aMessage playback message |
|
260 */ |
|
261 void DoHandlePlaybackMessageL( const CMPXMessage& aMessage ); |
|
262 |
|
263 #ifdef __CAMESE_SUPERDISTRIBUTION_SUPPORT |
|
264 /** |
|
265 * Handle Camese Playback PreProcessing |
|
266 * |
|
267 * @param aMessage playback message |
|
268 * @param aSkipEvent whether App Ui should skip this event |
|
269 */ |
|
270 void HandleCamesePlaybackPreProcessingL(const CMPXMessage& aMessage, TBool& aSkipEvent); |
|
271 #endif |
|
272 |
|
273 |
|
274 /** |
|
275 * Handle Player Changed Playback Message |
|
276 * |
|
277 */ |
|
278 void HandlePlaybackPlayerChangedL(); |
|
279 |
|
280 /** |
|
281 * Handle custom commands. |
|
282 * |
|
283 * @param aUid Command category Uid. Different command set will have |
|
284 * different Uid to avoid clash. |
|
285 * @param aCommand Command to be handled. |
|
286 */ |
|
287 void DoHandleCustomCommandL( |
|
288 const TUid& aUid, |
|
289 const TInt aCommand ); |
|
290 |
|
291 /** |
|
292 * Callback function to signal that saving a file is complete |
|
293 * |
|
294 * @param aErr Error of the operation. |
|
295 */ |
|
296 void DoHandleSaveCompleteL( TInt aErr ); |
|
297 |
|
298 /** |
|
299 * Handle collection message |
|
300 * |
|
301 * @param aMessage collection message |
|
302 */ |
|
303 void DoHandleCollectionMessageL( const CMPXMessage& aMessage ); |
|
304 #ifdef RD_BROWSER_PROGRESSIVE_DOWNLOAD |
|
305 /** |
|
306 * Check if the Browser is closed. |
|
307 * |
|
308 * @param aParameter AIW parameter passed in by other applications |
|
309 */ |
|
310 TBool IsBrowserClosed(const TDesC8& aParameter); |
|
311 |
|
312 /** |
|
313 * Brings the browser to the foreground. |
|
314 * |
|
315 * @return ETrue if browser was found, EFalse otherwise. |
|
316 */ |
|
317 |
|
318 TBool BringUpBrowserL(); |
|
319 #endif |
|
320 |
|
321 /* |
|
322 * Returns whether playback is remote i.e using UPNP. |
|
323 * @return ETrue if playback is remote, EFalse otherwise. |
|
324 */ |
|
325 TBool IsPlaybackRemote(); |
|
326 |
|
327 /* |
|
328 * Sends a command to collection to set media |
|
329 */ |
|
330 void SetMediaL( CMPXMedia& aMedia ); |
|
331 // from base class MMPXPlaybackObserver |
|
332 |
|
333 /** |
|
334 * From MMPXPlaybackObserver |
|
335 * Handle playback message |
|
336 * |
|
337 * @since 3.1 |
|
338 * @param aMessage playback message |
|
339 * @param aErr system error code. |
|
340 */ |
|
341 void HandlePlaybackMessage( |
|
342 CMPXMessage* aMessage, TInt aError ); |
|
343 |
|
344 // from base class MMPXCollectionObserver |
|
345 |
|
346 /** |
|
347 * From MMPXCollectionObserver |
|
348 * Handle media properties. |
|
349 * |
|
350 * @since 3.1 |
|
351 * @param aMedia media properties. |
|
352 * @param aError Error code. |
|
353 */ |
|
354 void HandleCollectionMediaL( |
|
355 const CMPXMedia& aMedia, |
|
356 TInt aError ); |
|
357 |
|
358 /** |
|
359 * From MMPXCollectionObserver |
|
360 * Handle collection message. |
|
361 * |
|
362 * @since 3.1 |
|
363 * @param aMessage Collection message |
|
364 * @param aErr system error code. |
|
365 */ |
|
366 void HandleCollectionMessage( |
|
367 CMPXMessage* aMessage, TInt aError ); |
|
368 |
|
369 /** |
|
370 * From MMPXCollectionObserver |
|
371 * Handles the collection entries being opened. |
|
372 * |
|
373 * @since 3.1 |
|
374 * @param aEntries Collection entries opened. |
|
375 * @param aIndex Focused entry. |
|
376 * @param aComplete ETrue no more entries. EFalse more entries |
|
377 * expected. |
|
378 * @param aError Error code. |
|
379 */ |
|
380 void HandleOpenL( |
|
381 const CMPXMedia& aEntries, |
|
382 TInt aIndex, |
|
383 TBool aComplete, |
|
384 TInt aError ); |
|
385 |
|
386 /** |
|
387 * From MMPXCollectionObserver |
|
388 * Handles the item being opened. |
|
389 * |
|
390 * @since 3.1 |
|
391 * @param aPlaylist Collection playlist, owner ship is transfered. |
|
392 * @param aError Error code. |
|
393 */ |
|
394 void HandleOpenL( |
|
395 const CMPXCollectionPlaylist& aPlaylist, |
|
396 TInt aError ); |
|
397 |
|
398 // from base class MMPXCHelperEmbeddedOpenObserver |
|
399 |
|
400 /** |
|
401 * From MMPXCHelperEmbeddedOpenObserver |
|
402 * Handles errors from opening in embedded mode |
|
403 * |
|
404 * @since 3.1 |
|
405 * @param aErr Error code |
|
406 * @param aCategory Type of item to be opened. |
|
407 */ |
|
408 void HandleEmbeddedOpenL( TInt aErr, TMPXGeneralCategory aCategory ); |
|
409 |
|
410 // from base class MMPXMediaKeyHandlerObserver |
|
411 |
|
412 /** |
|
413 * Handle media key commands. |
|
414 * |
|
415 * @since 5.0 |
|
416 * @param aCommand Command to be handled. |
|
417 * @param aData data for the specific command |
|
418 */ |
|
419 void HandleMediaKeyCommand( |
|
420 const TMPXPlaybackCommand aCommand, |
|
421 const TInt aData = KErrNotFound ); |
|
422 |
|
423 // from base class MMPXViewActivationObserver |
|
424 |
|
425 /** |
|
426 * From MMPXViewActivationObserver |
|
427 * Handle view activation. |
|
428 * |
|
429 * @since 3.1 |
|
430 * @param aCurrentViewType Current view type Uid. |
|
431 * @param aPreviousViewType Previous view type Uid. |
|
432 */ |
|
433 void HandleViewActivation( |
|
434 const TUid& aCurrentViewType, |
|
435 const TUid& aPreviousViewType ); |
|
436 |
|
437 /** |
|
438 * @see MMPXViewActivationObserver |
|
439 */ |
|
440 void HandleViewUpdate( |
|
441 TUid aViewUid, |
|
442 MMPXViewActivationObserver::TViewUpdateEvent aUpdateEvent, |
|
443 TBool aLoaded, |
|
444 TInt aData); |
|
445 |
|
446 // from base class CEikAppUi |
|
447 |
|
448 /** |
|
449 * From CEikAppUi |
|
450 * opens the specified file in response to a corresponding message. |
|
451 * |
|
452 * @param aFileName File to be opened. |
|
453 */ |
|
454 void OpenFileL( const TDesC& aFileName ); |
|
455 |
|
456 /** |
|
457 * From CCoeAppUi |
|
458 * called when event occurs of type EEventFocusLost or EEventFocusGained. |
|
459 * |
|
460 * @param aForeground ETrue if the application is in the foreground, |
|
461 * otherwise EFalse. |
|
462 */ |
|
463 void HandleForegroundEventL( TBool aForeground ); |
|
464 |
|
465 /** |
|
466 * From CEikAppUi |
|
467 * processes shell commands. |
|
468 * |
|
469 * @param aCommand The shell command sent to the application. |
|
470 * @param aDocument Name The name of the document as |
|
471 specified on the command line |
|
472 * @param aTail Tail end information in the command |
|
473 * @return ETrue if the file exist, EFalse otherwise |
|
474 */ |
|
475 TBool ProcessCommandParametersL( |
|
476 TApaCommand aCommand, |
|
477 TFileName& aDocumentName, |
|
478 const TDesC8& aTail ); |
|
479 |
|
480 /** |
|
481 * From CEikAppUi |
|
482 * takes care of command handling. |
|
483 * |
|
484 * @param aCommand The ID of the command. |
|
485 */ |
|
486 void HandleCommandL( TInt aCommand ); |
|
487 |
|
488 /** |
|
489 * From CEikAppUi |
|
490 * handle window server events. |
|
491 * |
|
492 * @param aEvent The window server event to be handled. |
|
493 * @param aDestination The control associated with the event. |
|
494 */ |
|
495 void HandleWsEventL( |
|
496 const TWsEvent& aEvent, |
|
497 CCoeControl* aDestination ); |
|
498 |
|
499 /** |
|
500 * From CEikAppUi |
|
501 * Handles window server messages. |
|
502 * |
|
503 * @param aClientHandleOfTargetWindowGroup The window group that the message |
|
504 * was sent to. |
|
505 * @param aMessageUid The message UID. |
|
506 * @param aMessageParameters The Message parameters. |
|
507 * @return Indicates whether the message was handled or not. |
|
508 */ |
|
509 MCoeMessageObserver::TMessageResponse HandleMessageL( |
|
510 TUint32 aClientHandleOfTargetWindowGroup, |
|
511 TUid aMessageUid, |
|
512 const TDesC8& aMessageParameters ); |
|
513 |
|
514 /** |
|
515 * From CEikAppUi |
|
516 * Process message sent by another application |
|
517 * |
|
518 * @param aUid uid identifying the message. |
|
519 * @param aParams The message to be processed. |
|
520 */ |
|
521 void ProcessMessageL( TUid aUid, const TDesC8& aParams ); |
|
522 |
|
523 /** |
|
524 * From CEikAppUi |
|
525 * process command line parameter |
|
526 * |
|
527 * @param aCommandLine The message to be processed. |
|
528 */ |
|
529 TBool ProcessCommandParametersL( CApaCommandLine& aCommandLine ); |
|
530 |
|
531 |
|
532 // from base class MMPXSaveHelperObserver |
|
533 |
|
534 /** |
|
535 * From MMPXSaveHelperObserver |
|
536 * Callback function to signal that saving a file is complete |
|
537 * |
|
538 * @since 3.1 |
|
539 * @param aErr Error of the operation. |
|
540 */ |
|
541 void HandleSaveComplete( TInt aErr ); |
|
542 |
|
543 // from base class MMPXCollectionHelperObserver |
|
544 |
|
545 /** |
|
546 * From MMPXCollectionHelperObserver |
|
547 * Callback function to signal that adding a file is complete |
|
548 * |
|
549 * @since 3.1 |
|
550 * @param aErr Error of the operation. |
|
551 */ |
|
552 void HandleAddFileCompleteL( TInt aErr ); |
|
553 |
|
554 // from base class MProgressDialogCallback |
|
555 |
|
556 /** |
|
557 * From MProgressDialogCallback |
|
558 * Callback method |
|
559 * Gets called when a dialog is dismissed. |
|
560 * |
|
561 * @param aButtonId Button pressed for the dialog to be dismissed. |
|
562 */ |
|
563 void DialogDismissedL( TInt aButtonId ); |
|
564 |
|
565 // from base class MFileManObserver |
|
566 |
|
567 /** |
|
568 * From MFileManObserver |
|
569 * Callback method |
|
570 * Gets called during a file operation. |
|
571 * |
|
572 * @return Control status |
|
573 */ |
|
574 MFileManObserver::TControl NotifyFileManOperation(); |
|
575 |
|
576 #ifdef RD_RA_SUPPORT_FOR_MUSIC_PLAYER |
|
577 |
|
578 // from base class MAknServerAppExitObserver |
|
579 |
|
580 /** |
|
581 * From MAknServerAppExitObserver. |
|
582 */ |
|
583 void HandleServerAppExit(TInt aReason); |
|
584 /** |
|
585 * Create a Forwards parameters that were passed by browser to media player |
|
586 * If the new parameters is created successful, it will be leave on the CleanupStack |
|
587 * @param aParamList the original parameter |
|
588 * @return Forward parameters that is created. |
|
589 */ |
|
590 CAiwGenericParamList* CreateForwardAiwParametersLC(const CAiwGenericParamList* aParamList) const; |
|
591 |
|
592 #endif // RD_RA_SUPPORT_FOR_MUSIC_PLAYER |
|
593 |
|
594 /** |
|
595 * Update the refreshed time for music and podcast plugins |
|
596 */ |
|
597 void DoUpdatePluginRefreshedTimeL(); |
|
598 |
|
599 // from base class MMPXPlaybackCallback |
|
600 /** |
|
601 * Handle playback property |
|
602 * |
|
603 * @param aProperty the property |
|
604 * @param aValue the value of the property |
|
605 * @param aError error code |
|
606 */ |
|
607 void HandlePropertyL(TMPXPlaybackProperty aProperty, |
|
608 TInt aValue, |
|
609 TInt aError); |
|
610 |
|
611 /** |
|
612 * Method is called continously until aComplete=ETrue, signifying that |
|
613 * it is done and there will be no more callbacks |
|
614 * Only new items are passed each time |
|
615 * |
|
616 * @param aPlayer UID of the subplayer |
|
617 * @param aSubPlayers a list of sub players |
|
618 * @param aComplete ETrue no more sub players. EFalse more subplayer |
|
619 * expected |
|
620 * @param aError error code |
|
621 */ |
|
622 void HandleSubPlayerNamesL(TUid aPlayer, |
|
623 const MDesCArray* aSubPlayers, |
|
624 TBool aComplete, |
|
625 TInt aError); |
|
626 |
|
627 /** |
|
628 * Call back of media request |
|
629 * |
|
630 * @param aMedia media |
|
631 * @param aError error code |
|
632 */ |
|
633 void HandleMediaL(const CMPXMedia& aProperties, |
|
634 TInt aError); |
|
635 |
|
636 /** |
|
637 * Checks if the specified view is the active view |
|
638 * |
|
639 * @param aViewType view identifier |
|
640 * @return ETRUE if the view is active, EFALSE otherwise |
|
641 */ |
|
642 TBool IsActiveView(TInt aViewType ); |
|
643 |
|
644 /** |
|
645 * Reopens the path in order to get the latest data. |
|
646 * |
|
647 */ |
|
648 void ReOpenPathL(); |
|
649 |
|
650 /** |
|
651 * Suppress the collection view from coming up. |
|
652 * |
|
653 */ |
|
654 TBool SuppressCollectionView(); |
|
655 |
|
656 /** |
|
657 * Sets the playback volume. |
|
658 * |
|
659 * @param aVolume volume value. |
|
660 */ |
|
661 void SetVolume( const TInt aVolume ); |
|
662 |
|
663 /** |
|
664 * Mutes the playback volume. |
|
665 */ |
|
666 void MuteVolume(); |
|
667 |
|
668 /** |
|
669 * Unmutes the playback volume. |
|
670 */ |
|
671 void UnMuteVolume(); |
|
672 |
|
673 /** |
|
674 * Translates Playback commands to MPX commands |
|
675 */ |
|
676 TInt MPXCmdForPbCmd( TMPXPlaybackCommand aCommand ); |
|
677 |
|
678 /** |
|
679 * if current heap memory is less than the lowest need of music player |
|
680 * music player well exit. |
|
681 * |
|
682 * @param music player need memory |
|
683 */ |
|
684 void CheckAvailableMemory( TInt aNeedMemory ); |
|
685 |
|
686 #ifdef FF_OOM_MONITOR2_COMPONENT |
|
687 /** |
|
688 * Dynamically set music player's busy or mornal priority in OOM |
|
689 * according to MPX playing state. |
|
690 * |
|
691 * @param aPriority Correct priority to set. |
|
692 */ |
|
693 void SetMpxOomPriorityL( ROomMonitorSession::TOomPriority aPriority ); |
|
694 |
|
695 /** |
|
696 * Check heap memory through OOM moudule. |
|
697 * If less than the lowest need of music player |
|
698 * music player will exit. |
|
699 * |
|
700 * @param aNeedMemory Memory needed by Music Player |
|
701 */ |
|
702 void CheckAvailableMemoryByOomL( TInt aNeedMemory ); |
|
703 #endif // FF_OOM_MONITOR2_COMPONENT |
|
704 |
|
705 /** |
|
706 * Launch matrix menu Music suite with given message |
|
707 */ |
|
708 void LaunchMmViewL( const TDesC8& aMessage ); |
|
709 |
|
710 /** |
|
711 * Check updates |
|
712 */ |
|
713 void CheckUpdatesL(); //IAD |
|
714 |
|
715 /** |
|
716 * Clean IAD update parameters |
|
717 */ |
|
718 void CleanUpdateParams(); //IAD |
|
719 |
|
720 |
|
721 // from base class MIAUpdateObserver |
|
722 |
|
723 /** |
|
724 * This callback function is called when the update checking operation has completed. |
|
725 * |
|
726 * @param aErrorCode The error code of the observed update operation. |
|
727 * KErrNone for successful completion, |
|
728 * otherwise a system wide error code. |
|
729 * @param aAvailableUpdates Number of the updates that were found available. |
|
730 */ |
|
731 void CheckUpdatesComplete( TInt aErrorCode, TInt aAvailableUpdates ); |
|
732 |
|
733 /** |
|
734 * This callback function is called when an update operation has completed. |
|
735 * |
|
736 * @param aErrorCode The error code of the completed update operation. |
|
737 * KErrNone for successful completion, |
|
738 * otherwise a system wide error code. |
|
739 * @param aResult Details about the completed update operation. |
|
740 * Ownership is transferred. |
|
741 */ |
|
742 void UpdateComplete( TInt aErrorCode, CIAUpdateResult* aResultDetails ); |
|
743 |
|
744 /** |
|
745 * This callback function is called when an update query operation has completed. |
|
746 * |
|
747 * @param aErrorCode The error code of the observed query operation. |
|
748 * KErrNone for successful completion, |
|
749 * otherwise a system wide error code. |
|
750 * @param aUpdateNow ETrue informs that an update operation should be started. |
|
751 * EFalse informs that there is no need to start an update |
|
752 * operation. |
|
753 */ |
|
754 void UpdateQueryComplete( TInt aErrorCode, TBool aUpdateNow ); |
|
755 |
|
756 private: |
|
757 enum TMPXSaveMode |
|
758 { |
|
759 EMPXSaveModeIdle = 0, |
|
760 EMPXOpenAfterSave, |
|
761 EMPXExitAppAfterSave, |
|
762 EMPXExitHostAppAfterSave, |
|
763 EMPXAssignRingtone, |
|
764 EMPXAssignContact |
|
765 }; |
|
766 |
|
767 private: //Data |
|
768 |
|
769 MMPXPlaybackUtility* iPlaybackUtility; // own |
|
770 MMPXCollectionUtility* iCollectionUtility; // own |
|
771 MMPXViewUtility* iViewUtility; // own |
|
772 MMPXHarvesterUtility* iHarvesterUtility; // own |
|
773 MMPXCollectionUiHelper* iCollectionUiHelper; // own |
|
774 MMPXCollectionHelper* iCollectionHelper; // own |
|
775 |
|
776 // RemCon target for receiving media key events |
|
777 MMPXMediaKeyHandler* iMediaKeyHandler; // own |
|
778 |
|
779 CMPXCommonUiHelper* iCommonUiHelper; // own |
|
780 CMPXSaveHelper* iSaveHelper; // own |
|
781 CRepository* iSettingsRepository; // own, for active idle setting |
|
782 |
|
783 // Handle commands passed in from other applications |
|
784 CMPXCommandHandler* iProcessParameter; // own |
|
785 #ifdef RD_BROWSER_PROGRESSIVE_DOWNLOAD |
|
786 CMPXPdCommandHandler* iPdParameterHandler; // own |
|
787 TBool iAppStartedByBrowser; |
|
788 TBool iPdPbvStartedByBrowser; |
|
789 TBool icollectionBrowsed; |
|
790 TBool iPbvStartedByBrowser; |
|
791 #endif // RD_BROWSER_PROGRESSIVE_DOWNLOAD |
|
792 // Path backup and restore when music player is exited |
|
793 CMPXRestorePath* iPathRestore; // own |
|
794 |
|
795 // Music Player controller for System Events and startup check |
|
796 CMPXController* iController; |
|
797 |
|
798 // Array of ring tone mime types for saving files |
|
799 CDesCArrayFlat iRingToneMimeTypes; // own |
|
800 |
|
801 HBufC* iSavePath; // own |
|
802 |
|
803 CIdle* iIdle; // own |
|
804 |
|
805 RFile iFile; |
|
806 |
|
807 TInt iOpenState; |
|
808 TBool iIsUsbOnGoing; // USB status |
|
809 TBool iFormattingOnGoing; // Formatting state |
|
810 TBool iRefreshOnGoing; |
|
811 |
|
812 // Flag whether or not playback was paused for save operation |
|
813 TBool iPausedForSave; |
|
814 |
|
815 TBool iInitedVolume; |
|
816 |
|
817 TUid iPreviousViewType; // previous view type |
|
818 TUid iCurrentViewType; // current view type |
|
819 |
|
820 // UIDs for the music and podcast collection databases |
|
821 TUid iMusicCollectionId; |
|
822 TUid iPodcastCollectionId; |
|
823 |
|
824 RArray<TUid> iDeferredViewActivationUid; |
|
825 |
|
826 TInt iCurrentIndex; |
|
827 |
|
828 TMPXSaveMode iSaveMode; |
|
829 |
|
830 TBool iCancelFileMan; |
|
831 |
|
832 TBool iStandAlone; |
|
833 |
|
834 TInt iCurrentVolume; |
|
835 TInt iMaxVolume; |
|
836 |
|
837 TBool iUPnPUnavailableEventFromCollection; |
|
838 |
|
839 TBool iDelayedParameterHandling; |
|
840 |
|
841 TBool iIgnoreExternalCommand; |
|
842 |
|
843 TBool iRefreshCollectionView; |
|
844 |
|
845 // Cover UI start |
|
846 //#ifdef __COVER_DISPLAY |
|
847 CMediatorCommandInitiator* iCommandInitiator; |
|
848 TBool iCoverDisplay; |
|
849 //#endif |
|
850 // Cover UI end |
|
851 |
|
852 #ifdef __CAMESE_SUPERDISTRIBUTION_SUPPORT |
|
853 // Indicates we are handling Protected WMA Media on Open stage |
|
854 TBool iHandlingProtectedWMAMedia; |
|
855 CCameseDrmHandler* iCameseDrmHandler; // own |
|
856 #endif |
|
857 |
|
858 #ifdef RD_RA_SUPPORT_FOR_MUSIC_PLAYER |
|
859 CDocumentHandler* iDocHandler; |
|
860 #endif //RD_RA_SUPPORT_FOR_MUSIC_PLAYER |
|
861 |
|
862 TInt iCmdActivatedViewTypeId; |
|
863 |
|
864 TBool iDisablePodcasting; |
|
865 TBool iLaunchModePlaying; // Launch mode specified in startup parameter |
|
866 CIAUpdate* iUpdate; // IAD client object |
|
867 CIAUpdateParameters* iParameters; // Parameters for IAD update |
|
868 |
|
869 #ifdef FF_OOM_MONITOR2_COMPONENT |
|
870 ROomMonitorSession::TOomPriority iOomPriority; |
|
871 #endif // FF_OOM_MONITOR2_COMPONENT |
|
872 |
|
873 TBool iStartInAlbumMenu; |
|
874 }; |
|
875 |
|
876 #endif // CMPXAPPUI_H |
|
877 |
|
878 // End of File |