|
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 "mpcommondefs.h" |
|
24 |
|
25 |
|
26 class MMPXPlaybackUtility; |
|
27 class MpMpxPlaybackFrameworkWrapper; |
|
28 class QStringList; |
|
29 class CMPXMedia; |
|
30 class MpPlaybackData; |
|
31 class XQSharableFile; |
|
32 class MpSongData; |
|
33 |
|
34 class MpMpxPlaybackFrameworkWrapperPrivate : public MMPXPlaybackObserver, |
|
35 public MMPXPlaybackCallback |
|
36 { |
|
37 public: |
|
38 |
|
39 explicit MpMpxPlaybackFrameworkWrapperPrivate( MpMpxPlaybackFrameworkWrapper *wrapper ); |
|
40 virtual ~MpMpxPlaybackFrameworkWrapperPrivate(); |
|
41 |
|
42 void init( TUid hostUid, MpSongData *songData ); |
|
43 |
|
44 void play( QString aFilename ); |
|
45 void play( const XQSharableFile& file ); |
|
46 void play(); |
|
47 void pause(); |
|
48 void playPause(); |
|
49 void stop(); |
|
50 void skipForward(); |
|
51 void startSeekForward(); |
|
52 void stopSeeking(); |
|
53 void skipBackward(); |
|
54 void startSeekBackward(); |
|
55 void setPosition( int value ); |
|
56 void setShuffle( bool mode ); |
|
57 void setRepeat( bool mode ); |
|
58 void setBalance( int balance ); |
|
59 void applyAudioEffects(); |
|
60 void applyEqualizer(); |
|
61 void getMaxVolume(); |
|
62 void getVolume(); |
|
63 void increaseVolume(); |
|
64 void decreaseVolume(); |
|
65 void setVolume( int value ); |
|
66 void getMuteState(); |
|
67 void mute(); |
|
68 void unmute(); |
|
69 void closeCurrentPlayback(); |
|
70 |
|
71 MpPlaybackData *playbackData(); |
|
72 |
|
73 void retrieveSongDetails(); |
|
74 |
|
75 private: |
|
76 |
|
77 // From MMPXPlaybackObserver |
|
78 void HandlePlaybackMessage( CMPXMessage *aMessage, TInt aError ); |
|
79 |
|
80 // From MMPXPlaybackCallback |
|
81 void HandlePropertyL( TMPXPlaybackProperty aProperty, TInt aValue, TInt aError ); |
|
82 void HandleSubPlayerNamesL( TUid aPlayer, const MDesCArray *aSubPlayers, |
|
83 TBool aComplete, TInt aError ); |
|
84 void HandleMediaL( const CMPXMedia& aProperties, TInt aError ); |
|
85 |
|
86 void DoInitL(); |
|
87 void DoPlayL( QString aFilename ); |
|
88 void DoPlayL( const XQSharableFile& file ); |
|
89 void DoHandlePlaybackMessageL( const CMPXMessage& aMessage ); |
|
90 void DoHandlePlaybackErrorL( const TInt aError ); |
|
91 void ForceStopL(); |
|
92 void UpdateStateL(); |
|
93 void DoRetrieveSongDetailsL( bool detailsRequest ); |
|
94 void DoCloseCurrentPlaybackL(); |
|
95 |
|
96 private: |
|
97 |
|
98 MpMpxPlaybackFrameworkWrapper *q_ptr; |
|
99 MMPXPlaybackUtility *iPlaybackUtility; // Own |
|
100 MpPlaybackData *iPlaybackData; // Own |
|
101 TUid iHostUid; |
|
102 |
|
103 MpSongData *iSongData; // Not owned |
|
104 bool iDetailsRequest; |
|
105 |
|
106 }; |
|
107 |
|
108 #endif // MPMPXPLAYBACKFRAMEWORKWRAPPER_P_H |