50 copy->SetDescriptionL(Description()); |
50 copy->SetDescriptionL(Description()); |
51 copy->SetImageUrlL(ImageUrl()); |
51 copy->SetImageUrlL(ImageUrl()); |
52 copy->SetLinkL(Link()); |
52 copy->SetLinkL(Link()); |
53 copy->SetBuildDate(BuildDate()); |
53 copy->SetBuildDate(BuildDate()); |
54 copy->SetLastUpdated(LastUpdated()); |
54 copy->SetLastUpdated(LastUpdated()); |
55 copy->iFeedIcon->Duplicate(iFeedIcon->Handle()); |
55 if (iFeedIcon) { |
|
56 copy->SetFeedIcon(iFeedIcon); |
|
57 } |
56 copy->SetImageFileNameL(ImageFileName(), NULL); |
58 copy->SetImageFileNameL(ImageFileName(), NULL); |
57 if(CustomTitle()) |
59 if(CustomTitle()) |
58 { |
60 { |
59 copy->SetCustomTitle(); |
61 copy->SetCustomTitle(); |
60 } |
62 } |
193 return iImageFileName ? *iImageFileName : KNullDesC(); |
196 return iImageFileName ? *iImageFileName : KNullDesC(); |
194 } |
197 } |
195 |
198 |
196 EXPORT_C void CFeedInfo::SetImageFileNameL(const TDesC& aFileName, CPodcastModel* aPodcastModel) |
199 EXPORT_C void CFeedInfo::SetImageFileNameL(const TDesC& aFileName, CPodcastModel* aPodcastModel) |
197 { |
200 { |
|
201 DP1("CFeedInfo::SetImageFileNameL BEGIN, aFileName=%S", &aFileName); |
198 TFileName cacheFileName; |
202 TFileName cacheFileName; |
199 |
203 |
200 if (iImageFileName) |
204 if (iImageFileName) |
201 { |
205 { |
202 delete iImageFileName; |
206 delete iImageFileName; |
207 TParsePtrC parser(*iImageFileName); |
211 TParsePtrC parser(*iImageFileName); |
208 cacheFileName = parser.DriveAndPath(); |
212 cacheFileName = parser.DriveAndPath(); |
209 cacheFileName.Append(parser.Name()); |
213 cacheFileName.Append(parser.Name()); |
210 cacheFileName.Append(KMbmExtension()); |
214 cacheFileName.Append(KMbmExtension()); |
211 |
215 |
212 if( iFeedIcon->SizeInPixels() == TSize(0,0) && BaflUtils::FileExists(CEikonEnv::Static()->FsSession(), cacheFileName) ) |
216 if (iFeedIcon) { |
|
217 delete iFeedIcon; |
|
218 } |
|
219 |
|
220 if( BaflUtils::FileExists(CEikonEnv::Static()->FsSession(), cacheFileName) ) |
213 { |
221 { |
214 iFeedIcon = CEikonEnv::Static()->CreateBitmapL(cacheFileName, 0); |
222 iFeedIcon = CEikonEnv::Static()->CreateBitmapL(cacheFileName, 0); |
215 } |
223 } |
216 else if(aPodcastModel && BaflUtils::FileExists(CEikonEnv::Static()->FsSession(), ImageFileName() )) |
224 else if(aPodcastModel && BaflUtils::FileExists(CEikonEnv::Static()->FsSession(), ImageFileName() )) |
217 { |
225 { |
218 // If this fails, no reason to worry |
226 // If this fails, no reason to worry |
|
227 iFeedIcon = new CFbsBitmap(); |
219 TRAP_IGNORE(aPodcastModel->ImageHandler().LoadFileAndScaleL(FeedIcon(), ImageFileName(), TSize(64,56), *this, Uid())); |
228 TRAP_IGNORE(aPodcastModel->ImageHandler().LoadFileAndScaleL(FeedIcon(), ImageFileName(), TSize(64,56), *this, Uid())); |
220 } |
229 } |
|
230 DP("CFeedInfo::SetImageFileNameL END"); |
221 } |
231 } |
222 |
232 |
223 EXPORT_C TBool CFeedInfo::CustomTitle() const |
233 EXPORT_C TBool CFeedInfo::CustomTitle() const |
224 { |
234 { |
225 return iCustomTitle; |
235 return iCustomTitle; |