|
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: mpx playback utility stub for unit testing |
|
15 * |
|
16 */ |
|
17 |
|
18 // Version : %version: 1 % |
|
19 |
|
20 #ifndef MPXPLAYBACKUTILITYIMP_STUB_H_ |
|
21 #define MPXPLAYBACKUTILITYIMP_STUB_H_ |
|
22 |
|
23 #include <mpxplaybackutility.h> |
|
24 |
|
25 #include "testvideoappuiengine.h" |
|
26 |
|
27 |
|
28 NONSHARABLE_CLASS( CMPXPlaybackUtility ) : public CBase, |
|
29 public MMPXPlaybackUtility, |
|
30 public MMPXPlayer, |
|
31 public MMPXPlayerManager, |
|
32 public MMPXSource |
|
33 { |
|
34 public: |
|
35 |
|
36 static MMPXPlaybackUtility* UtilityL(); |
|
37 |
|
38 CMPXPlaybackUtility(); |
|
39 |
|
40 void AddRefCount(); |
|
41 |
|
42 public: |
|
43 |
|
44 ~CMPXPlaybackUtility(); |
|
45 |
|
46 void AddTestObserverL( MAppUiEngineUnitTestObserver* aObserver ); |
|
47 void RemoveTestObserverL(); |
|
48 void StartPdlPlaybackUtility(); |
|
49 |
|
50 // |
|
51 // MMPXPlaybackUtility Implementation |
|
52 // |
|
53 void AddObserverL( MMPXPlaybackObserver& aObs ); |
|
54 void RemoveObserverL( MMPXPlaybackObserver& aObs ); |
|
55 void GetClientsL( RArray<TProcessId>& aClients ); |
|
56 void UpdatePlaylistL(const CMPXCollectionPlaylist& aPlaylist); |
|
57 void InitL( const CMPXCollectionPlaylist& aPlaylist, TBool aPlay=ETrue ); |
|
58 void InitL( const TDesC& aUri, const TDesC8* aType = NULL ); |
|
59 void InitL( RFile& aShareableFile ); |
|
60 void Close(); |
|
61 void CancelRequest(); |
|
62 void CommandL( TMPXPlaybackCommand aCmd, TInt aData = 0 ); |
|
63 void CommandL( CMPXCommand& aCmd, MMPXPlaybackCallback* aCallback = NULL ); |
|
64 TMPXPlaybackState StateL() const; |
|
65 MMPXSource* Source(); |
|
66 MMPXPlayerManager& PlayerManager(); |
|
67 void SetL( TMPXPlaybackProperty aProperty, TInt aValue ); |
|
68 void ValueL( MMPXPlaybackCallback& aCallback, TMPXPlaybackProperty aProperty ); |
|
69 void PropertyL( MMPXPlaybackCallback& aCallback, TMPXPlaybackProperty aProperty ); |
|
70 CDesCArray* SupportedMimeTypes(); |
|
71 CDesCArray* SupportedExtensions(); |
|
72 CDesCArray* SupportedSchemas(); |
|
73 void SetPriority( TInt aPriority ); |
|
74 void AddSubscriptionL( const CMPXSubscription& aSubscription ); |
|
75 void RemoveSubscriptionL( const CMPXSubscription& aSubscription ); |
|
76 void ClearSubscriptionsL(); |
|
77 void InitStreamingL( const TDesC& aUri, const TDesC8* aType, const TInt aAccessPoint ); |
|
78 void InitStreamingL( RFile& aShareableFile, const TInt aAccessPoint ); |
|
79 |
|
80 |
|
81 // |
|
82 // MMPXPlayerManager Implementation |
|
83 // |
|
84 void GetPlayerTypesL( RArray<TMPXPlaybackPlayerType>& aTypes ); |
|
85 HBufC* PlayerTypeDisplayNameL( TMPXPlaybackPlayerType aType ); |
|
86 void GetPlayerListL( RArray<TUid>& aPlayers ); |
|
87 void GetPlayerListL( RArray<TUid>& aPlayers, TMPXPlaybackPlayerType aType ); |
|
88 void SubPlayerNamesL( MMPXPlaybackCallback& aCallback, TUid aPlayer ); |
|
89 void SelectPlayersL( TMPXPlaybackPlayerType aType ); |
|
90 void SelectSubPlayerL( TUid aPlayer, TInt aSubPlayerIndex ); |
|
91 void SelectPlayerL( TUid aPlayer ); |
|
92 void ClearSelectPlayersL(); |
|
93 void GetSelectionL( TMPXPlaybackPlayerType& aType, |
|
94 TUid& aPlayer, |
|
95 TInt& aSubPlayerIndex, |
|
96 HBufC*& aSubPlayerName ); |
|
97 MMPXPlayer* CurrentPlayer(); |
|
98 |
|
99 // |
|
100 // MMPXPlayer Implementation |
|
101 // |
|
102 TMPXPlaybackPlayerType TypeL(); |
|
103 HBufC* TypeNameL(); |
|
104 void SubPlayerNamesL( MMPXPlaybackCallback& aCallback ); |
|
105 TInt SubPlayerL() const; |
|
106 TUid UidL() const; |
|
107 |
|
108 // |
|
109 // MPXSource Implementation |
|
110 // |
|
111 CMPXCollectionPlaylist* PlaylistL(); |
|
112 RFile* FileL(); |
|
113 HBufC* UriL(); |
|
114 void MediaL( const TArray<TMPXAttribute>& aAttrs, MMPXPlaybackCallback& aCallback ); |
|
115 void MediaL( const TArray<TMPXAttribute>& aAttrs, |
|
116 MMPXPlaybackCallback& aCallback, |
|
117 CMPXAttributeSpecs* aSpecs ); |
|
118 |
|
119 private: |
|
120 |
|
121 RArray<MMPXPlaybackObserver*> iObservers; |
|
122 MAppUiEngineUnitTestObserver* iTestObserver; |
|
123 TInt iRefCount; |
|
124 }; |
|
125 |
|
126 #endif /*MPXPLAYBACKUTILITYIMP_STUB_H_*/ |