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: mpxplaybackutility stub for testing mpmpxframeworkwrapper |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MMPXPLAYBACKUTILITY_H |
|
20 #define MMPXPLAYBACKUTILITY_H |
|
21 |
|
22 #include "stub/inc/mpxplayermanager.h" |
|
23 #include "stub/inc/mpxsource.h" |
|
24 #include <mpxplaybackframeworkdefs.h> |
|
25 #include <mpxcommand.h> |
|
26 #include <f32file.h> |
|
27 #include <BADESCA.H> |
|
28 |
|
29 //Forward declarations |
|
30 class CMPXCollectionPlaylist; |
|
31 class MMPXPlaybackObserver; |
|
32 class MMPXPlaybackCallback; |
|
33 class CAsyncCallBack; |
|
34 class CMPXSubscription; |
|
35 |
|
36 class MMPXPlaybackUtility |
|
37 { |
|
38 public: |
|
39 ~MMPXPlaybackUtility(); |
|
40 |
|
41 protected: |
|
42 MMPXPlaybackUtility(); |
|
43 void ConstructL(); |
|
44 |
|
45 public: // MMPXPlaybackUtility's overridden (stubbed by us) functions |
|
46 static MMPXPlaybackUtility* NewL(const TUid& aModeId = KPbModeDefault, |
|
47 MMPXPlaybackObserver* aObs=NULL); |
|
48 |
|
49 static MMPXPlaybackUtility* NewL(const TMPXCategory aCategory, |
|
50 const TUid& aModeId = KPbModeDefault, |
|
51 MMPXPlaybackObserver* aObs=NULL); |
|
52 static MMPXPlaybackUtility* UtilityL(const TUid& aModeId = KPbModeDefault ); |
|
53 static MMPXPlaybackUtility* UtilityL(const TMPXCategory aCategory, |
|
54 const TUid& aModeId = KPbModeDefault ); |
|
55 |
|
56 public: // MMPXPlaybackUtility stubbed pure virtuals |
|
57 void AddObserverL(MMPXPlaybackObserver& aPlaybackObserver); |
|
58 void RemoveObserverL(MMPXPlaybackObserver& aPlaybackObserver); |
|
59 void GetClientsL(RArray<TProcessId>& aClients); |
|
60 void InitL(const CMPXCollectionPlaylist& aPlaylist, TBool aPlay=ETrue); |
|
61 void InitL(const TDesC& aUri, const TDesC8* aType=NULL); |
|
62 void InitL(RFile& aShareableFile); |
|
63 void Close(); |
|
64 void CancelRequest(); |
|
65 void CommandL(TMPXPlaybackCommand aCmd, TInt aData=0); |
|
66 void CommandL(CMPXCommand& aCmd, MMPXPlaybackCallback* aCallback=NULL); |
|
67 TMPXPlaybackState StateL() const; |
|
68 MMPXSource* Source(); |
|
69 MMPXPlayerManager& PlayerManager(); |
|
70 void SetL(TMPXPlaybackProperty aProperty, TInt aValue); |
|
71 void ValueL(MMPXPlaybackCallback& aCallback, TMPXPlaybackProperty aProperty); |
|
72 void PropertyL(MMPXPlaybackCallback& aCallback, TMPXPlaybackProperty aProperty); |
|
73 CDesCArray* SupportedMimeTypes(); |
|
74 CDesCArray* SupportedExtensions(); |
|
75 CDesCArray* SupportedSchemas(); |
|
76 void SetPriority( TInt aPriority ); |
|
77 void AddSubscriptionL(const CMPXSubscription& aSubscription); |
|
78 void RemoveSubscriptionL(const CMPXSubscription& aSubscription); |
|
79 void ClearSubscriptionsL(); |
|
80 void InitStreamingL(const TDesC& aUri, const TDesC8* aType, const TInt aAccessPoint); |
|
81 void InitStreamingL(RFile& aShareableFile, const TInt aAccessPoint); |
|
82 |
|
83 private: |
|
84 MMPXSource* iMpxSource; |
|
85 MMPXPlayerManager* iMpxPlayerManager; |
|
86 MMPXPlaybackObserver* iPlaybackObserver; |
|
87 MMPXPlaybackCallback* iPlaybackCallback; |
|
88 TMPXPlaybackState iState; |
|
89 CAsyncCallBack* iOneShot; |
|
90 |
|
91 private: |
|
92 static MMPXPlaybackUtility* singleton; |
|
93 }; |
|
94 |
|
95 #endif // MMPXPLAYBACKUTILITY_H |
|
96 |
|