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 #include <Qt> |
|
19 #include <mpxcollectionplaylist.h> |
|
20 #include <mptrace.h> |
|
21 |
|
22 #include "stub/inc/mpxplaybackutility.h" |
|
23 |
|
24 /*! |
|
25 Stub function. |
|
26 */ |
|
27 MMPXPlaybackUtility::MMPXPlaybackUtility():iProperty(EPbPropertyVolume), |
|
28 iObs(0), |
|
29 iValue(0), |
|
30 iState(EPbStateNotInitialised), |
|
31 iAttrs(0), |
|
32 iCMPXCmd(0) |
|
33 { |
|
34 } |
|
35 |
|
36 /*! |
|
37 Stub function. |
|
38 */ |
|
39 MMPXPlaybackUtility::~MMPXPlaybackUtility() |
|
40 { |
|
41 } |
|
42 |
|
43 /*! |
|
44 Stub function. |
|
45 */ |
|
46 MMPXPlaybackUtility* MMPXPlaybackUtility::UtilityL(const TUid& aModeId) |
|
47 { |
|
48 Q_UNUSED(aModeId); |
|
49 static MMPXPlaybackUtility playbackUtilility; |
|
50 return &playbackUtilility; |
|
51 } |
|
52 |
|
53 /*! |
|
54 Stub function. |
|
55 */ |
|
56 void MMPXPlaybackUtility::AddObserverL(MMPXPlaybackObserver& aObs) |
|
57 { |
|
58 iObs = &aObs; |
|
59 } |
|
60 |
|
61 /*! |
|
62 Stub function. |
|
63 */ |
|
64 void MMPXPlaybackUtility::RemoveObserverL(MMPXPlaybackObserver& aObs) |
|
65 { |
|
66 if(iObs == &aObs){ |
|
67 iObs = 0; |
|
68 } |
|
69 } |
|
70 |
|
71 /*! |
|
72 Stub function. |
|
73 */ |
|
74 void MMPXPlaybackUtility::Close() |
|
75 { |
|
76 } |
|
77 |
|
78 /*! |
|
79 Stub function. |
|
80 */ |
|
81 void MMPXPlaybackUtility::CommandL(TMPXPlaybackCommand aCmd,TInt aData) |
|
82 { |
|
83 Q_UNUSED(aData); |
|
84 iCmd = aCmd; |
|
85 } |
|
86 |
|
87 /*! |
|
88 Stub function. |
|
89 */ |
|
90 void MMPXPlaybackUtility::CommandL(CMPXCommand& aCmd, MMPXPlaybackCallback* aCallback) |
|
91 { |
|
92 Q_UNUSED(aCallback); |
|
93 if(iCMPXCmd){ |
|
94 delete iCMPXCmd; |
|
95 iCMPXCmd = 0; |
|
96 } |
|
97 iCMPXCmd = CMPXCommand::NewL(aCmd); |
|
98 } |
|
99 |
|
100 /*! |
|
101 Stub function. |
|
102 */ |
|
103 MMPXSource* MMPXPlaybackUtility::Source() |
|
104 { |
|
105 return this; |
|
106 } |
|
107 |
|
108 /*! |
|
109 Stub function. |
|
110 */ |
|
111 void MMPXPlaybackUtility::SetL(TMPXPlaybackProperty aProperty, TInt aValue) |
|
112 { |
|
113 iProperty = aProperty; |
|
114 iValue = aValue; |
|
115 } |
|
116 |
|
117 /*! |
|
118 Stub function. |
|
119 */ |
|
120 TMPXPlaybackState MMPXPlaybackUtility::StateL() const |
|
121 { |
|
122 return iState; |
|
123 } |
|
124 |
|
125 /*! |
|
126 Stub function. |
|
127 */ |
|
128 CMPXCollectionPlaylist* MMPXPlaybackUtility::PlaylistL() |
|
129 { |
|
130 CMPXCollectionPlaylist* temp = CMPXCollectionPlaylist::NewL(); |
|
131 return temp; |
|
132 } |
|
133 |
|
134 /*! |
|
135 Stub function. |
|
136 */ |
|
137 void MMPXPlaybackUtility::MediaL(const TArray<TMPXAttribute>& aAttrs, |
|
138 MMPXPlaybackCallback& aCallback) |
|
139 { |
|
140 Q_UNUSED(aCallback); |
|
141 RArray<TMPXAttribute> attrs; |
|
142 CleanupClosePushL(attrs); |
|
143 for(TInt i = 0; i < aAttrs.Count(); i++){ |
|
144 attrs.AppendL(aAttrs[i]); |
|
145 } |
|
146 iAttrs = new RArray<TMPXAttribute>(attrs); |
|
147 CleanupStack::PopAndDestroy(&attrs); |
|
148 |
|
149 } |
|
150 //end of file |
|