equal
deleted
inserted
replaced
515 { |
515 { |
516 TTime time; |
516 TTime time; |
517 time.HomeTime(); |
517 time.HomeTime(); |
518 iActiveFeed->SetLastUpdated(time); |
518 iActiveFeed->SetLastUpdated(time); |
519 iActiveFeed->SetLastError(aError); |
519 iActiveFeed->SetLastError(aError); |
520 NotifyFeedUpdateCompleteL(aError); |
520 NotifyFeedUpdateComplete(iActiveFeed->Uid(), aError); |
521 } |
521 } |
522 break; |
522 break; |
523 case EUpdatingFeed: |
523 case EUpdatingFeed: |
524 { |
524 { |
525 // Parse the feed. We need to trap this call since it could leave and then |
525 // Parse the feed. We need to trap this call since it could leave and then |
585 } |
585 } |
586 iCancelRequested = EFalse; |
586 iCancelRequested = EFalse; |
587 }break; |
587 }break; |
588 } |
588 } |
589 |
589 |
590 NotifyFeedUpdateCompleteL(aError); |
590 NotifyFeedUpdateComplete(iActiveFeed->Uid(), aError); |
591 |
591 |
592 // we will wait until the image has been downloaded to start the next feed update. |
592 // we will wait until the image has been downloaded to start the next feed update. |
593 if (iClientState == EIdle) |
593 if (iClientState == EIdle) |
594 { |
594 { |
595 UpdateNextFeedL(); |
595 UpdateNextFeedL(); |
596 } |
596 } |
597 }break; |
597 }break; |
598 case EUpdatingImage: |
598 case EUpdatingImage: |
599 { |
599 { |
600 // change client state to not updating |
600 // change client state to not updating |
601 iClientState = EIdle; |
601 iClientState = EIdle; |
602 |
602 if(aError == KErrNone) |
603 NotifyFeedUpdateCompleteL(aError); |
603 { |
|
604 if( BaflUtils::FileExists(CEikonEnv::Static()->FsSession(), iActiveFeed->ImageFileName() )) |
|
605 { |
|
606 // If this fails, no reason to worry |
|
607 TRAP_IGNORE(iPodcastModel.ImageHandler().LoadFileAndScaleL(iActiveFeed->FeedIcon(), iActiveFeed->ImageFileName(), TSize(64,56), *iActiveFeed, iActiveFeed->Uid())); |
|
608 } |
|
609 } |
|
610 |
|
611 NotifyFeedUpdateComplete(iActiveFeed->Uid(), aError); |
604 UpdateNextFeedL(); |
612 UpdateNextFeedL(); |
605 }break; |
613 }break; |
606 case ESearching: |
614 case ESearching: |
607 { |
615 { |
608 iClientState = EIdle; |
616 iClientState = EIdle; |
627 }break; |
635 }break; |
628 } |
636 } |
629 DP("CFeedEngine::CompleteL END"); |
637 DP("CFeedEngine::CompleteL END"); |
630 } |
638 } |
631 |
639 |
632 void CFeedEngine::NotifyFeedUpdateCompleteL(TInt aError) |
640 void CFeedEngine::NotifyFeedUpdateComplete(TInt aFeedUid, TInt aError) |
633 { |
641 { |
634 DP("CFeedEngine::NotifyFeedUpdateComplete"); |
642 DP("CFeedEngine::NotifyFeedUpdateComplete"); |
635 DBUpdateFeedL(*iActiveFeed); |
|
636 for (TInt i=0;i<iObservers.Count();i++) |
643 for (TInt i=0;i<iObservers.Count();i++) |
637 { |
644 { |
638 TRAP_IGNORE(iObservers[i]->FeedDownloadFinishedL(iAutoUpdatedInitiator?MFeedEngineObserver::EFeedAutoUpdate:MFeedEngineObserver::EFeedManualUpdate, iActiveFeed->Uid(), aError)); |
645 TRAP_IGNORE(iObservers[i]->FeedDownloadFinishedL(MFeedEngineObserver::EFeedAutoUpdate, aFeedUid, aError)); |
639 } |
646 } |
640 } |
647 } |
641 |
648 |
642 void CFeedEngine::Disconnected(CHttpClient* /*aClient*/) |
649 void CFeedEngine::Disconnected(CHttpClient* /*aClient*/) |
643 { |
650 { |