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(KItemIndexCaptured); |
82 SetupPublisherL(KItemIndexCaptured); |
81 RequestCpsNotificationL(KItemIndexCaptured); |
83 RequestCpsNotificationL(KItemIndexCaptured); |
82 HandleStateChangeL(KItemIndexCaptured); |
84 HandleStateChangeL(KItemIndexCaptured); |
438 TRACER( "CGlxContentHarvesterPluginCaptured::DestroyMedialist" ); |
440 TRACER( "CGlxContentHarvesterPluginCaptured::DestroyMedialist" ); |
439 if( iMediaList ) |
441 if( iMediaList ) |
440 { |
442 { |
441 GLX_LOG_INFO("CGlxContentHarvesterPluginCaptured::DestroyMedialist,media list deleted"); |
443 GLX_LOG_INFO("CGlxContentHarvesterPluginCaptured::DestroyMedialist,media list deleted"); |
442 RemoveContextAndObserver(); |
444 RemoveContextAndObserver(); |
443 delete iThumbnailContext; |
445 |
444 iThumbnailContext = NULL; |
446 delete iUriAttributeContext; |
|
447 iUriAttributeContext = NULL; |
|
448 delete iThumbnailAttributeContext; |
|
449 iThumbnailAttributeContext = NULL; |
|
450 |
445 iMediaList->Close(); |
451 iMediaList->Close(); |
446 iMediaList = NULL; |
452 iMediaList = NULL; |
447 } |
453 } |
448 } |
454 } |
449 |
455 |
465 else |
471 else |
466 { |
472 { |
467 iThumbnailIterator.SetRange( KSinglePreviewThumbnail ); |
473 iThumbnailIterator.SetRange( KSinglePreviewThumbnail ); |
468 } |
474 } |
469 |
475 |
470 iMediaList = CreateMedialistAndThumbnailContextL( TGlxMediaId( |
476 iMediaList = CreateMedialistAndAttributeContextL( TGlxMediaId( |
471 KGlxCollectionPluginCameraImplementationUid ),iThumbnailContext); |
477 KGlxCollectionPluginCameraImplementationUid ), |
|
478 iUriAttributeContext,iThumbnailAttributeContext); |
|
479 |
472 AddContextAndObserverL(); |
480 AddContextAndObserverL(); |
473 } |
481 } |
474 } |
482 } |
475 |
483 |
476 // --------------------------------------------------------------------------- |
484 // --------------------------------------------------------------------------- |
536 { |
544 { |
537 TRACER( "CGlxContentHarvesterPluginCaptured::AddContextAndObserverL" ); |
545 TRACER( "CGlxContentHarvesterPluginCaptured::AddContextAndObserverL" ); |
538 if(iMediaList) |
546 if(iMediaList) |
539 { |
547 { |
540 iMediaList->AddMediaListObserverL( this ); |
548 iMediaList->AddMediaListObserverL( this ); |
541 iMediaList->AddContextL(iThumbnailContext, KGlxFetchContextPriorityNormal); |
549 iMediaList->AddContextL(iUriAttributeContext, KGlxFetchContextPriorityNormal); |
|
550 iMediaList->AddContextL(iThumbnailAttributeContext, KGlxFetchContextPriorityLow); |
542 } |
551 } |
543 } |
552 } |
544 |
553 |
545 // --------------------------------------------------------------------------- |
554 // --------------------------------------------------------------------------- |
546 // CGlxContentHarvesterPluginCaptured::RemoveContextAndObserver |
555 // CGlxContentHarvesterPluginCaptured::RemoveContextAndObserver |
550 { |
559 { |
551 TRACER( "CGlxContentHarvesterPluginCaptured::RemoveContextAndObserver" ); |
560 TRACER( "CGlxContentHarvesterPluginCaptured::RemoveContextAndObserver" ); |
552 if(iMediaList) |
561 if(iMediaList) |
553 { |
562 { |
554 iMediaList->RemoveMediaListObserver( this ); |
563 iMediaList->RemoveMediaListObserver( this ); |
555 iMediaList->RemoveContext(iThumbnailContext); |
564 iMediaList->RemoveContext(iUriAttributeContext); |
|
565 iMediaList->RemoveContext(iThumbnailAttributeContext); |
556 } |
566 } |
557 } |
567 } |
558 |
568 |
559 // --------------------------------------------------------------------------- |
569 // --------------------------------------------------------------------------- |
560 // CGlxContentHarvesterPluginCaptured::HandleError |
570 // CGlxContentHarvesterPluginCaptured::HandleError |