application/src/PodcastFeedView.cpp
changeset 82 d87e984bd8b8
parent 81 27f6f5827e5d
child 84 3b59b88b089e
equal deleted inserted replaced
81:27f6f5827e5d 82:d87e984bd8b8
   898 	iPodcastModel.FeedEngine().CancelUpdateAllFeeds();
   898 	iPodcastModel.FeedEngine().CancelUpdateAllFeeds();
   899 	}
   899 	}
   900 
   900 
   901 void CPodcastFeedView::GetFeedErrorText(TDes &aErrorMessage, TInt aErrorCode)
   901 void CPodcastFeedView::GetFeedErrorText(TDes &aErrorMessage, TInt aErrorCode)
   902 	{
   902 	{
   903 	switch (aErrorCode)
   903 	((CPodcastAppUi*)AppUi())->GetErrorText(aErrorMessage,aErrorCode);
   904 		{
       
   905 		case -1:
       
   906 			{
       
   907 			HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_INVALID_ADDRESS);
       
   908 			aErrorMessage.Copy(*error);
       
   909 			CleanupStack::PopAndDestroy(error);
       
   910 			}
       
   911 			break;
       
   912 		case 404:
       
   913 			{
       
   914 			HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_NOTFOUND);
       
   915 			aErrorMessage.Copy(*error);
       
   916 			CleanupStack::PopAndDestroy(error);
       
   917 			}
       
   918 			break;
       
   919 		default:
       
   920 			{
       
   921 			if (aErrorCode > 200)
       
   922 				{
       
   923 				HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_HTTP);
       
   924 				aErrorMessage.Format(*error, aErrorCode);
       
   925 				CleanupStack::PopAndDestroy(error);
       
   926 				}
       
   927 			else
       
   928 				{
       
   929 				HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_GENERAL);
       
   930 				aErrorMessage.Format(*error, aErrorCode);
       
   931 				CleanupStack::PopAndDestroy(error);
       
   932 				}
       
   933 			}
       
   934 			break;
       
   935 		}
       
   936 	}
   904 	}
   937 
   905 
   938 void CPodcastFeedView::HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& /* aPenEventScreenLocation */)
   906 void CPodcastFeedView::HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& /* aPenEventScreenLocation */)
   939 {
   907 {
   940 	DP("CPodcastListView::HandleLongTapEventL BEGIN");
   908 	DP("CPodcastListView::HandleLongTapEventL BEGIN");