Further updates to podcatchers handling of cached icons. Now cache the uid of icon in feedview and reuse if already cloned. Only one icon loaded anyway.
authorLars Persson <lars.persson@embeddev.se>
Wed, 31 Mar 2010 16:06:20 +0200
changeset 94 8d36b7608232
parent 93 bbf5c5204844
child 96 a8538f50e2ba
child 97 b52f6033af15
Further updates to podcatchers handling of cached icons. Now cache the uid of icon in feedview and reuse if already cloned. Only one icon loaded anyway.
application/inc/PodcastFeedView.h
application/src/PodcastFeedView.cpp
engine/BWINS/podcastengineu.def
engine/group/engine.mmp
--- a/application/inc/PodcastFeedView.h	Wed Mar 31 14:50:33 2010 +0200
+++ b/application/inc/PodcastFeedView.h	Wed Mar 31 16:06:20 2010 +0200
@@ -118,6 +118,7 @@
 		TBool iFirstActivateAfterLaunch;
 		TOpmlState iOpmlState;
 		TBool iViewingShows;
+		RArray<TInt> iFeedIdForIconArray;
 };
 
 #endif // PODCASTFEEDVIEWH
--- a/application/src/PodcastFeedView.cpp	Wed Mar 31 14:50:33 2010 +0200
+++ b/application/src/PodcastFeedView.cpp	Wed Mar 31 16:06:20 2010 +0200
@@ -127,6 +127,7 @@
 	delete iNeverUpdated;
 	delete iStylusPopupMenu;
 	delete iUpdater;
+	iFeedIdForIconArray.Close();
     }
 
 void CPodcastFeedView::UpdateItemL(TInt aIndex)
@@ -378,8 +379,8 @@
 			}
 		}
 	CArrayPtr<CGulIcon>* icons = iListContainer->Listbox()->ItemDrawer()->FormattedCellData()->IconArray();
-
-	if(aFeedInfo.FeedIcon() != NULL && 
+	iconIndex = iFeedIdForIconArray.Find(aFeedInfo.Uid());
+	if(iconIndex == KErrNotFound && aFeedInfo.FeedIcon() != NULL && 
 			aFeedInfo.FeedIcon()->SizeInPixels().iHeight > 0 &&
 			aFeedInfo.FeedIcon()->SizeInPixels().iWidth > 0)
 		{
@@ -389,14 +390,14 @@
 		CleanupStack::PushL(bmpCopy);
 		bmpCopy->Duplicate(aFeedInfo.FeedIcon()->Handle());
 		icons->AppendL( CGulIcon::NewL(bmpCopy, NULL));
+		iFeedIdForIconArray.Append(aFeedInfo.Uid());
 		CleanupStack::Pop(bmpCopy);			
 		iconIndex = icons->Count()-1;
-		}
+		}	
 	else 
 		{
-		iconIndex = 0;
-		}
-
+		iconIndex++;
+		}	
 
 	if (unplayedShows.Length() > 0) {
 		unplayedShows.Insert(0,_L(", "));
--- a/engine/BWINS/podcastengineu.def	Wed Mar 31 14:50:33 2010 +0200
+++ b/engine/BWINS/podcastengineu.def	Wed Mar 31 16:06:20 2010 +0200
@@ -172,145 +172,3 @@
 	?Url@CFeedInfo@@QBEABVTDesC16@@XZ @ 171 NONAME ; class TDesC16 const & CFeedInfo::Url(void) const
 	?NewL@CImageHandler@@SAPAV1@AAVRFs@@AAVCPodcastModel@@@Z @ 172 NONAME ; class CImageHandler * CImageHandler::NewL(class RFs &, class CPodcastModel &)
 	?NewLC@CImageHandler@@SAPAV1@AAVRFs@@AAVCPodcastModel@@@Z @ 173 NONAME ; class CImageHandler * CImageHandler::NewLC(class RFs &, class CPodcastModel &)
-	sqlite3_aggregate_context @ 174 NONAME
-	sqlite3_aggregate_count @ 175 NONAME
-	sqlite3_auto_extension @ 176 NONAME
-	sqlite3_bind_blob @ 177 NONAME
-	sqlite3_bind_double @ 178 NONAME
-	sqlite3_bind_int @ 179 NONAME
-	sqlite3_bind_int64 @ 180 NONAME
-	sqlite3_bind_null @ 181 NONAME
-	sqlite3_bind_parameter_count @ 182 NONAME
-	sqlite3_bind_parameter_index @ 183 NONAME
-	sqlite3_bind_parameter_name @ 184 NONAME
-	sqlite3_bind_text @ 185 NONAME
-	sqlite3_bind_text16 @ 186 NONAME
-	sqlite3_bind_value @ 187 NONAME
-	sqlite3_bind_zeroblob @ 188 NONAME
-	sqlite3_blob_bytes @ 189 NONAME
-	sqlite3_blob_close @ 190 NONAME
-	sqlite3_blob_open @ 191 NONAME
-	sqlite3_blob_read @ 192 NONAME
-	sqlite3_blob_write @ 193 NONAME
-	sqlite3_busy_handler @ 194 NONAME
-	sqlite3_busy_timeout @ 195 NONAME
-	sqlite3_changes @ 196 NONAME
-	sqlite3_clear_bindings @ 197 NONAME
-	sqlite3_close @ 198 NONAME
-	sqlite3_collation_needed @ 199 NONAME
-	sqlite3_collation_needed16 @ 200 NONAME
-	sqlite3_column_blob @ 201 NONAME
-	sqlite3_column_bytes @ 202 NONAME
-	sqlite3_column_bytes16 @ 203 NONAME
-	sqlite3_column_count @ 204 NONAME
-	sqlite3_column_decltype @ 205 NONAME
-	sqlite3_column_decltype16 @ 206 NONAME
-	sqlite3_column_double @ 207 NONAME
-	sqlite3_column_int @ 208 NONAME
-	sqlite3_column_int64 @ 209 NONAME
-	sqlite3_column_name @ 210 NONAME
-	sqlite3_column_name16 @ 211 NONAME
-	sqlite3_column_text @ 212 NONAME
-	sqlite3_column_text16 @ 213 NONAME
-	sqlite3_column_type @ 214 NONAME
-	sqlite3_column_value @ 215 NONAME
-	sqlite3_commit_hook @ 216 NONAME
-	sqlite3_complete @ 217 NONAME
-	sqlite3_complete16 @ 218 NONAME
-	sqlite3_create_collation @ 219 NONAME
-	sqlite3_create_collation16 @ 220 NONAME
-	sqlite3_create_collation_v2 @ 221 NONAME
-	sqlite3_create_function @ 222 NONAME
-	sqlite3_create_function16 @ 223 NONAME
-	sqlite3_create_module @ 224 NONAME
-	sqlite3_create_module_v2 @ 225 NONAME
-	sqlite3_data_count @ 226 NONAME
-	sqlite3_db_handle @ 227 NONAME
-	sqlite3_declare_vtab @ 228 NONAME
-	sqlite3_enable_load_extension @ 229 NONAME
-	sqlite3_enable_shared_cache @ 230 NONAME
-	sqlite3_errcode @ 231 NONAME
-	sqlite3_errmsg @ 232 NONAME
-	sqlite3_errmsg16 @ 233 NONAME
-	sqlite3_exec @ 234 NONAME
-	sqlite3_expired @ 235 NONAME
-	sqlite3_extended_result_codes @ 236 NONAME
-	sqlite3_file_control @ 237 NONAME
-	sqlite3_finalize @ 238 NONAME
-	sqlite3_free @ 239 NONAME
-	sqlite3_free_table @ 240 NONAME
-	sqlite3_get_autocommit @ 241 NONAME
-	sqlite3_get_auxdata @ 242 NONAME
-	sqlite3_get_table @ 243 NONAME
-	sqlite3_global_recover @ 244 NONAME
-	sqlite3_interrupt @ 245 NONAME
-	sqlite3_last_insert_rowid @ 246 NONAME
-	sqlite3_libversion @ 247 NONAME
-	sqlite3_libversion_number @ 248 NONAME
-	sqlite3_load_extension @ 249 NONAME
-	sqlite3_malloc @ 250 NONAME
-	sqlite3_memory_alarm @ 251 NONAME
-	sqlite3_memory_highwater @ 252 NONAME
-	sqlite3_memory_used @ 253 NONAME
-	sqlite3_mprintf @ 254 NONAME
-	sqlite3_open @ 255 NONAME
-	sqlite3_open16 @ 256 NONAME
-	sqlite3_open_v2 @ 257 NONAME
-	sqlite3_overload_function @ 258 NONAME
-	sqlite3_prepare @ 259 NONAME
-	sqlite3_prepare16 @ 260 NONAME
-	sqlite3_prepare16_v2 @ 261 NONAME
-	sqlite3_prepare_v2 @ 262 NONAME
-	sqlite3_profile @ 263 NONAME
-	sqlite3_progress_handler @ 264 NONAME
-	sqlite3_realloc @ 265 NONAME
-	sqlite3_release_memory @ 266 NONAME
-	sqlite3_reset @ 267 NONAME
-	sqlite3_reset_auto_extension @ 268 NONAME
-	sqlite3_result_blob @ 269 NONAME
-	sqlite3_result_double @ 270 NONAME
-	sqlite3_result_error @ 271 NONAME
-	sqlite3_result_error16 @ 272 NONAME
-	sqlite3_result_error_nomem @ 273 NONAME
-	sqlite3_result_error_toobig @ 274 NONAME
-	sqlite3_result_int @ 275 NONAME
-	sqlite3_result_int64 @ 276 NONAME
-	sqlite3_result_null @ 277 NONAME
-	sqlite3_result_text @ 278 NONAME
-	sqlite3_result_text16 @ 279 NONAME
-	sqlite3_result_text16be @ 280 NONAME
-	sqlite3_result_text16le @ 281 NONAME
-	sqlite3_result_value @ 282 NONAME
-	sqlite3_result_zeroblob @ 283 NONAME
-	sqlite3_rollback_hook @ 284 NONAME
-	sqlite3_set_authorizer @ 285 NONAME
-	sqlite3_set_auxdata @ 286 NONAME
-	sqlite3_sleep @ 287 NONAME
-	sqlite3_snprintf @ 288 NONAME
-	sqlite3_soft_heap_limit @ 289 NONAME
-	sqlite3_sql @ 290 NONAME
-	sqlite3_step @ 291 NONAME
-	sqlite3_thread_cleanup @ 292 NONAME
-	sqlite3_threadsafe @ 293 NONAME
-	sqlite3_total_changes @ 294 NONAME
-	sqlite3_trace @ 295 NONAME
-	sqlite3_transfer_bindings @ 296 NONAME
-	sqlite3_update_hook @ 297 NONAME
-	sqlite3_user_data @ 298 NONAME
-	sqlite3_value_blob @ 299 NONAME
-	sqlite3_value_bytes @ 300 NONAME
-	sqlite3_value_bytes16 @ 301 NONAME
-	sqlite3_value_double @ 302 NONAME
-	sqlite3_value_int @ 303 NONAME
-	sqlite3_value_int64 @ 304 NONAME
-	sqlite3_value_numeric_type @ 305 NONAME
-	sqlite3_value_text @ 306 NONAME
-	sqlite3_value_text16 @ 307 NONAME
-	sqlite3_value_text16be @ 308 NONAME
-	sqlite3_value_text16le @ 309 NONAME
-	sqlite3_value_type @ 310 NONAME
-	sqlite3_vfs_find @ 311 NONAME
-	sqlite3_vfs_register @ 312 NONAME
-	sqlite3_vfs_unregister @ 313 NONAME
-	sqlite3_vmprintf @ 314 NONAME
-
--- a/engine/group/engine.mmp	Wed Mar 31 14:50:33 2010 +0200
+++ b/engine/group/engine.mmp	Wed Mar 31 16:06:20 2010 +0200
@@ -76,3 +76,4 @@
 LIBRARY imageconversion.lib 
 LIBRARY bitmaptransforms.lib 
 LIBRARY eikcore.lib 
+//staticlibrary sqlite_podcatcher.lib
\ No newline at end of file