36
|
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 |
*/
|
45
|
27 |
MMPXPlaybackUtility::MMPXPlaybackUtility():iValue(0),
|
|
28 |
iComandData(0),
|
|
29 |
iProperty(EPbPropertyVolume),
|
36
|
30 |
iObs(0),
|
45
|
31 |
iCMPXCmd(0),
|
36
|
32 |
iState(EPbStateNotInitialised),
|
|
33 |
iAttrs(0),
|
|
34 |
iInitialized(false),
|
|
35 |
iReturnSource(true)
|
|
36 |
{
|
|
37 |
}
|
|
38 |
|
|
39 |
/*!
|
|
40 |
Stub function.
|
|
41 |
*/
|
|
42 |
MMPXPlaybackUtility::~MMPXPlaybackUtility()
|
|
43 |
{
|
|
44 |
}
|
|
45 |
|
|
46 |
/*!
|
|
47 |
Stub function.
|
|
48 |
*/
|
|
49 |
MMPXPlaybackUtility* MMPXPlaybackUtility::UtilityL(const TUid& aModeId)
|
|
50 |
{
|
|
51 |
Q_UNUSED(aModeId);
|
|
52 |
static MMPXPlaybackUtility playbackUtilility;
|
|
53 |
return &playbackUtilility;
|
|
54 |
}
|
|
55 |
|
|
56 |
/*!
|
|
57 |
Stub function.
|
|
58 |
*/
|
|
59 |
void MMPXPlaybackUtility::AddObserverL(MMPXPlaybackObserver& aObs)
|
|
60 |
{
|
|
61 |
iObs = &aObs;
|
|
62 |
}
|
|
63 |
|
|
64 |
/*!
|
|
65 |
Stub function.
|
|
66 |
*/
|
|
67 |
void MMPXPlaybackUtility::RemoveObserverL(MMPXPlaybackObserver& aObs)
|
|
68 |
{
|
|
69 |
if(iObs == &aObs){
|
|
70 |
iObs = 0;
|
|
71 |
}
|
|
72 |
}
|
|
73 |
|
|
74 |
/*!
|
|
75 |
Stub function.
|
|
76 |
*/
|
|
77 |
void MMPXPlaybackUtility::Close()
|
|
78 |
{
|
|
79 |
}
|
|
80 |
|
|
81 |
/*!
|
|
82 |
Stub function.
|
|
83 |
*/
|
|
84 |
void MMPXPlaybackUtility::CommandL(TMPXPlaybackCommand aCmd,TInt aData)
|
|
85 |
{
|
|
86 |
iComandData = aData;
|
|
87 |
iCmd = aCmd;
|
|
88 |
}
|
|
89 |
|
|
90 |
/*!
|
|
91 |
Stub function.
|
|
92 |
*/
|
|
93 |
void MMPXPlaybackUtility::CommandL(CMPXCommand& aCmd, MMPXPlaybackCallback* aCallback)
|
|
94 |
{
|
|
95 |
Q_UNUSED(aCallback);
|
|
96 |
if(iCMPXCmd){
|
|
97 |
delete iCMPXCmd;
|
|
98 |
iCMPXCmd = 0;
|
|
99 |
}
|
|
100 |
iCMPXCmd = CMPXCommand::NewL(aCmd);
|
|
101 |
}
|
|
102 |
|
|
103 |
/*!
|
|
104 |
Stub function.
|
|
105 |
*/
|
|
106 |
MMPXSource* MMPXPlaybackUtility::Source()
|
|
107 |
{
|
|
108 |
if (iReturnSource) {
|
|
109 |
return this;
|
|
110 |
}
|
|
111 |
else {
|
|
112 |
return NULL;
|
|
113 |
}
|
|
114 |
}
|
|
115 |
|
|
116 |
/*!
|
|
117 |
Stub function.
|
|
118 |
*/
|
|
119 |
void MMPXPlaybackUtility::SetL(TMPXPlaybackProperty aProperty, TInt aValue)
|
|
120 |
{
|
|
121 |
iProperty = aProperty;
|
|
122 |
iValue = aValue;
|
|
123 |
}
|
|
124 |
|
|
125 |
/*!
|
|
126 |
Stub function.
|
|
127 |
*/
|
|
128 |
TMPXPlaybackState MMPXPlaybackUtility::StateL() const
|
|
129 |
{
|
|
130 |
return iState;
|
|
131 |
}
|
|
132 |
|
|
133 |
/*!
|
|
134 |
Stub function.
|
|
135 |
*/
|
|
136 |
CMPXCollectionPlaylist* MMPXPlaybackUtility::PlaylistL()
|
|
137 |
{
|
|
138 |
CMPXCollectionPlaylist* temp = CMPXCollectionPlaylist::NewL();
|
|
139 |
return temp;
|
|
140 |
}
|
|
141 |
|
|
142 |
/*!
|
|
143 |
Stub function.
|
|
144 |
*/
|
|
145 |
void MMPXPlaybackUtility::MediaL(const TArray<TMPXAttribute>& aAttrs,
|
|
146 |
MMPXPlaybackCallback& aCallback)
|
|
147 |
{
|
|
148 |
Q_UNUSED(aCallback);
|
|
149 |
RArray<TMPXAttribute> attrs;
|
|
150 |
CleanupClosePushL(attrs);
|
|
151 |
for(TInt i = 0; i < aAttrs.Count(); i++){
|
|
152 |
attrs.AppendL(aAttrs[i]);
|
|
153 |
}
|
|
154 |
iAttrs = new RArray<TMPXAttribute>(attrs);
|
|
155 |
CleanupStack::PopAndDestroy(&attrs);
|
|
156 |
|
|
157 |
}
|
|
158 |
|
|
159 |
void MMPXPlaybackUtility::InitL(const TDesC& aUri,const TDesC8* aType)
|
|
160 |
{
|
|
161 |
Q_UNUSED(aType);
|
|
162 |
if ( aUri.Length() )
|
|
163 |
{
|
|
164 |
iInitialized = true;
|
|
165 |
}
|
|
166 |
}
|
|
167 |
|
|
168 |
void MMPXPlaybackUtility::InitL(RFile& aShareableFile)
|
|
169 |
{
|
|
170 |
Q_UNUSED(aShareableFile)
|
|
171 |
iInitialized = true;
|
|
172 |
}
|
|
173 |
//end of file
|