equal
deleted
inserted
replaced
237 DP("CPodcastModel::PlayPausePodcastL BEGIN"); |
237 DP("CPodcastModel::PlayPausePodcastL BEGIN"); |
238 TRAPD(err, LaunchFileEmbeddedL(aPodcast->FileName())); |
238 TRAPD(err, LaunchFileEmbeddedL(aPodcast->FileName())); |
239 |
239 |
240 if (err == KErrNone) |
240 if (err == KErrNone) |
241 { |
241 { |
242 aPodcast->SetPlayState(EPlayed); |
242 iShowEngine->PostPlayHandling(aPodcast); |
243 iShowEngine->UpdateShowL(*aPodcast); |
|
244 } |
243 } |
245 else |
244 else |
246 { |
245 { |
247 User::Leave(err); |
246 User::Leave(err); |
248 } |
247 } |
349 |
348 |
350 if (iDB == NULL) { |
349 if (iDB == NULL) { |
351 // open DB |
350 // open DB |
352 TBuf8<KMaxFileName> filename8; |
351 TBuf8<KMaxFileName> filename8; |
353 filename8.Copy(dbFileName); |
352 filename8.Copy(dbFileName); |
354 |
|
355 #ifdef COPY_DB |
|
356 DP("Copying DB to c:\\data"); |
|
357 TFileName copyName; |
|
358 copyName.Copy(_L("C:\\data\\")); |
|
359 copyName.Append(KDBFileName); |
|
360 BaflUtils::CopyFile(iFsSession, dbFileName, copyName); |
|
361 #endif |
|
362 |
|
363 int rc = sqlite3_open((const char*) filename8.PtrZ(), &iDB); |
353 int rc = sqlite3_open((const char*) filename8.PtrZ(), &iDB); |
364 if(rc != SQLITE_OK){ |
354 if(rc != SQLITE_OK){ |
365 User::Leave(KErrCorrupt); |
355 User::Leave(KErrCorrupt); |
366 } |
356 } |
367 |
357 |
475 iShowEngine->DeleteOldShowsByFeedL(aFeedUid); |
465 iShowEngine->DeleteOldShowsByFeedL(aFeedUid); |
476 iShowEngine->CheckForDeletedShows(aFeedUid); |
466 iShowEngine->CheckForDeletedShows(aFeedUid); |
477 iShowEngine->GetShowsByFeedL(iActiveShowList, aFeedUid); |
467 iShowEngine->GetShowsByFeedL(iActiveShowList, aFeedUid); |
478 } |
468 } |
479 |
469 |
|
470 EXPORT_C void CPodcastModel::GetNewShowsL() |
|
471 { |
|
472 iActiveShowList.ResetAndDestroy(); |
|
473 iShowEngine->GetNewShowsL(iActiveShowList); |
|
474 } |
|
475 |
480 EXPORT_C void CPodcastModel::MarkSelectionPlayedL() |
476 EXPORT_C void CPodcastModel::MarkSelectionPlayedL() |
481 { |
477 { |
482 for (int i=0;i<iActiveShowList.Count();i++) { |
478 for (int i=0;i<iActiveShowList.Count();i++) { |
483 if(iActiveShowList[i]->PlayState() != EPlayed) { |
479 if(iActiveShowList[i]->PlayState() != EPlayed) { |
484 iActiveShowList[i]->SetPlayState(EPlayed); |
480 iActiveShowList[i]->SetPlayState(EPlayed); |