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