diff -r 4e91876724a2 -r 9ba538e329bd photosgallery/contentharvesterplugin/src/glxcontentharvesterplugincaptured.cpp --- a/photosgallery/contentharvesterplugin/src/glxcontentharvesterplugincaptured.cpp Thu Dec 17 08:45:44 2009 +0200 +++ b/photosgallery/contentharvesterplugin/src/glxcontentharvesterplugincaptured.cpp Thu Jan 07 12:46:23 2010 +0200 @@ -73,8 +73,10 @@ CGlxContentHarvesterPluginBase::ConstructL(EMbmGlxiconsQgn_prop_image_notcreated); iPeriodic = CPeriodic::NewL( CActive::EPriorityLow ); - iThumbnailContext = CGlxThumbnailContext::NewL(&iThumbnailIterator); + iUriAttributeContext = new (ELeave) CGlxAttributeContext(&iThumbnailIterator); + iThumbnailAttributeContext = new (ELeave) CGlxAttributeContext(&iThumbnailIterator); + //Register/Subscribe with matrix menu for the notifications GetInterfaceForNotificationL(); SetupPublisherL(KItemIndexCaptured); @@ -440,8 +442,12 @@ { GLX_LOG_INFO("CGlxContentHarvesterPluginCaptured::DestroyMedialist,media list deleted"); RemoveContextAndObserver(); - delete iThumbnailContext; - iThumbnailContext = NULL; + + delete iUriAttributeContext; + iUriAttributeContext = NULL; + delete iThumbnailAttributeContext; + iThumbnailAttributeContext = NULL; + iMediaList->Close(); iMediaList = NULL; } @@ -467,8 +473,10 @@ iThumbnailIterator.SetRange( KSinglePreviewThumbnail ); } - iMediaList = CreateMedialistAndThumbnailContextL( TGlxMediaId( - KGlxCollectionPluginCameraImplementationUid ),iThumbnailContext); + iMediaList = CreateMedialistAndAttributeContextL( TGlxMediaId( + KGlxCollectionPluginCameraImplementationUid ), + iUriAttributeContext,iThumbnailAttributeContext); + AddContextAndObserverL(); } } @@ -538,7 +546,8 @@ if(iMediaList) { iMediaList->AddMediaListObserverL( this ); - iMediaList->AddContextL(iThumbnailContext, KGlxFetchContextPriorityNormal); + iMediaList->AddContextL(iUriAttributeContext, KGlxFetchContextPriorityNormal); + iMediaList->AddContextL(iThumbnailAttributeContext, KGlxFetchContextPriorityLow); } } @@ -552,7 +561,8 @@ if(iMediaList) { iMediaList->RemoveMediaListObserver( this ); - iMediaList->RemoveContext(iThumbnailContext); + iMediaList->RemoveContext(iUriAttributeContext); + iMediaList->RemoveContext(iThumbnailAttributeContext); } }