443 iListboxFormatbuffer.Format(KShowFormat(), iconIndex, &aShowInfo.Title(), &showDate, &infoSize); |
443 iListboxFormatbuffer.Format(KShowFormat(), iconIndex, &aShowInfo.Title(), &showDate, &infoSize); |
444 } |
444 } |
445 |
445 |
446 void CPodcastShowsView::GetShowErrorText(TDes &aErrorMessage, TInt aErrorCode) |
446 void CPodcastShowsView::GetShowErrorText(TDes &aErrorMessage, TInt aErrorCode) |
447 { |
447 { |
448 switch (aErrorCode) |
448 ((CPodcastAppUi*)AppUi())->GetErrorText(aErrorMessage,aErrorCode); |
449 { |
|
450 case -1: |
|
451 { |
|
452 HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_INVALID_ADDRESS); |
|
453 aErrorMessage.Copy(*error); |
|
454 CleanupStack::PopAndDestroy(error); |
|
455 } |
|
456 break; |
|
457 case 404: |
|
458 { |
|
459 HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_NOTFOUND); |
|
460 aErrorMessage.Copy(*error); |
|
461 CleanupStack::PopAndDestroy(error); |
|
462 } |
|
463 break; |
|
464 default: |
|
465 { |
|
466 if (aErrorCode > 200) |
|
467 { |
|
468 HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_HTTP); |
|
469 aErrorMessage.Format(*error, aErrorCode); |
|
470 CleanupStack::PopAndDestroy(error); |
|
471 } |
|
472 else |
|
473 { |
|
474 HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_GENERAL); |
|
475 aErrorMessage.Format(*error, aErrorCode); |
|
476 CleanupStack::PopAndDestroy(error); |
|
477 } |
|
478 } |
|
479 break; |
|
480 } |
|
481 } |
449 } |
482 |
450 |
483 void CPodcastShowsView::UpdateShowItemDataL(CShowInfo* aShowInfo,TInt aIndex, TInt aSizeDownloaded) |
451 void CPodcastShowsView::UpdateShowItemDataL(CShowInfo* aShowInfo,TInt aIndex, TInt aSizeDownloaded) |
484 { |
452 { |
485 FormatShowInfoListBoxItemL(*aShowInfo, aSizeDownloaded); |
453 FormatShowInfoListBoxItemL(*aShowInfo, aSizeDownloaded); |