29
|
1 |
// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
/**
|
|
17 |
@file
|
|
18 |
@internalComponent
|
|
19 |
*/
|
|
20 |
|
|
21 |
#include "cmtpplaybackcommand.h"
|
|
22 |
#include "mtpplaybackcontrolpanic.h"
|
49
|
23 |
#include "OstTraceDefinitions.h"
|
|
24 |
#ifdef OST_TRACE_COMPILER_IN_USE
|
|
25 |
#include "cmtpplaybackcommandTraces.h"
|
|
26 |
#endif
|
29
|
27 |
|
|
28 |
|
|
29 |
/*********************************************
|
|
30 |
class TMTPPbDataVolume
|
|
31 |
**********************************************/
|
|
32 |
TMTPPbDataVolume::TMTPPbDataVolume(TUint32 aMax, TUint32 aMin, TUint32 aDefault, TUint32 aCurrent, TUint32 aStep):
|
|
33 |
iMaxVolume(aMax),iMinVolume(aMin), iDefaultVolume(aDefault), iCurrentVolume(aCurrent), iStep(aStep)
|
|
34 |
{
|
49
|
35 |
OstTraceFunctionEntry0( TMTPPBDATAVOLUME_TMTPPBDATAVOLUME_ENTRY );
|
29
|
36 |
__ASSERT_DEBUG((aMin < aMax), Panic(EMTPPBArgumentErr));
|
|
37 |
__ASSERT_DEBUG((aMin <= aDefault && aDefault <= aMax), Panic(EMTPPBArgumentErr));
|
|
38 |
__ASSERT_DEBUG((aMin <= aCurrent && aCurrent <= aMax), Panic(EMTPPBArgumentErr));
|
|
39 |
__ASSERT_DEBUG((aStep <= (aMax-aMin)), Panic(EMTPPBArgumentErr));
|
|
40 |
__ASSERT_DEBUG((aStep != 0), Panic(EMTPPBArgumentErr));
|
49
|
41 |
OstTraceFunctionExit0( TMTPPBDATAVOLUME_TMTPPBDATAVOLUME_EXIT );
|
29
|
42 |
}
|
|
43 |
|
|
44 |
TMTPPbDataVolume::TMTPPbDataVolume(const TMTPPbDataVolume& aVol):
|
|
45 |
iMaxVolume(aVol.MaxVolume()),
|
|
46 |
iMinVolume(aVol.MinVolume()),
|
|
47 |
iDefaultVolume(aVol.DefaultVolume()),
|
|
48 |
iCurrentVolume(aVol.CurrentVolume()),
|
|
49 |
iStep(aVol.Step())
|
|
50 |
{
|
49
|
51 |
OstTraceFunctionEntry0( DUP1_TMTPPBDATAVOLUME_TMTPPBDATAVOLUME_ENTRY );
|
29
|
52 |
|
49
|
53 |
OstTraceFunctionExit0( DUP1_TMTPPBDATAVOLUME_TMTPPBDATAVOLUME_EXIT );
|
29
|
54 |
}
|
|
55 |
|
|
56 |
void TMTPPbDataVolume::SetVolume(TUint32 aMax, TUint32 aMin, TUint32 aDefault, TUint32 aCurrent, TUint32 aStep)
|
|
57 |
{
|
49
|
58 |
OstTraceFunctionEntry0( TMTPPBDATAVOLUME_SETVOLUME_ENTRY );
|
29
|
59 |
__ASSERT_DEBUG((aMin < aMax), Panic(EMTPPBArgumentErr));
|
|
60 |
__ASSERT_DEBUG((aMin <= aDefault && aDefault <= aMax), Panic(EMTPPBArgumentErr));
|
|
61 |
__ASSERT_DEBUG((aMin <= aCurrent && aCurrent <= aMax), Panic(EMTPPBArgumentErr));
|
|
62 |
__ASSERT_DEBUG((aStep <= (aMax-aMin)), Panic(EMTPPBArgumentErr));
|
|
63 |
__ASSERT_DEBUG((aStep != 0), Panic(EMTPPBArgumentErr));
|
|
64 |
iMaxVolume = aMax;
|
|
65 |
iMinVolume = aMin;
|
|
66 |
iDefaultVolume = aDefault;
|
|
67 |
iCurrentVolume = aCurrent,
|
|
68 |
iStep = aStep;
|
49
|
69 |
OstTraceFunctionExit0( TMTPPBDATAVOLUME_SETVOLUME_EXIT );
|
29
|
70 |
}
|
|
71 |
|
|
72 |
void TMTPPbDataVolume::operator =(const TMTPPbDataVolume& aVol)
|
|
73 |
{
|
49
|
74 |
OstTraceFunctionEntry0( _ENTRY );
|
29
|
75 |
iMaxVolume = aVol.MaxVolume();
|
|
76 |
iMinVolume = aVol.MinVolume();
|
|
77 |
iDefaultVolume = aVol.DefaultVolume();
|
|
78 |
iCurrentVolume = aVol.CurrentVolume();
|
|
79 |
iStep = aVol.Step();
|
49
|
80 |
OstTraceFunctionExit0( _EXIT );
|
29
|
81 |
}
|
|
82 |
|
|
83 |
TUint32 TMTPPbDataVolume::MaxVolume() const
|
|
84 |
{
|
49
|
85 |
OstTraceFunctionEntry0( TMTPPBDATAVOLUME_MAXVOLUME_ENTRY );
|
|
86 |
OstTraceFunctionExit0( TMTPPBDATAVOLUME_MAXVOLUME_EXIT );
|
29
|
87 |
return iMaxVolume;
|
|
88 |
}
|
|
89 |
|
|
90 |
TUint32 TMTPPbDataVolume::MinVolume() const
|
|
91 |
{
|
49
|
92 |
OstTraceFunctionEntry0( TMTPPBDATAVOLUME_MINVOLUME_ENTRY );
|
|
93 |
OstTraceFunctionExit0( TMTPPBDATAVOLUME_MINVOLUME_EXIT );
|
29
|
94 |
return iMinVolume;
|
|
95 |
}
|
|
96 |
|
|
97 |
TUint32 TMTPPbDataVolume::DefaultVolume() const
|
|
98 |
{
|
49
|
99 |
OstTraceFunctionEntry0( TMTPPBDATAVOLUME_DEFAULTVOLUME_ENTRY );
|
|
100 |
OstTraceFunctionExit0( TMTPPBDATAVOLUME_DEFAULTVOLUME_EXIT );
|
29
|
101 |
return iDefaultVolume;
|
|
102 |
}
|
|
103 |
|
|
104 |
TUint32 TMTPPbDataVolume::CurrentVolume() const
|
|
105 |
{
|
49
|
106 |
OstTraceFunctionEntry0( TMTPPBDATAVOLUME_CURRENTVOLUME_ENTRY );
|
|
107 |
OstTraceFunctionExit0( TMTPPBDATAVOLUME_CURRENTVOLUME_EXIT );
|
29
|
108 |
return iCurrentVolume;
|
|
109 |
}
|
|
110 |
|
|
111 |
TUint32 TMTPPbDataVolume::Step() const
|
|
112 |
{
|
49
|
113 |
OstTraceFunctionEntry0( TMTPPBDATAVOLUME_STEP_ENTRY );
|
|
114 |
OstTraceFunctionExit0( TMTPPBDATAVOLUME_STEP_EXIT );
|
29
|
115 |
return iStep;
|
|
116 |
}
|
|
117 |
|
|
118 |
/*********************************************
|
|
119 |
class CMTPPbCmdParam
|
|
120 |
**********************************************/
|
|
121 |
|
|
122 |
CMTPPbCmdParam* CMTPPbCmdParam::NewL(TMTPPbCategory aCategory, const TDesC& aSuid)
|
|
123 |
{
|
49
|
124 |
OstTraceFunctionEntry0( CMTPPBCMDPARAM_NEWL_ENTRY );
|
29
|
125 |
CMTPPbCmdParam* self = new (ELeave) CMTPPbCmdParam(aCategory, aSuid);
|
|
126 |
CleanupStack::PushL(self);
|
|
127 |
self->ConstructL(aCategory, aSuid);
|
|
128 |
CleanupStack::Pop(self);
|
49
|
129 |
OstTraceFunctionExit0( CMTPPBCMDPARAM_NEWL_EXIT );
|
29
|
130 |
return self;
|
|
131 |
}
|
|
132 |
|
|
133 |
CMTPPbCmdParam* CMTPPbCmdParam::NewL(TInt32 aValue)
|
|
134 |
{
|
49
|
135 |
OstTraceFunctionEntry0( DUP1_CMTPPBCMDPARAM_NEWL_ENTRY );
|
29
|
136 |
CMTPPbCmdParam* self = new (ELeave) CMTPPbCmdParam(aValue);
|
|
137 |
CleanupStack::PushL(self);
|
|
138 |
self->ConstructL(aValue);
|
|
139 |
CleanupStack::Pop(self);
|
49
|
140 |
OstTraceFunctionExit0( DUP1_CMTPPBCMDPARAM_NEWL_EXIT );
|
29
|
141 |
return self;
|
|
142 |
}
|
|
143 |
|
|
144 |
CMTPPbCmdParam* CMTPPbCmdParam::NewL(TUint32 aValue)
|
|
145 |
{
|
49
|
146 |
OstTraceFunctionEntry0( DUP2_CMTPPBCMDPARAM_NEWL_ENTRY );
|
29
|
147 |
CMTPPbCmdParam* self = new (ELeave) CMTPPbCmdParam(aValue);
|
|
148 |
CleanupStack::PushL(self);
|
|
149 |
self->ConstructL(aValue);
|
|
150 |
CleanupStack::Pop(self);
|
49
|
151 |
OstTraceFunctionExit0( DUP2_CMTPPBCMDPARAM_NEWL_EXIT );
|
29
|
152 |
return self;
|
|
153 |
}
|
|
154 |
|
|
155 |
CMTPPbCmdParam* CMTPPbCmdParam::NewL(const TMTPPbDataVolume& aVolume)
|
|
156 |
{
|
49
|
157 |
OstTraceFunctionEntry0( DUP3_CMTPPBCMDPARAM_NEWL_ENTRY );
|
29
|
158 |
CMTPPbCmdParam* self = new (ELeave) CMTPPbCmdParam(aVolume);
|
|
159 |
CleanupStack::PushL(self);
|
|
160 |
self->ConstructL(aVolume);
|
|
161 |
CleanupStack::Pop(self);
|
49
|
162 |
OstTraceFunctionExit0( DUP3_CMTPPBCMDPARAM_NEWL_EXIT );
|
29
|
163 |
return self;
|
|
164 |
}
|
|
165 |
|
|
166 |
CMTPPbCmdParam* CMTPPbCmdParam::NewL(const CMTPPbCmdParam& aParam)
|
|
167 |
{
|
49
|
168 |
OstTraceFunctionEntry0( DUP4_CMTPPBCMDPARAM_NEWL_ENTRY );
|
29
|
169 |
CMTPPbCmdParam* self = new (ELeave) CMTPPbCmdParam();
|
|
170 |
CleanupStack::PushL(self);
|
|
171 |
self->ConstructL(aParam);
|
|
172 |
CleanupStack::Pop(self);
|
49
|
173 |
OstTraceFunctionExit0( DUP4_CMTPPBCMDPARAM_NEWL_EXIT );
|
29
|
174 |
return self;
|
|
175 |
}
|
|
176 |
|
|
177 |
CMTPPbCmdParam::~CMTPPbCmdParam()
|
|
178 |
{
|
49
|
179 |
OstTraceFunctionEntry0( CMTPPBCMDPARAM_CMTPPBCMDPARAM_ENTRY );
|
29
|
180 |
|
49
|
181 |
OstTraceFunctionExit0( CMTPPBCMDPARAM_CMTPPBCMDPARAM_EXIT );
|
29
|
182 |
}
|
|
183 |
|
|
184 |
CMTPPbCmdParam::CMTPPbCmdParam():
|
|
185 |
CMTPPbParamBase()
|
|
186 |
{
|
49
|
187 |
OstTraceFunctionEntry0( DUP1_CMTPPBCMDPARAM_CMTPPBCMDPARAM_ENTRY );
|
29
|
188 |
|
49
|
189 |
OstTraceFunctionExit0( DUP1_CMTPPBCMDPARAM_CMTPPBCMDPARAM_EXIT );
|
29
|
190 |
}
|
|
191 |
|
|
192 |
CMTPPbCmdParam::CMTPPbCmdParam(TMTPPbCategory aCategory, const TDesC& aSuid):
|
|
193 |
CMTPPbParamBase(aCategory, aSuid)
|
|
194 |
{
|
49
|
195 |
OstTraceFunctionEntry0( DUP2_CMTPPBCMDPARAM_CMTPPBCMDPARAM_ENTRY );
|
29
|
196 |
|
49
|
197 |
OstTraceFunctionExit0( DUP2_CMTPPBCMDPARAM_CMTPPBCMDPARAM_EXIT );
|
29
|
198 |
}
|
|
199 |
|
|
200 |
CMTPPbCmdParam::CMTPPbCmdParam(TInt32 aValue):
|
|
201 |
CMTPPbParamBase(aValue)
|
|
202 |
{
|
49
|
203 |
OstTraceFunctionEntry0( DUP3_CMTPPBCMDPARAM_CMTPPBCMDPARAM_ENTRY );
|
29
|
204 |
|
49
|
205 |
OstTraceFunctionExit0( DUP3_CMTPPBCMDPARAM_CMTPPBCMDPARAM_EXIT );
|
29
|
206 |
}
|
|
207 |
|
|
208 |
CMTPPbCmdParam::CMTPPbCmdParam(TUint32 aValue):
|
|
209 |
CMTPPbParamBase(aValue)
|
|
210 |
{
|
49
|
211 |
OstTraceFunctionEntry0( DUP4_CMTPPBCMDPARAM_CMTPPBCMDPARAM_ENTRY );
|
29
|
212 |
|
49
|
213 |
OstTraceFunctionExit0( DUP4_CMTPPBCMDPARAM_CMTPPBCMDPARAM_EXIT );
|
29
|
214 |
}
|
|
215 |
|
|
216 |
CMTPPbCmdParam::CMTPPbCmdParam(const TMTPPbDataVolume& /*aVolume*/):
|
|
217 |
CMTPPbParamBase()
|
|
218 |
{
|
49
|
219 |
OstTraceFunctionEntry0( DUP5_CMTPPBCMDPARAM_CMTPPBCMDPARAM_ENTRY );
|
29
|
220 |
CMTPPbParamBase::SetType(EMTPPbVolumeSet);
|
49
|
221 |
OstTraceFunctionExit0( DUP5_CMTPPBCMDPARAM_CMTPPBCMDPARAM_EXIT );
|
29
|
222 |
}
|
|
223 |
|
|
224 |
void CMTPPbCmdParam::ConstructL(TMTPPbCategory aCategory, const TDesC& aSuid)
|
|
225 |
{
|
49
|
226 |
OstTraceFunctionEntry0( CMTPPBCMDPARAM_CONSTRUCTL_ENTRY );
|
29
|
227 |
CMTPPbParamBase::ConstructL(aCategory, aSuid);
|
49
|
228 |
OstTraceFunctionExit0( CMTPPBCMDPARAM_CONSTRUCTL_EXIT );
|
29
|
229 |
}
|
|
230 |
|
|
231 |
void CMTPPbCmdParam::ConstructL(TInt32 aValue)
|
|
232 |
{
|
49
|
233 |
OstTraceFunctionEntry0( DUP1_CMTPPBCMDPARAM_CONSTRUCTL_ENTRY );
|
29
|
234 |
CMTPPbParamBase::ConstructL(aValue);
|
49
|
235 |
OstTraceFunctionExit0( DUP1_CMTPPBCMDPARAM_CONSTRUCTL_EXIT );
|
29
|
236 |
}
|
|
237 |
|
|
238 |
void CMTPPbCmdParam::ConstructL(TUint32 aValue)
|
|
239 |
{
|
49
|
240 |
OstTraceFunctionEntry0( DUP2_CMTPPBCMDPARAM_CONSTRUCTL_ENTRY );
|
29
|
241 |
CMTPPbParamBase::ConstructL(aValue);
|
49
|
242 |
OstTraceFunctionExit0( DUP2_CMTPPBCMDPARAM_CONSTRUCTL_EXIT );
|
29
|
243 |
}
|
|
244 |
|
|
245 |
void CMTPPbCmdParam::ConstructL(const TMTPPbDataVolume& aVolume)
|
|
246 |
{
|
49
|
247 |
OstTraceFunctionEntry0( DUP3_CMTPPBCMDPARAM_CONSTRUCTL_ENTRY );
|
29
|
248 |
TMTPPbDataVolume* val = new (ELeave) TMTPPbDataVolume(aVolume);
|
|
249 |
CMTPPbParamBase::SetData(static_cast<TAny*>(val));
|
49
|
250 |
OstTraceFunctionExit0( DUP3_CMTPPBCMDPARAM_CONSTRUCTL_EXIT );
|
29
|
251 |
}
|
|
252 |
|
|
253 |
void CMTPPbCmdParam::ConstructL(const CMTPPbCmdParam& aParam)
|
|
254 |
{
|
49
|
255 |
OstTraceFunctionEntry0( DUP4_CMTPPBCMDPARAM_CONSTRUCTL_ENTRY );
|
29
|
256 |
TMTPPbDataType type(aParam.Type());
|
|
257 |
|
|
258 |
__ASSERT_DEBUG((type > EMTPPbTypeNone && type < EMTPPbTypeEnd), Panic(EMTPPBArgumentErr));
|
49
|
259 |
__ASSERT_ALWAYS_OST((type > EMTPPbTypeNone && type < EMTPPbTypeEnd), OstTrace0( TRACE_ERROR, CMTPPBCMDPARAM_CONSTRUCTL, "Error argument" ), User::Leave(KErrArgument));
|
29
|
260 |
|
|
261 |
if(type == EMTPPbVolumeSet)
|
|
262 |
{
|
|
263 |
TMTPPbDataVolume* val = new (ELeave) TMTPPbDataVolume(aParam.VolumeSetL());
|
|
264 |
CMTPPbParamBase::SetData(static_cast<TAny*>(val));
|
|
265 |
CMTPPbParamBase::SetType(type);
|
|
266 |
}
|
|
267 |
else
|
|
268 |
{
|
|
269 |
CMTPPbParamBase::ConstructL(aParam);
|
|
270 |
}
|
49
|
271 |
OstTraceFunctionExit0( DUP4_CMTPPBCMDPARAM_CONSTRUCTL_EXIT );
|
29
|
272 |
}
|
|
273 |
|
|
274 |
const TMTPPbDataVolume& CMTPPbCmdParam::VolumeSetL() const
|
|
275 |
{
|
49
|
276 |
OstTraceFunctionEntry0( CMTPPBCMDPARAM_VOLUMESETL_ENTRY );
|
29
|
277 |
__ASSERT_DEBUG((CMTPPbParamBase::Type() == EMTPPbVolumeSet), Panic(EMTPPBDataTypeErr));
|
49
|
278 |
__ASSERT_ALWAYS_OST((CMTPPbParamBase::Type() == EMTPPbVolumeSet), OstTrace0( TRACE_ERROR, CMTPPBCMDPARAM_VOLUMESETL, "Error argument" ), User::Leave(KErrArgument));
|
|
279 |
OstTraceFunctionExit0( CMTPPBCMDPARAM_VOLUMESETL_EXIT );
|
29
|
280 |
return *static_cast<TMTPPbDataVolume*>(CMTPPbParamBase::GetData());
|
|
281 |
}
|
|
282 |
|
|
283 |
/*********************************************
|
|
284 |
class CMTPPlaybackCommand
|
|
285 |
**********************************************/
|
|
286 |
CMTPPlaybackCommand* CMTPPlaybackCommand::NewL(TMTPPlaybackCommand aCmd, CMTPPbCmdParam* aParam)
|
|
287 |
{
|
49
|
288 |
OstTraceFunctionEntry0( CMTPPLAYBACKCOMMAND_NEWL_ENTRY );
|
29
|
289 |
__ASSERT_DEBUG((aCmd > EPlaybackCmdNone && aCmd < EPlaybackCmdEnd), Panic(EMTPPBArgumentErr));
|
49
|
290 |
__ASSERT_ALWAYS_OST((aCmd > EPlaybackCmdNone && aCmd < EPlaybackCmdEnd), OstTrace0( TRACE_ERROR, CMTPPLAYBACKCOMMAND_NEWL, "Error argument" ), User::Leave(KErrArgument));
|
29
|
291 |
|
|
292 |
CMTPPlaybackCommand* self = new (ELeave) CMTPPlaybackCommand(aCmd, aParam);
|
|
293 |
CleanupStack::PushL(self);
|
|
294 |
self->ConstructL();
|
|
295 |
CleanupStack::Pop(self);
|
49
|
296 |
OstTraceFunctionExit0( CMTPPLAYBACKCOMMAND_NEWL_EXIT );
|
29
|
297 |
return self;
|
|
298 |
}
|
|
299 |
|
|
300 |
CMTPPlaybackCommand* CMTPPlaybackCommand::NewL(const CMTPPlaybackCommand& aCmd)
|
|
301 |
{
|
49
|
302 |
OstTraceFunctionEntry0( DUP1_CMTPPLAYBACKCOMMAND_NEWL_ENTRY );
|
29
|
303 |
CMTPPlaybackCommand* self = new (ELeave) CMTPPlaybackCommand(aCmd.PlaybackCommand(), NULL);
|
|
304 |
CleanupStack::PushL(self);
|
|
305 |
self->ConstructL(aCmd);
|
|
306 |
CleanupStack::Pop(self);
|
49
|
307 |
OstTraceFunctionExit0( DUP1_CMTPPLAYBACKCOMMAND_NEWL_EXIT );
|
29
|
308 |
return self;
|
|
309 |
}
|
|
310 |
|
|
311 |
/**
|
|
312 |
Destructor.
|
|
313 |
*/
|
|
314 |
CMTPPlaybackCommand::~CMTPPlaybackCommand()
|
|
315 |
{
|
49
|
316 |
OstTraceFunctionEntry0( CMTPPLAYBACKCOMMAND_CMTPPLAYBACKCOMMAND_ENTRY );
|
29
|
317 |
delete iParam;
|
49
|
318 |
OstTraceFunctionExit0( CMTPPLAYBACKCOMMAND_CMTPPLAYBACKCOMMAND_EXIT );
|
29
|
319 |
}
|
|
320 |
|
|
321 |
/**
|
|
322 |
Constructor.
|
|
323 |
*/
|
|
324 |
CMTPPlaybackCommand::CMTPPlaybackCommand(TMTPPlaybackCommand aCmd,
|
|
325 |
CMTPPbCmdParam* aParam):
|
|
326 |
iPbCmd(aCmd),iParam(aParam)
|
|
327 |
{
|
49
|
328 |
OstTraceFunctionEntry0( DUP1_CMTPPLAYBACKCOMMAND_CMTPPLAYBACKCOMMAND_ENTRY );
|
|
329 |
OstTraceFunctionExit0( DUP1_CMTPPLAYBACKCOMMAND_CMTPPLAYBACKCOMMAND_EXIT );
|
29
|
330 |
}
|
|
331 |
|
|
332 |
/**
|
|
333 |
Second-phase constructor.
|
|
334 |
*/
|
|
335 |
void CMTPPlaybackCommand::ConstructL()
|
|
336 |
{
|
49
|
337 |
OstTraceFunctionEntry0( CMTPPLAYBACKCOMMAND_CONSTRUCTL_ENTRY );
|
|
338 |
OstTraceFunctionExit0( CMTPPLAYBACKCOMMAND_CONSTRUCTL_EXIT );
|
29
|
339 |
}
|
|
340 |
|
|
341 |
/**
|
|
342 |
Second-phase constructor.
|
|
343 |
*/
|
|
344 |
void CMTPPlaybackCommand::ConstructL(const CMTPPlaybackCommand& aCmd)
|
|
345 |
{
|
49
|
346 |
OstTraceFunctionEntry0( DUP1_CMTPPLAYBACKCOMMAND_CONSTRUCTL_ENTRY );
|
29
|
347 |
if(aCmd.HasParam())
|
|
348 |
{
|
|
349 |
iParam = CMTPPbCmdParam::NewL(aCmd.ParamL());
|
49
|
350 |
}
|
|
351 |
OstTraceFunctionExit0( DUP1_CMTPPLAYBACKCOMMAND_CONSTRUCTL_EXIT );
|
29
|
352 |
}
|
|
353 |
|
|
354 |
TMTPPlaybackCommand CMTPPlaybackCommand::PlaybackCommand() const
|
|
355 |
{
|
49
|
356 |
OstTraceFunctionEntry0( CMTPPLAYBACKCOMMAND_PLAYBACKCOMMAND_ENTRY );
|
29
|
357 |
__ASSERT_DEBUG((iPbCmd > EPlaybackCmdNone && iPbCmd < EPlaybackCmdEnd), Panic(EMTPPBArgumentErr));
|
49
|
358 |
OstTraceFunctionExit0( CMTPPLAYBACKCOMMAND_PLAYBACKCOMMAND_EXIT );
|
29
|
359 |
return iPbCmd;
|
|
360 |
}
|
|
361 |
|
|
362 |
TBool CMTPPlaybackCommand::HasParam() const
|
|
363 |
{
|
49
|
364 |
OstTraceFunctionEntry0( CMTPPLAYBACKCOMMAND_HASPARAM_ENTRY );
|
29
|
365 |
TBool result(iParam != NULL);
|
49
|
366 |
OstTraceFunctionExit0( CMTPPLAYBACKCOMMAND_HASPARAM_EXIT );
|
29
|
367 |
return result;
|
|
368 |
}
|
|
369 |
|
|
370 |
const CMTPPbCmdParam& CMTPPlaybackCommand::ParamL() const
|
|
371 |
{
|
49
|
372 |
OstTraceFunctionEntry0( CMTPPLAYBACKCOMMAND_PARAML_ENTRY );
|
29
|
373 |
__ASSERT_DEBUG((iParam != NULL), Panic(EMTPPBDataNullErr));
|
49
|
374 |
__ASSERT_ALWAYS_OST((iParam != NULL), OstTrace0( TRACE_ERROR, CMTPPLAYBACKCOMMAND_PARAML, "Error argument" ), User::Leave(KErrArgument));
|
|
375 |
OstTraceFunctionExit0( CMTPPLAYBACKCOMMAND_PARAML_EXIT );
|
|
376 |
return *iParam;
|
29
|
377 |
}
|
|
378 |
|
|
379 |
void CMTPPlaybackCommand::SetParam(CMTPPbCmdParam* aParam)
|
|
380 |
{
|
49
|
381 |
OstTraceFunctionEntry0( CMTPPLAYBACKCOMMAND_SETPARAM_ENTRY );
|
29
|
382 |
delete iParam;
|
|
383 |
iParam = aParam;
|
49
|
384 |
OstTraceFunctionExit0( CMTPPLAYBACKCOMMAND_SETPARAM_EXIT );
|
29
|
385 |
}
|