|
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: Framework wraper for Playback - Private. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MPMPXPLAYBACKFRAMEWORKWRAPPER_P_H |
|
19 #define MPMPXPLAYBACKFRAMEWORKWRAPPER_P_H |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <mpxplaybackobserver.h> |
|
23 #include "mpmpxcollectionviewdefs.h" |
|
24 #include "mpcommondefs.h" |
|
25 |
|
26 |
|
27 class MMPXPlaybackUtility; |
|
28 class MpMpxPlaybackFrameworkWrapper; |
|
29 class QStringList; |
|
30 class CMPXMedia; |
|
31 class MpPlaybackData; |
|
32 class XQSharableFile; |
|
33 |
|
34 |
|
35 class MpMpxPlaybackFrameworkWrapperPrivate : public MMPXPlaybackObserver, |
|
36 public MMPXPlaybackCallback |
|
37 { |
|
38 public: |
|
39 |
|
40 explicit MpMpxPlaybackFrameworkWrapperPrivate( MpMpxPlaybackFrameworkWrapper *wrapper ); |
|
41 virtual ~MpMpxPlaybackFrameworkWrapperPrivate(); |
|
42 |
|
43 void init( MpCommon::MpViewMode viewMode, TUid hostUid ); |
|
44 |
|
45 void play( QString aFilename ); |
|
46 void play( const XQSharableFile& file ); |
|
47 void playPause(); |
|
48 void stop(); |
|
49 void skipForward(); |
|
50 void skipBackward(); |
|
51 void setPosition( int value ); |
|
52 void setShuffle( bool mode ); |
|
53 void setRepeat( bool mode ); |
|
54 |
|
55 MpPlaybackData *playbackData(); |
|
56 |
|
57 // From MMPXPlaybackObserver |
|
58 void HandlePlaybackMessage( CMPXMessage *aMessage, TInt aError ); |
|
59 |
|
60 // From MMPXPlaybackCallback |
|
61 void HandlePropertyL( TMPXPlaybackProperty aProperty, TInt aValue, TInt aError ); |
|
62 void HandleSubPlayerNamesL( TUid aPlayer, const MDesCArray *aSubPlayers, |
|
63 TBool aComplete, TInt aError ); |
|
64 void HandleMediaL( const CMPXMedia& aProperties, TInt aError ); |
|
65 |
|
66 private: |
|
67 |
|
68 void DoInitL(); |
|
69 void DoPlayL( QString aFilename ); |
|
70 void DoPlayL( const XQSharableFile& file ); |
|
71 void DoHandlePlaybackMessageL( const CMPXMessage& aMessage ); |
|
72 void ForceStopL(); |
|
73 void UpdateStateL(); |
|
74 void RetrieveSongDetailsL(); |
|
75 |
|
76 private: |
|
77 |
|
78 MpMpxPlaybackFrameworkWrapper *q_ptr; |
|
79 MMPXPlaybackUtility *iPlaybackUtility; // Own |
|
80 CMPXMedia *iMedia; // Own |
|
81 MpPlaybackData *iPlaybackData; // Own |
|
82 MpCommon::MpViewMode iViewMode; |
|
83 TUid mHostUid; |
|
84 |
|
85 }; |
|
86 |
|
87 #endif // MPMPXPLAYBACKFRAMEWORKWRAPPER_P_H |