|
1 /* |
|
2 * Copyright (c) 2010 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: |
|
15 * |
|
16 */ |
|
17 #ifndef MUSICPROVIDER_H_ |
|
18 #define MUSICPROVIDER_H_ |
|
19 |
|
20 #include <e32base.h> |
|
21 #include <mpxplaybackobserver.h> |
|
22 #include <mpxplaybackutility.h> |
|
23 |
|
24 |
|
25 class MNowPlayObserver; |
|
26 |
|
27 class CMusicProvider: public MMPXPlaybackObserver, |
|
28 public MMPXPlaybackCallback |
|
29 { |
|
30 public: |
|
31 static CMusicProvider* NewL(MNowPlayObserver* aOb); |
|
32 ~CMusicProvider(); |
|
33 void StartTestL(); |
|
34 void RequestMediaL(); |
|
35 |
|
36 private: |
|
37 CMusicProvider(MNowPlayObserver* aOb); |
|
38 void ConstructL(); |
|
39 |
|
40 public: |
|
41 //From MMPXPlaybackObserver |
|
42 void HandlePlaybackMessage( CMPXMessage* aMessage, TInt aError ); |
|
43 |
|
44 |
|
45 //Callbacks from MMPXPlaybackCallback |
|
46 void HandlePropertyL(TMPXPlaybackProperty aProperty, |
|
47 TInt aValue, |
|
48 TInt aError); |
|
49 |
|
50 void HandleSubPlayerNamesL(TUid aPlayer, |
|
51 const MDesCArray* aSubPlayers, |
|
52 TBool aComplete, |
|
53 TInt aError |
|
54 ); |
|
55 |
|
56 void HandleMediaL(const CMPXMedia& aProperties, |
|
57 TInt aError); |
|
58 |
|
59 |
|
60 void DoHandlePlaybackMessageL( const CMPXMessage& aMessage ); |
|
61 |
|
62 private: |
|
63 MMPXPlaybackUtility* iPlaybackUtility; |
|
64 RBuf iBuf; |
|
65 MNowPlayObserver* iObserver; |
|
66 RBuf iPreviousTrack; |
|
67 |
|
68 |
|
69 }; |
|
70 |
|
71 #endif /* MUSICPROVIDER_H_ */ |