329 break; |
329 break; |
330 case EPbCmdStop: |
330 case EPbCmdStop: |
331 iMStreamControl->Stop(); |
331 iMStreamControl->Stop(); |
332 iObs->HandlePluginEvent(MMPXPlaybackPluginObserver::EPStopped, |
332 iObs->HandlePluginEvent(MMPXPlaybackPluginObserver::EPStopped, |
333 0, KErrNone); |
333 0, KErrNone); |
334 if ( EPbDlStateDownloadCompleted == iDownloadState && iConsumeStarted ) |
334 if ( EPbDlStateDownloadCompleted == iDownloadState ) |
335 { |
335 { |
336 ConsumeRights( ContentAccess::EStop ); |
336 if ( iConsumeStarted ) |
337 iConsumeStarted = EFalse; |
337 { |
|
338 ConsumeRights( ContentAccess::EStop ); |
|
339 iConsumeStarted = EFalse; |
|
340 } |
338 if ( !iFileSaved ) |
341 if ( !iFileSaved ) |
339 { |
342 { |
340 iDrmMediaUtility->Close(); // release file handle so we can move file. |
343 iDrmMediaUtility->Close(); // release file handle so we can move file. |
341 MoveDownloadedFileToMusicFolderL(); |
344 MoveDownloadedFileToMusicFolderL(); |
342 } |
345 } |
343 } |
346 } |
344 iDrmMediaUtility->Close(); |
347 iDrmMediaUtility->Close(); |
345 break; |
348 break; |
346 case EPbCmdClose: |
349 case EPbCmdClose: |
347 if ( EPbDlStateDownloadCompleted == iDownloadState && iConsumeStarted ) |
350 if ( EPbDlStateDownloadCompleted == iDownloadState ) |
348 { |
351 { |
349 ConsumeRights( ContentAccess::EStop ); |
352 if ( iConsumeStarted ) |
350 iConsumeStarted = EFalse; |
353 { |
|
354 ConsumeRights( ContentAccess::EStop ); |
|
355 iConsumeStarted = EFalse; |
|
356 } |
351 if ( !iFileSaved ) |
357 if ( !iFileSaved ) |
352 { |
358 { |
353 iDrmMediaUtility->Close(); // release file handle so we can move file. |
359 iDrmMediaUtility->Close(); // release file handle so we can move file. |
354 MoveDownloadedFileToMusicFolderL(); |
360 MoveDownloadedFileToMusicFolderL(); |
355 } |
361 } |