equal
deleted
inserted
replaced
71 |
71 |
72 //Call the base class ConstructL to create default bitmap |
72 //Call the base class ConstructL to create default bitmap |
73 CGlxContentHarvesterPluginBase::ConstructL(EMbmGlxiconsQgn_prop_image_notcreated); |
73 CGlxContentHarvesterPluginBase::ConstructL(EMbmGlxiconsQgn_prop_image_notcreated); |
74 |
74 |
75 iPeriodic = CPeriodic::NewL( CActive::EPriorityLow ); |
75 iPeriodic = CPeriodic::NewL( CActive::EPriorityLow ); |
76 iThumbnailContext = CGlxThumbnailContext::NewL(&iThumbnailIterator); |
76 |
|
77 iUriAttributeContext = new (ELeave) CGlxAttributeContext(&iThumbnailIterator); |
|
78 iThumbnailAttributeContext = new (ELeave) CGlxAttributeContext(&iThumbnailIterator); |
77 |
79 |
78 //Register/Subscribe with matrix menu for the notifications |
80 //Register/Subscribe with matrix menu for the notifications |
79 GetInterfaceForNotificationL(); |
81 GetInterfaceForNotificationL(); |
80 SetupPublisherL(KItemIndexMonths); |
82 SetupPublisherL(KItemIndexMonths); |
81 RequestCpsNotificationL(KItemIndexMonths); |
83 RequestCpsNotificationL(KItemIndexMonths); |
435 TRACER( "CGlxContentHarvesterPluginMonths::DestroyMedialist" ); |
437 TRACER( "CGlxContentHarvesterPluginMonths::DestroyMedialist" ); |
436 if( iMediaList ) |
438 if( iMediaList ) |
437 { |
439 { |
438 GLX_LOG_INFO("CGlxContentHarvesterPluginMonths::DestroyMedialist,media list deleted"); |
440 GLX_LOG_INFO("CGlxContentHarvesterPluginMonths::DestroyMedialist,media list deleted"); |
439 RemoveContextAndObserver(); |
441 RemoveContextAndObserver(); |
440 delete iThumbnailContext; |
442 |
441 iThumbnailContext = NULL; |
443 delete iUriAttributeContext; |
|
444 iUriAttributeContext = NULL; |
|
445 delete iThumbnailAttributeContext; |
|
446 iThumbnailAttributeContext = NULL; |
|
447 |
442 iMediaList->Close(); |
448 iMediaList->Close(); |
443 iMediaList = NULL; |
449 iMediaList = NULL; |
444 } |
450 } |
445 } |
451 } |
446 |
452 |
462 else |
468 else |
463 { |
469 { |
464 iThumbnailIterator.SetRange( KSinglePreviewThumbnail ); |
470 iThumbnailIterator.SetRange( KSinglePreviewThumbnail ); |
465 } |
471 } |
466 |
472 |
467 iMediaList = CreateMedialistAndThumbnailContextL( TGlxMediaId( |
473 iMediaList = CreateMedialistAndAttributeContextL( TGlxMediaId( |
468 KGlxCollectionPluginMonthsImplementationUid ),iThumbnailContext); |
474 KGlxCollectionPluginMonthsImplementationUid ), |
|
475 iUriAttributeContext,iThumbnailAttributeContext); |
469 AddContextAndObserverL(); |
476 AddContextAndObserverL(); |
470 } |
477 } |
471 } |
478 } |
472 |
479 |
473 // --------------------------------------------------------------------------- |
480 // --------------------------------------------------------------------------- |
541 { |
548 { |
542 TRACER( "CGlxContentHarvesterPluginMonths::AddRemoveContextAndObserverL" ); |
549 TRACER( "CGlxContentHarvesterPluginMonths::AddRemoveContextAndObserverL" ); |
543 if(iMediaList) |
550 if(iMediaList) |
544 { |
551 { |
545 iMediaList->AddMediaListObserverL( this ); |
552 iMediaList->AddMediaListObserverL( this ); |
546 iMediaList->AddContextL(iThumbnailContext, KGlxFetchContextPriorityNormal); |
553 iMediaList->AddContextL(iUriAttributeContext, KGlxFetchContextPriorityNormal); |
|
554 iMediaList->AddContextL(iThumbnailAttributeContext, KGlxFetchContextPriorityLow); |
547 } |
555 } |
548 } |
556 } |
549 |
557 |
550 // --------------------------------------------------------------------------- |
558 // --------------------------------------------------------------------------- |
551 // CGlxContentHarvesterPluginAlbums::RemoveContextAndObserver |
559 // CGlxContentHarvesterPluginAlbums::RemoveContextAndObserver |
555 { |
563 { |
556 TRACER( "CGlxContentHarvesterPluginMonths::RemoveContextAndObserver" ); |
564 TRACER( "CGlxContentHarvesterPluginMonths::RemoveContextAndObserver" ); |
557 if(iMediaList) |
565 if(iMediaList) |
558 { |
566 { |
559 iMediaList->RemoveMediaListObserver( this ); |
567 iMediaList->RemoveMediaListObserver( this ); |
560 iMediaList->RemoveContext(iThumbnailContext); |
568 iMediaList->RemoveContext(iUriAttributeContext); |
|
569 iMediaList->RemoveContext(iThumbnailAttributeContext); |
561 } |
570 } |
562 } |
571 } |
563 |
572 |
564 // --------------------------------------------------------------------------- |
573 // --------------------------------------------------------------------------- |
565 // CGlxContentHarvesterPluginMonths::HandleError |
574 // CGlxContentHarvesterPluginMonths::HandleError |