equal
deleted
inserted
replaced
71 |
71 |
72 //Call the base class ConstructL,to create the default thumbnail |
72 //Call the base class ConstructL,to create the default thumbnail |
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); |
|
77 |
76 |
|
77 iUriAttributeContext = new (ELeave) CGlxAttributeContext(&iThumbnailIterator); |
|
78 iThumbnailAttributeContext = new (ELeave) CGlxAttributeContext(&iThumbnailIterator); |
|
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(KItemIndexAll); |
82 SetupPublisherL(KItemIndexAll); |
81 RequestCpsNotificationL(KItemIndexAll); |
83 RequestCpsNotificationL(KItemIndexAll); |
82 HandleStateChangeL(KItemIndexAll); |
84 HandleStateChangeL(KItemIndexAll); |
444 TRACER( "CGlxContentHarvesterPluginAll::DestroyMedialist" ); |
446 TRACER( "CGlxContentHarvesterPluginAll::DestroyMedialist" ); |
445 if( iMediaList ) |
447 if( iMediaList ) |
446 { |
448 { |
447 GLX_LOG_INFO("CGlxContentHarvesterPluginAll::DestroyMedialist,media list deleted"); |
449 GLX_LOG_INFO("CGlxContentHarvesterPluginAll::DestroyMedialist,media list deleted"); |
448 RemoveContextAndObserver(); |
450 RemoveContextAndObserver(); |
449 delete iThumbnailContext; |
451 |
450 iThumbnailContext = NULL; |
452 delete iUriAttributeContext; |
|
453 iUriAttributeContext = NULL; |
|
454 delete iThumbnailAttributeContext; |
|
455 iThumbnailAttributeContext = NULL; |
|
456 |
451 iMediaList->Close(); |
457 iMediaList->Close(); |
452 iMediaList = NULL; |
458 iMediaList = NULL; |
453 } |
459 } |
454 } |
460 } |
455 |
461 |
471 else |
477 else |
472 { |
478 { |
473 iThumbnailIterator.SetRange( KSinglePreviewThumbnail ); |
479 iThumbnailIterator.SetRange( KSinglePreviewThumbnail ); |
474 } |
480 } |
475 |
481 |
476 iMediaList = CreateMedialistAndThumbnailContextL( TGlxMediaId( |
482 iMediaList = CreateMedialistAndAttributeContextL( TGlxMediaId( |
477 KGlxCollectionPluginAllImplementationUid ),iThumbnailContext); |
483 KGlxCollectionPluginAllImplementationUid ), |
|
484 iUriAttributeContext,iThumbnailAttributeContext); |
|
485 |
478 AddContextAndObserverL(); |
486 AddContextAndObserverL(); |
479 } |
487 } |
480 } |
488 } |
481 |
489 |
482 // --------------------------------------------------------------------------- |
490 // --------------------------------------------------------------------------- |
546 { |
554 { |
547 TRACER( "CGlxContentHarvesterPluginAll::AddRemoveContextAndObserverL" ); |
555 TRACER( "CGlxContentHarvesterPluginAll::AddRemoveContextAndObserverL" ); |
548 if(iMediaList) |
556 if(iMediaList) |
549 { |
557 { |
550 iMediaList->AddMediaListObserverL( this ); |
558 iMediaList->AddMediaListObserverL( this ); |
551 iMediaList->AddContextL(iThumbnailContext, KGlxFetchContextPriorityNormal); |
559 iMediaList->AddContextL(iUriAttributeContext, KGlxFetchContextPriorityNormal); |
|
560 iMediaList->AddContextL(iThumbnailAttributeContext, KGlxFetchContextPriorityLow); |
552 } |
561 } |
553 } |
562 } |
554 |
563 |
555 // --------------------------------------------------------------------------- |
564 // --------------------------------------------------------------------------- |
556 // CGlxContentHarvesterPluginAll::RemoveContextAndObserver |
565 // CGlxContentHarvesterPluginAll::RemoveContextAndObserver |
560 { |
569 { |
561 TRACER( "CGlxContentHarvesterPluginAll::RemoveContextAndObserver" ); |
570 TRACER( "CGlxContentHarvesterPluginAll::RemoveContextAndObserver" ); |
562 if(iMediaList) |
571 if(iMediaList) |
563 { |
572 { |
564 iMediaList->RemoveMediaListObserver( this ); |
573 iMediaList->RemoveMediaListObserver( this ); |
565 iMediaList->RemoveContext(iThumbnailContext); |
574 iMediaList->RemoveContext(iUriAttributeContext); |
|
575 iMediaList->RemoveContext(iThumbnailAttributeContext); |
566 } |
576 } |
567 } |
577 } |
568 |
578 |
569 // --------------------------------------------------------------------------- |
579 // --------------------------------------------------------------------------- |
570 // CGlxContentHarvesterPluginAll::HandleError |
580 // CGlxContentHarvesterPluginAll::HandleError |