28 #include "cmtpplaybackmap.h" |
28 #include "cmtpplaybackmap.h" |
29 #include "cmtpplaybackproperty.h" |
29 #include "cmtpplaybackproperty.h" |
30 #include "mmtpplaybackinterface.h" |
30 #include "mmtpplaybackinterface.h" |
31 #include "cmtpplaybackevent.h" |
31 #include "cmtpplaybackevent.h" |
32 #include "mtpplaybackcontrolpanic.h" |
32 #include "mtpplaybackcontrolpanic.h" |
33 |
33 #include "OstTraceDefinitions.h" |
34 |
34 #ifdef OST_TRACE_COMPILER_IN_USE |
35 // Class constants. |
35 #include "cmtpplaybackcontroldpTraces.h" |
36 __FLOG_STMT(_LIT8(KComponent,"PlaybackControlDataProvider");) |
36 #endif |
|
37 |
|
38 |
37 static const TInt KMTPPlaybackControlDpSessionGranularity(3); |
39 static const TInt KMTPPlaybackControlDpSessionGranularity(3); |
38 |
40 |
39 /** |
41 /** |
40 MTP playback control data provider plug-in factory method. |
42 MTP playback control data provider plug-in factory method. |
41 @return A pointer to an MTP playback control data provider plug-in. Ownership IS |
43 @return A pointer to an MTP playback control data provider plug-in. Ownership IS |
42 transfered. |
44 transfered. |
43 @leave One of the system wide error codes, if a processing failure occurs. |
45 @leave One of the system wide error codes, if a processing failure occurs. |
44 */ |
46 */ |
45 TAny* CMTPPlaybackControlDataProvider::NewL(TAny* aParams) |
47 TAny* CMTPPlaybackControlDataProvider::NewL(TAny* aParams) |
46 { |
48 { |
|
49 OstTraceFunctionEntry0( CMTPPLAYBACKCONTROLDATAPROVIDER_NEWL_ENTRY ); |
47 CMTPPlaybackControlDataProvider* self = new (ELeave) CMTPPlaybackControlDataProvider(aParams); |
50 CMTPPlaybackControlDataProvider* self = new (ELeave) CMTPPlaybackControlDataProvider(aParams); |
48 CleanupStack::PushL(self); |
51 CleanupStack::PushL(self); |
49 self->ConstructL(); |
52 self->ConstructL(); |
50 CleanupStack::Pop(self); |
53 CleanupStack::Pop(self); |
|
54 OstTraceFunctionExit0( CMTPPLAYBACKCONTROLDATAPROVIDER_NEWL_EXIT ); |
51 return self; |
55 return self; |
52 } |
56 } |
53 |
57 |
54 /** |
58 /** |
55 Destructor |
59 Destructor |
56 */ |
60 */ |
57 CMTPPlaybackControlDataProvider::~CMTPPlaybackControlDataProvider() |
61 CMTPPlaybackControlDataProvider::~CMTPPlaybackControlDataProvider() |
58 { |
62 { |
59 __FLOG(_L8("~CMTPPlaybackControlDataProvider - Entry")); |
63 OstTraceFunctionEntry0( CMTPPLAYBACKCONTROLDATAPROVIDER_CMTPPLAYBACKCONTROLDATAPROVIDER_ENTRY ); |
60 TInt count = iActiveProcessors.Count(); |
64 TInt count = iActiveProcessors.Count(); |
61 while(count--) |
65 while(count--) |
62 { |
66 { |
63 iActiveProcessors[count]->Release(); |
67 iActiveProcessors[count]->Release(); |
64 } |
68 } |
67 delete iPlaybackProperty; |
71 delete iPlaybackProperty; |
68 if(iPlaybackControl) |
72 if(iPlaybackControl) |
69 { |
73 { |
70 iPlaybackControl->Close(); |
74 iPlaybackControl->Close(); |
71 } |
75 } |
72 __FLOG(_L8("~CMTPPlaybackControlDataProvider - Exit")); |
76 OstTraceFunctionExit0( CMTPPLAYBACKCONTROLDATAPROVIDER_CMTPPLAYBACKCONTROLDATAPROVIDER_EXIT ); |
73 __FLOG_CLOSE; |
|
74 } |
77 } |
75 |
78 |
76 void CMTPPlaybackControlDataProvider::Cancel() |
79 void CMTPPlaybackControlDataProvider::Cancel() |
77 { |
80 { |
78 |
81 OstTraceFunctionEntry0( CMTPPLAYBACKCONTROLDATAPROVIDER_CANCEL_ENTRY ); |
|
82 |
|
83 OstTraceFunctionExit0( CMTPPLAYBACKCONTROLDATAPROVIDER_CANCEL_EXIT ); |
79 } |
84 } |
80 |
85 |
81 void CMTPPlaybackControlDataProvider::ProcessEventL(const TMTPTypeEvent& /*aEvent*/, MMTPConnection& /*aConnection*/) |
86 void CMTPPlaybackControlDataProvider::ProcessEventL(const TMTPTypeEvent& /*aEvent*/, MMTPConnection& /*aConnection*/) |
82 { |
87 { |
83 __FLOG(_L8("ProcessEventL - Entry")); |
88 OstTraceFunctionEntry0( CMTPPLAYBACKCONTROLDATAPROVIDER_PROCESSEVENTL_ENTRY ); |
84 __FLOG(_L8("ProcessEventL - Exit")); |
89 OstTraceFunctionExit0( CMTPPLAYBACKCONTROLDATAPROVIDER_PROCESSEVENTL_EXIT ); |
85 } |
90 } |
86 |
91 |
87 void CMTPPlaybackControlDataProvider::ProcessNotificationL(TMTPNotification aNotification, const TAny* aParams) |
92 void CMTPPlaybackControlDataProvider::ProcessNotificationL(TMTPNotification aNotification, const TAny* aParams) |
88 { |
93 { |
89 __FLOG(_L8("ProcessNotificationL - Entry")); |
94 OstTraceFunctionEntry0( CMTPPLAYBACKCONTROLDATAPROVIDER_PROCESSNOTIFICATIONL_ENTRY ); |
90 switch (aNotification) |
95 switch (aNotification) |
91 { |
96 { |
92 case EMTPSessionClosed: |
97 case EMTPSessionClosed: |
93 SessionClosedL(*reinterpret_cast<const TMTPNotificationParamsSessionChange*>(aParams)); |
98 SessionClosedL(*reinterpret_cast<const TMTPNotificationParamsSessionChange*>(aParams)); |
94 break; |
99 break; |
98 break; |
103 break; |
99 default: |
104 default: |
100 // Ignore all other notifications. |
105 // Ignore all other notifications. |
101 break; |
106 break; |
102 } |
107 } |
103 __FLOG(_L8("ProcessNotificationL - Exit")); |
108 OstTraceFunctionExit0( CMTPPLAYBACKCONTROLDATAPROVIDER_PROCESSNOTIFICATIONL_EXIT ); |
104 } |
109 } |
105 |
110 |
106 void CMTPPlaybackControlDataProvider::ProcessRequestPhaseL(TMTPTransactionPhase aPhase, const TMTPTypeRequest& aRequest, MMTPConnection& aConnection) |
111 void CMTPPlaybackControlDataProvider::ProcessRequestPhaseL(TMTPTransactionPhase aPhase, const TMTPTypeRequest& aRequest, MMTPConnection& aConnection) |
107 { |
112 { |
108 __FLOG(_L8("ProcessRequestPhaseL - Entry")); |
113 OstTraceFunctionEntry0( CMTPPLAYBACKCONTROLDATAPROVIDER_PROCESSREQUESTPHASEL_ENTRY ); |
109 TInt index = LocateRequestProcessorL(aRequest, aConnection); |
114 TInt index = LocateRequestProcessorL(aRequest, aConnection); |
110 __ASSERT_DEBUG(index != KErrNotFound, Panic(EMTPPBArgumentErr)); |
115 __ASSERT_DEBUG(index != KErrNotFound, Panic(EMTPPBArgumentErr)); |
111 MMTPRequestProcessor* processor = iActiveProcessors[index]; |
116 MMTPRequestProcessor* processor = iActiveProcessors[index]; |
112 iActiveProcessor = index; |
117 iActiveProcessor = index; |
113 iActiveProcessorRemoved = EFalse; |
118 iActiveProcessorRemoved = EFalse; |
120 { |
125 { |
121 processor->Release(); |
126 processor->Release(); |
122 iActiveProcessors.Remove(index); |
127 iActiveProcessors.Remove(index); |
123 } |
128 } |
124 iActiveProcessor = -1; |
129 iActiveProcessor = -1; |
125 __FLOG(_L8("ProcessRequestPhaseL - Exit")); |
130 OstTraceFunctionExit0( CMTPPLAYBACKCONTROLDATAPROVIDER_PROCESSREQUESTPHASEL_EXIT ); |
126 } |
131 } |
127 |
132 |
128 void CMTPPlaybackControlDataProvider::Supported(TMTPSupportCategory aCategory, RArray<TUint>& aArray) const |
133 void CMTPPlaybackControlDataProvider::Supported(TMTPSupportCategory aCategory, RArray<TUint>& aArray) const |
129 { |
134 { |
130 __FLOG(_L8("Supported - Entry")); |
135 OstTraceFunctionEntry0( CMTPPLAYBACKCONTROLDATAPROVIDER_SUPPORTED_ENTRY ); |
131 |
136 |
132 switch (aCategory) |
137 switch (aCategory) |
133 { |
138 { |
134 case EDeviceProperties: |
139 case EDeviceProperties: |
135 { |
140 { |
175 CMTPDataProviderPlugin(aParams), |
180 CMTPDataProviderPlugin(aParams), |
176 iActiveProcessors(KMTPPlaybackControlDpSessionGranularity), |
181 iActiveProcessors(KMTPPlaybackControlDpSessionGranularity), |
177 iActiveProcessor(-1), |
182 iActiveProcessor(-1), |
178 iRequestToResetPbCtrl(EFalse) |
183 iRequestToResetPbCtrl(EFalse) |
179 { |
184 { |
180 |
185 OstTraceFunctionEntry0( DUP1_CMTPPLAYBACKCONTROLDATAPROVIDER_CMTPPLAYBACKCONTROLDATAPROVIDER_ENTRY ); |
|
186 |
|
187 OstTraceFunctionExit0( DUP1_CMTPPLAYBACKCONTROLDATAPROVIDER_CMTPPLAYBACKCONTROLDATAPROVIDER_EXIT ); |
181 } |
188 } |
182 |
189 |
183 /** |
190 /** |
184 Second phase constructor. |
191 Second phase constructor. |
185 */ |
192 */ |
186 void CMTPPlaybackControlDataProvider::ConstructL() |
193 void CMTPPlaybackControlDataProvider::ConstructL() |
187 { |
194 { |
188 __FLOG_OPEN(KMTPSubsystem, KComponent); |
195 OstTraceFunctionEntry0( CMTPPLAYBACKCONTROLDATAPROVIDER_CONSTRUCTL_ENTRY ); |
189 __FLOG(_L8("ConstructL - Entry")); |
|
190 iPlaybackProperty = CMTPPlaybackProperty::NewL(); |
196 iPlaybackProperty = CMTPPlaybackProperty::NewL(); |
191 iPlaybackMap = CMTPPlaybackMap::NewL(Framework(),*iPlaybackProperty); |
197 iPlaybackMap = CMTPPlaybackMap::NewL(Framework(),*iPlaybackProperty); |
192 __FLOG(_L8("ConstructL - Exit")); |
198 OstTraceFunctionExit0( CMTPPLAYBACKCONTROLDATAPROVIDER_CONSTRUCTL_EXIT ); |
193 } |
199 } |
194 |
200 |
195 void CMTPPlaybackControlDataProvider::SendEventL(TMTPDevicePropertyCode aPropCode) |
201 void CMTPPlaybackControlDataProvider::SendEventL(TMTPDevicePropertyCode aPropCode) |
196 { |
202 { |
197 __FLOG(_L8("SendEventL - Entry")); |
203 OstTraceFunctionEntry0( CMTPPLAYBACKCONTROLDATAPROVIDER_SENDEVENTL_ENTRY ); |
198 iEvent.Reset(); |
204 iEvent.Reset(); |
199 iEvent.SetUint16(TMTPTypeEvent::EEventCode, EMTPEventCodeDevicePropChanged ); |
205 iEvent.SetUint16(TMTPTypeEvent::EEventCode, EMTPEventCodeDevicePropChanged ); |
200 iEvent.SetUint32(TMTPTypeEvent::EEventSessionID, KMTPSessionAll); |
206 iEvent.SetUint32(TMTPTypeEvent::EEventSessionID, KMTPSessionAll); |
201 iEvent.SetUint32(TMTPTypeEvent::EEventTransactionID, KMTPTransactionIdNone); |
207 iEvent.SetUint32(TMTPTypeEvent::EEventTransactionID, KMTPTransactionIdNone); |
202 iEvent.SetUint32(TMTPTypeEvent::EEventParameter1, aPropCode); |
208 iEvent.SetUint32(TMTPTypeEvent::EEventParameter1, aPropCode); |
203 Framework().SendEventL(iEvent); |
209 Framework().SendEventL(iEvent); |
204 __FLOG(_L8("SendEventL - Exit")); |
210 OstTraceFunctionExit0( CMTPPLAYBACKCONTROLDATAPROVIDER_SENDEVENTL_EXIT ); |
205 } |
211 } |
206 |
212 |
207 /** |
213 /** |
208 Find or create a request processor that can process the request |
214 Find or create a request processor that can process the request |
209 @param aRequest The request to be processed |
215 @param aRequest The request to be processed |
210 @param aConnection The connection from which the request comes |
216 @param aConnection The connection from which the request comes |
211 @return the index of the found/created request processor |
217 @return the index of the found/created request processor |
212 */ |
218 */ |
213 TInt CMTPPlaybackControlDataProvider::LocateRequestProcessorL(const TMTPTypeRequest& aRequest, MMTPConnection& aConnection) |
219 TInt CMTPPlaybackControlDataProvider::LocateRequestProcessorL(const TMTPTypeRequest& aRequest, MMTPConnection& aConnection) |
214 { |
220 { |
215 __FLOG(_L8("LocateRequestProcessorL - Entry")); |
221 OstTraceFunctionEntry0( CMTPPLAYBACKCONTROLDATAPROVIDER_LOCATEREQUESTPROCESSORL_ENTRY ); |
216 TInt index = KErrNotFound; |
222 TInt index = KErrNotFound; |
217 TInt count = iActiveProcessors.Count(); |
223 TInt count = iActiveProcessors.Count(); |
218 for(TInt i = 0; i < count; i++) |
224 for(TInt i = 0; i < count; i++) |
219 { |
225 { |
220 if(iActiveProcessors[i]->Match(aRequest, aConnection)) |
226 if(iActiveProcessors[i]->Match(aRequest, aConnection)) |
231 iActiveProcessors.AppendL(processor); |
237 iActiveProcessors.AppendL(processor); |
232 CleanupStack::Pop(); |
238 CleanupStack::Pop(); |
233 index = count; |
239 index = count; |
234 } |
240 } |
235 |
241 |
236 __FLOG(_L8("LocateRequestProcessorL - Exit")); |
242 OstTraceFunctionExit0( CMTPPLAYBACKCONTROLDATAPROVIDER_LOCATEREQUESTPROCESSORL_EXIT ); |
237 return index; |
243 return index; |
238 } |
244 } |
239 |
245 |
240 /** |
246 /** |
241 Cleans up outstanding request processors when a session is closed. |
247 Cleans up outstanding request processors when a session is closed. |
242 @param aSession notification parameter block |
248 @param aSession notification parameter block |
243 */ |
249 */ |
244 void CMTPPlaybackControlDataProvider::SessionClosedL(const TMTPNotificationParamsSessionChange& aSession) |
250 void CMTPPlaybackControlDataProvider::SessionClosedL(const TMTPNotificationParamsSessionChange& aSession) |
245 { |
251 { |
246 __FLOG(_L8("SessionClosedL - Entry")); |
252 OstTraceFunctionEntry0( CMTPPLAYBACKCONTROLDATAPROVIDER_SESSIONCLOSEDL_ENTRY ); |
247 TInt count = iActiveProcessors.Count(); |
253 TInt count = iActiveProcessors.Count(); |
248 while (count--) |
254 while (count--) |
249 { |
255 { |
250 MMTPRequestProcessor* processor = iActiveProcessors[count]; |
256 MMTPRequestProcessor* processor = iActiveProcessors[count]; |
251 TUint32 sessionId(processor->SessionId()); |
257 TUint32 sessionId(processor->SessionId()); |
267 { |
273 { |
268 iPlaybackControl->Close(); |
274 iPlaybackControl->Close(); |
269 iPlaybackControl = NULL; |
275 iPlaybackControl = NULL; |
270 } |
276 } |
271 |
277 |
272 __FLOG(_L8("SessionClosedL - Exit")); |
278 OstTraceFunctionExit0( CMTPPLAYBACKCONTROLDATAPROVIDER_SESSIONCLOSEDL_EXIT ); |
273 } |
279 } |
274 |
280 |
275 /** |
281 /** |
276 Prepares for a newly-opened session. |
282 Prepares for a newly-opened session. |
277 @param aSession notification parameter block |
283 @param aSession notification parameter block |
278 */ |
284 */ |
279 #ifdef __FLOG_ACTIVE |
|
280 void CMTPPlaybackControlDataProvider::SessionOpenedL(const TMTPNotificationParamsSessionChange& aSession) |
285 void CMTPPlaybackControlDataProvider::SessionOpenedL(const TMTPNotificationParamsSessionChange& aSession) |
281 #else |
286 { |
282 void CMTPPlaybackControlDataProvider::SessionOpenedL(const TMTPNotificationParamsSessionChange& /*aSession*/) |
287 OstTraceFunctionEntry0( DUP1_CMTPPLAYBACKCONTROLDATAPROVIDER_SESSIONOPENEDL_ENTRY ); |
283 #endif |
288 OstTrace1( TRACE_NORMAL, CMTPPLAYBACKCONTROLDATAPROVIDER_SESSIONOPENEDL, "SessionID = %d", aSession.iMTPId ); |
284 { |
289 OstTraceFunctionExit0( CMTPPLAYBACKCONTROLDATAPROVIDER_SESSIONOPENEDL_EXIT ); |
285 __FLOG(_L8("SessionOpenedL - Entry")); |
|
286 __FLOG_VA((_L8("SessionID = %d"), aSession.iMTPId)); |
|
287 __FLOG(_L8("SessionOpenedL - Exit")); |
|
288 } |
290 } |
289 |
291 |
290 void CMTPPlaybackControlDataProvider::StartObjectEnumerationL(TUint32 aStorageId, TBool /*aPersistentFullEnumeration*/) |
292 void CMTPPlaybackControlDataProvider::StartObjectEnumerationL(TUint32 aStorageId, TBool /*aPersistentFullEnumeration*/) |
291 { |
293 { |
292 __FLOG(_L8("StartObjectEnumerationL - Entry")); |
294 OstTraceFunctionEntry0( CMTPPLAYBACKCONTROLDATAPROVIDER_STARTOBJECTENUMERATIONL_ENTRY ); |
293 //This DP doesn't manage data. |
295 //This DP doesn't manage data. |
294 Framework().ObjectEnumerationCompleteL(aStorageId); |
296 Framework().ObjectEnumerationCompleteL(aStorageId); |
295 __FLOG(_L8("StartObjectEnumerationL - Exit")); |
297 OstTraceFunctionExit0( CMTPPLAYBACKCONTROLDATAPROVIDER_STARTOBJECTENUMERATIONL_EXIT ); |
296 } |
298 } |
297 |
299 |
298 void CMTPPlaybackControlDataProvider::StartStorageEnumerationL() |
300 void CMTPPlaybackControlDataProvider::StartStorageEnumerationL() |
299 { |
301 { |
300 __FLOG(_L8("StartStorageEnumerationL - Entry")); |
302 OstTraceFunctionEntry0( CMTPPLAYBACKCONTROLDATAPROVIDER_STARTSTORAGEENUMERATIONL_ENTRY ); |
301 //This DP doesn't manage data. |
303 //This DP doesn't manage data. |
302 Framework().StorageEnumerationCompleteL(); |
304 Framework().StorageEnumerationCompleteL(); |
303 __FLOG(_L8("StartStorageEnumerationL - Exit")); |
305 OstTraceFunctionExit0( CMTPPLAYBACKCONTROLDATAPROVIDER_STARTSTORAGEENUMERATIONL_EXIT ); |
304 } |
306 } |
305 |
307 |
306 void CMTPPlaybackControlDataProvider::HandlePlaybackEventL(CMTPPlaybackEvent* aEvent, TInt aErr) |
308 void CMTPPlaybackControlDataProvider::HandlePlaybackEventL(CMTPPlaybackEvent* aEvent, TInt aErr) |
307 { |
309 { |
308 __FLOG(_L8("HandlePlaybackEventL - Entry")); |
310 OstTraceFunctionEntry0( CMTPPLAYBACKCONTROLDATAPROVIDER_HANDLEPLAYBACKEVENTL_ENTRY ); |
309 |
311 |
310 if(aErr != KPlaybackErrNone) |
312 if(aErr != KPlaybackErrNone) |
311 { |
313 { |
312 if(aErr == KPlaybackErrDeviceUnavailable ) |
314 if(aErr == KPlaybackErrDeviceUnavailable ) |
313 { |
315 { |
316 SendEventL(EMTPDevicePropCodePlaybackObject); |
318 SendEventL(EMTPDevicePropCodePlaybackObject); |
317 SendEventL(EMTPDevicePropCodePlaybackRate); |
319 SendEventL(EMTPDevicePropCodePlaybackRate); |
318 SendEventL(EMTPDevicePropCodePlaybackContainerIndex); |
320 SendEventL(EMTPDevicePropCodePlaybackContainerIndex); |
319 SendEventL(EMTPDevicePropCodePlaybackPosition); |
321 SendEventL(EMTPDevicePropCodePlaybackPosition); |
320 } |
322 } |
|
323 OstTraceFunctionExit0( CMTPPLAYBACKCONTROLDATAPROVIDER_HANDLEPLAYBACKEVENTL_EXIT ); |
321 return; |
324 return; |
322 } |
325 } |
323 |
326 |
324 __ASSERT_DEBUG((aEvent != NULL), Panic(EMTPPBDataNullErr)); |
327 __ASSERT_DEBUG((aEvent != NULL), Panic(EMTPPBDataNullErr)); |
325 __ASSERT_ALWAYS((aEvent != NULL), User::Leave(KErrArgument)); |
328 __ASSERT_ALWAYS_OST((aEvent != NULL), OstTrace0( TRACE_ERROR, DUP1_CMTPPLAYBACKCONTROLDATAPROVIDER_HANDLEPLAYBACKEVENTL, "Error argument" ), User::Leave(KErrArgument)); |
326 __FLOG_1(_L8("aEvent %d"), aEvent->PlaybackEvent()); |
329 OstTrace1( TRACE_NORMAL, CMTPPLAYBACKCONTROLDATAPROVIDER_HANDLEPLAYBACKEVENTL, "aEvent %d", aEvent->PlaybackEvent()); |
327 |
330 |
328 switch(aEvent->PlaybackEvent()) |
331 switch(aEvent->PlaybackEvent()) |
329 { |
332 { |
330 case EPlaybackEventVolumeUpdate: |
333 case EPlaybackEventVolumeUpdate: |
331 { |
334 { |
332 SendEventL(EMTPDevicePropCodeVolume); |
335 SendEventL(EMTPDevicePropCodeVolume); |
347 SendEventL(EMTPDevicePropCodePlaybackContainerIndex); |
350 SendEventL(EMTPDevicePropCodePlaybackContainerIndex); |
348 } |
351 } |
349 break; |
352 break; |
350 |
353 |
351 default: |
354 default: |
352 User::Leave(KErrArgument); |
355 LEAVEIFERROR(KErrArgument, |
|
356 OstTrace0( TRACE_ERROR, DUP2_CMTPPLAYBACKCONTROLDATAPROVIDER_HANDLEPLAYBACKEVENTL, "Error argument" )); |
353 break; |
357 break; |
354 } |
358 } |
355 |
359 |
356 __FLOG(_L8("HandlePlaybackEventL - Exit")); |
360 OstTraceFunctionExit0( DUP1_CMTPPLAYBACKCONTROLDATAPROVIDER_HANDLEPLAYBACKEVENTL_EXIT ); |
357 } |
361 } |
358 |
362 |
359 CMTPPlaybackMap& CMTPPlaybackControlDataProvider::GetPlaybackMap() const |
363 CMTPPlaybackMap& CMTPPlaybackControlDataProvider::GetPlaybackMap() const |
360 { |
364 { |
|
365 OstTraceFunctionEntry0( CMTPPLAYBACKCONTROLDATAPROVIDER_GETPLAYBACKMAP_ENTRY ); |
361 __ASSERT_DEBUG((iPlaybackMap != NULL), Panic(EMTPPBDataNullErr)); |
366 __ASSERT_DEBUG((iPlaybackMap != NULL), Panic(EMTPPBDataNullErr)); |
|
367 OstTraceFunctionExit0( CMTPPLAYBACKCONTROLDATAPROVIDER_GETPLAYBACKMAP_EXIT ); |
362 return *iPlaybackMap; |
368 return *iPlaybackMap; |
363 } |
369 } |
364 |
370 |
365 CMTPPlaybackProperty& CMTPPlaybackControlDataProvider::GetPlaybackProperty() const |
371 CMTPPlaybackProperty& CMTPPlaybackControlDataProvider::GetPlaybackProperty() const |
366 { |
372 { |
|
373 OstTraceFunctionEntry0( CMTPPLAYBACKCONTROLDATAPROVIDER_GETPLAYBACKPROPERTY_ENTRY ); |
367 __ASSERT_DEBUG((iPlaybackProperty != NULL), Panic(EMTPPBDataNullErr)); |
374 __ASSERT_DEBUG((iPlaybackProperty != NULL), Panic(EMTPPBDataNullErr)); |
|
375 OstTraceFunctionExit0( CMTPPLAYBACKCONTROLDATAPROVIDER_GETPLAYBACKPROPERTY_EXIT ); |
368 return *iPlaybackProperty; |
376 return *iPlaybackProperty; |
369 } |
377 } |
370 |
378 |
371 MMTPPlaybackControl& CMTPPlaybackControlDataProvider::GetPlaybackControlL() |
379 MMTPPlaybackControl& CMTPPlaybackControlDataProvider::GetPlaybackControlL() |
372 { |
380 { |
373 __FLOG(_L8("GetPlaybackControlL - Entry")); |
381 OstTraceFunctionEntry0( CMTPPLAYBACKCONTROLDATAPROVIDER_GETPLAYBACKCONTROLL_ENTRY ); |
374 if(iPlaybackControl == NULL) |
382 if(iPlaybackControl == NULL) |
375 { |
383 { |
376 iPlaybackControl = MMTPPlaybackControl::NewL(*this); |
384 iPlaybackControl = MMTPPlaybackControl::NewL(*this); |
377 } |
385 } |
378 else if(iRequestToResetPbCtrl) |
386 else if(iRequestToResetPbCtrl) |
380 iRequestToResetPbCtrl = EFalse; |
388 iRequestToResetPbCtrl = EFalse; |
381 iPlaybackControl->Close(); |
389 iPlaybackControl->Close(); |
382 iPlaybackControl = NULL; |
390 iPlaybackControl = NULL; |
383 iPlaybackControl = MMTPPlaybackControl::NewL(*this); |
391 iPlaybackControl = MMTPPlaybackControl::NewL(*this); |
384 } |
392 } |
385 __FLOG(_L8("GetPlaybackControlL - Exit")); |
393 OstTraceFunctionExit0( CMTPPLAYBACKCONTROLDATAPROVIDER_GETPLAYBACKCONTROLL_EXIT ); |
386 return *iPlaybackControl; |
394 return *iPlaybackControl; |
387 } |
395 } |
388 |
396 |
389 void CMTPPlaybackControlDataProvider::RequestToResetPbCtrl() |
397 void CMTPPlaybackControlDataProvider::RequestToResetPbCtrl() |
390 { |
398 { |
|
399 OstTraceFunctionEntry0( CMTPPLAYBACKCONTROLDATAPROVIDER_REQUESTTORESETPBCTRL_ENTRY ); |
391 iRequestToResetPbCtrl = ETrue; |
400 iRequestToResetPbCtrl = ETrue; |
392 } |
401 OstTraceFunctionExit0( CMTPPLAYBACKCONTROLDATAPROVIDER_REQUESTTORESETPBCTRL_EXIT ); |
|
402 } |